Live data from Hacker News

Render realtime RethinkDB results in React

github.com

31–40 of 45 posts

Re: Render realtime RethinkDB results in React

#31

Holy "shiny new tech buzzword compliance" batman! This is hipster dev certified!

Now that you've gotten the Reddit out of your system, how do you really feel about this project?

I am guessing he feels like the hype hipsters who pump and dump their turds onto gitflub should be called out.

Re: Render realtime RethinkDB results in React

#32
> This is similar to solutions like Meteor, Parse, and Firebase. Rather than writing database queries in the backend and exposing API endpoints to the frontend, these solutions allow the frontend to directly access the data layer (secured by a permission system) using the same query API that backend services have access to.

This is a Meteor.js killer right here folks!

Re: Render realtime RethinkDB results in React

#33

Looks like everyone's hopping on the React bandwagon, trying to grab a piece of the hype.

Show me a tool out there that already does this in react. Besides relay, which isn't released, I don't know of one. Defining data in your component is a new concept to the entire javascript and web development world. I view this more as innovative than jumping on a bandwagon.

Re: Render realtime RethinkDB results in React

#34

Looks like everyone's hopping on the React bandwagon, trying to grab a piece of the hype.

I've been using React for a year and a half, and it's probably the first thing in the JavaScript ecosystem for a long time (maybe since jQuery) that hasn't made me regret building a project using it.

It's not without its issues, but it's really changed the way I build things, which after 18 years is kind of impressive.

Re: Render realtime RethinkDB results in React

#35
post #2

I guess this is intended for trusted clients?

Is there such a thing? ;-) This file shows how they authenticate users: https://github.com/mikemintz/react-rethinkdb/blob/master/exa...

I think the issue is that the client code is running actual database queries on the server, and I don't see any restrictions on what queries can be executed.

So if you log in and authenticate (through that file), it seems like you can just open the javascript console in chrome and run any type of db query you want.

Re: Render realtime RethinkDB results in React

#36
post #35

Earlier quoted context omitted.

Is there such a thing? ;-) This file shows how they authenticate users: https://github.com/mikemintz/react-rethinkdb/blob/master/exa...

I think the issue is that the client code is running actual database queries on the server, and I don't see any restrictions on what queries can be executed. So if you log in and authenticate (through that file), it seems like you can just open the javascript console in chrome and run any type of db query you want.

DB queries are validated through a whitelist on the server, so it should be impossible to run an unauthorized query when it's locked down. E.g. https://github.com/mikemintz/react-rethinkdb/blob/master/exa...

Re: Render realtime RethinkDB results in React

#37
post #35

Earlier quoted context omitted.

Is there such a thing? ;-) This file shows how they authenticate users: https://github.com/mikemintz/react-rethinkdb/blob/master/exa...

I think the issue is that the client code is running actual database queries on the server, and I don't see any restrictions on what queries can be executed. So if you log in and authenticate (through that file), it seems like you can just open the javascript console in chrome and run any type of db query you want.

[deleted]

Re: Render realtime RethinkDB results in React

#38

Looks like everyone's hopping on the React bandwagon, trying to grab a piece of the hype.

Before I jump to conclusions, can I ask what your experience level with React is like?

I think a lot of people make snap responses to the subject of new developments in the JS world because they see a lot of change happening, do not trust any of it, but also haven't bothered to further their education on the subject.

I'm curious to hear comments from those who are very knowledgable on React but also view it as a bandwagon.

Re: Render realtime RethinkDB results in React

#39
post #15

Earlier quoted context omitted.

> Unfortunately in the Ruby world live webservices like this haven't really taken off much yet And they probably never will, whatwith blocking I/O being the norm and no decent concurrency primitives. Too many better alternatives at this point.

The choice of I/O model has nothing to do with Ruby (see eventmachine for a commonly-used evented NIO setup). If you want asynchronous io with an event-driven model, there are good options for most languages.

Matz doesn't do good IO, so we don't do good IO.

Re: Render realtime RethinkDB results in React

#40
post #26

Earlier quoted context omitted.

Never did any Ruby, nor Node.js, so take this with a grain of salt. What I understood the OP to mean, and what I experienced myself, is that a language needs to actively promote (OS-level) async I/O for it to be usable, not just support it. If sync I/O is the default, too many libraries will use it (it's easy and works fine, until it doesn't). Because Node.js has no threading, async I/O is the only choice. Result: 10…

This is exactly my experience as well. If you provide synchronous, blocking interfaces and no concurrency primitives or expectation of non-blocking functions, IO, etc., people will use them. In languages where concurrency is a built-in, understood pattern (Go, Erlang/Elixir, Haskell*, to name a few) people don't need to care. Ruby has the worst of many worlds (sync I/O by default, incredibly expensive memory model, i…

Not to make this discussion personal or anything, I'm curious have you ever worked in Ruby? You say things like "why bother" and "trying to squeeze blood from this turnip" as if you don't understand why someone would love Ruby.

Anyway, I do agree with your argument. Unfortunately Ruby is from the generation of programming languages in which I/O was just seen as an api, so the sane thing was to just map to the system api directly.

JavaScript is from that generation as well but got lucky because its requirement to run in the browser forced it to have I/O fully abstracted.

Post reply on HN