Live data from Hacker News

Render realtime RethinkDB results in React

github.com

11–20 of 45 posts

Re: Render realtime RethinkDB results in React

#11

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

I'm not sure that grabbing yourself a slice of the hype-pie is necessarily a bad thing. Learning is good for the soul, right?

I do get your point, if you had one. It does feel like there's a must-have new shiny thing to prod every other day. However, React seems to be even shinier than others as of late -- I know this because I even read the documentation and played with the tutorial! I do admit that I can't really come to any solid conclusions about how shiny React realistically is because I'm not much of a sample size.

I do find the React docs to be excellent though which means I'm more likely to keep playing with it. Nothing turns me off faster than awful documentation.

Re: Render realtime RethinkDB results in React

#14
I've got a toy RethinkDB+React stack too, here's an example application: https://github.com/tinco/celluloid-rethinkdb-chat

It's Ruby+Celluloid doing subscriptions on RethinkDB, and it uses Meteor's DDP protocol to talk to the React client side.

Was pretty easy to build. All the modern technologies fit really well together.

Unfortunately in the Ruby world live webservices like this haven't really taken off much yet, so I had to write some low-ish level things myself (The DDP server implementation, which I think is the only non-Meteor DDP server implementation out there, and the celluloid-websocket implementation, which was easy because there's a great ruby websocket library by the faye people)

Re: Render realtime RethinkDB results in React

#15
post #14

I've got a toy RethinkDB+React stack too, here's an example application: https://github.com/tinco/celluloid-rethinkdb-chat It's Ruby+Celluloid doing subscriptions on RethinkDB, and it uses Meteor's DDP protocol to talk to the React client side. Was pretty easy to build. All the modern technologies fit really well together. Unfortunately in the Ruby world live webservices like this haven't really taken off much yet, s…

> 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.

Re: Render realtime RethinkDB results in React

#16

Interesting approach. I would still rather connect to RethinkDB with a frontend service and push those to stores and have the component watch the store. Because while this might work for a small use case, a real world usage will quickly outgrow that and you will wish you hadn't stuffed such functionality in a display component. So this is probably most useful for quick sketches and debugging stuff.

Could you elaborate on this? This project seems to be moving in the same direction the React team is with Relay and GraphQL – the component describes the query it requires to render itself, and a query/caching layer executes the query automatically.

Re: Render realtime RethinkDB results in React

#17
post #15
post #14

I've got a toy RethinkDB+React stack too, here's an example application: https://github.com/tinco/celluloid-rethinkdb-chat It's Ruby+Celluloid doing subscriptions on RethinkDB, and it uses Meteor's DDP protocol to talk to the React client side. Was pretty easy to build. All the modern technologies fit really well together. Unfortunately in the Ruby world live webservices like this haven't really taken off much yet, s…

> 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.

Re: Render realtime RethinkDB results in React

#18

I am excited about rethink and I use react (via cljs + reagent [1]) every day. The FRP approach of reagent combined with subscribing to rethink for updates is very appealing. [1] http://reagent-project.github.io

What other technologies do you use alongside reagent? Also, have you every tried re-frame?

Yeah, we use re-frame[1]. It's fantastic. I'd say if someone does frontend development at all they should totally read the readme.md for it.[1]

Being able to file away state changes that don't matter in an FRP way has just been an amazing win for our app.

[1] https://github.com/Day8/re-frame/

Re: Render realtime RethinkDB results in React

#20
post #8

I am excited about rethink and I use react (via cljs + reagent [1]) every day. The FRP approach of reagent combined with subscribing to rethink for updates is very appealing. [1] http://reagent-project.github.io

Are you writing big projects with this combination?

Our project has 2.5k loc. You can checkout our staging server at staging.fetchh.io/app if you'd like to poke around
Post reply on HN