Live data from Hacker News

DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

scotthasbrouck.com

1–10 of 14 posts

Re: DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

#2
Great write up! I wrote about this idea last month, although in a less detailed way. I've also included a repository in my article with a simple React and Redux front end that demonstrates some of these concepts.

http://www.andrewcoelho.com/essays/rethinkdb-realtime-apps/

Re: DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

#3
post #2

Great write up! I wrote about this idea last month, although in a less detailed way. I've also included a repository in my article with a simple React and Redux front end that demonstrates some of these concepts. http://www.andrewcoelho.com/essays/rethinkdb-realtime-apps/

Oh that's a really cool example! Great idea with the animated gifs, I think that really helps it sink in how powerful combining these two technologies really is.

Re: DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

#4
post #2

Great write up! I wrote about this idea last month, although in a less detailed way. I've also included a repository in my article with a simple React and Redux front end that demonstrates some of these concepts. http://www.andrewcoelho.com/essays/rethinkdb-realtime-apps/

Hi a small note, it's impossible to see links on your blog, make them easier to recognize.

Re: DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

#5
post #4
post #2

Great write up! I wrote about this idea last month, although in a less detailed way. I've also included a repository in my article with a simple React and Redux front end that demonstrates some of these concepts. http://www.andrewcoelho.com/essays/rethinkdb-realtime-apps/

Hi a small note, it's impossible to see links on your blog, make them easier to recognize.

Noted, underlined them. Thanks!

Re: DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

#8
post #7

One thing that I've never understood is why websockets instead of server sent events?

WebSocket is more well known than SSE, and it's also what Socket.io uses, so I think this isn't always a conscious choice. Developers are still discovering that SSE is a thing.

Another factor is that most apps using a socket-ish connection tend to run almost all traffic over the socket as opposed to just "push" traffic. This can make sense if the exchanges aren't very resource-oriented compared to a REST API.

Re: DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

#9
RethinkDB changefeeds are great for dealing with data streams which are common to all users, but changefeeds can get tricky when you need to deal with hundreds of thousands of data streams which are more or less unique to each user (or unique to many small groups of users) - This is particularly true when you need to scale your app beyond a single process/instance/machine.

The approach described in this article may not be suitable for a lot of use cases. It's fine if all users shared the same central collection of Fruits (E.g. a giant Fruit basket)... But what if users were divided into many small groups and each group had its own independent Fruit basket? It becomes extremely difficult to manage all these unique changefeeds on the backend (especially if you have to scale beyond a single machine).

The team behind RethinkDB is currently working on a project called Horizon (previously called Fusion) which should solve this problem.

Re: DIY Meteor-like Realtime Functionality Using Socket.io and RethinkDB Changefeeds

#10

RethinkDB changefeeds are great for dealing with data streams which are common to all users, but changefeeds can get tricky when you need to deal with hundreds of thousands of data streams which are more or less unique to each user (or unique to many small groups of users) - This is particularly true when you need to scale your app beyond a single process/instance/machine. The approach described in this article may n…

What approach would you take to solve the problem you describe of individual fruit baskets that can scale?
Post reply on HN