Live data from Hacker News

Advancing the realtime web

rethinkdb.com

41–50 of 51 posts

Re: Advancing the realtime web

#41

The post says: >We'd like to make more complex queries available via realtime push. In particular, efficient realtime push implementations for the eq_join command and map/reduce are fairly complex, and aren't making it into 1.16. Will innerJoin be supported in 1.16?

All the join commands (http://rethinkdb.com/api/javascript/) are already supported and will continue to be supported.

There is currently no push implementation for joins. That's coming in the next few releases.

Re: Advancing the realtime web

#42
post #23

The article discusses how RethinkDB differs from "realtime sync services" such as Pusher, PubNub, and Firebase. While comparing against Firebase makes sense because it's an alternative database, I see Pusher and PubNub (and similar pubsub services, such as Fanout) as being complementary to RethinkDB.

Article also points out that you can't get a "realtime incremental feed", but the example they provide is quite easy and similar in Firebase by using orderBy() and limit() to return an updating query. As someone who has built lots of apps using Firebase, I can appreciate the first point about limited querying capabilities; this has been my number 1 painpoint from Firebase. I'd imagine the second point can be somewhat…

Author here -- my mistake, this was a bad example! You're right, this will become much more relevant as the `changes` command supports more and more complex queries.

Re: Advancing the realtime web

#43
post #28

On the one hand this is pretty awesome - just as I expect from the rethinkdb team - but on the other hand I'm wondering that while they are removing serious pain points from web development where are the startups that use these as a competitive advantage? Is RethinkDB understood?

The push functionality is new to RethinkDB and is just coming out hot off the presses. We'll see soon if people understand the advantages, but the initial feedback has been extremely positive.

Re: Advancing the realtime web

#44

Earlier quoted context omitted.

The basic architecture is browser web server database. When the web browser connects to the web server, the web server opens a database feed. When the database pushes changes to the web server, the web server pushes them to the browser via socket.io.

Is this not already possible with MongoDB, using something like mongooses post('save') [1]? [1] http://mongoosejs.com/docs/middleware.html

You could do it with mongoose middleware, but this solution is a lot more complex and expensive. In this case the application developer would have to take care to notify an additional piece of infrastructure about every change. Even if you can abstract the code, that requires quite a bit of additional intelligence on the backend.

Baking feeds into the database should dramatically simplify the amount of required work.

Re: Advancing the realtime web

#45
post #18

Earlier quoted context omitted.

You could probably get a poor's man version of this by setting up materialized views, a trigger on those views, and then write code in the trigger that pushes updates onto a queueing system. It wouldn't be quite as convenient, but would probably accomplish what you want in many situations.

This exists: https://github.com/omniti-labs/pg_amqp

This project has not been updated in almost two years.

Re: Advancing the realtime web

#47

How does the general performance of rethinkdb compare to http://www.tokutek.com/tokumx-for-mongodb/ ?

Rethink's performance is about what you'd get with InnoDB (sometimes faster on some workloads, occasionally slightly slower). I haven't done comparisons with tokumx, but my guess would be that Rethink is significantly slower on high insert/update workloads for huge amounts of data (which is what toku accels at). On other workloads, it's probably fairly similar.

Re: Advancing the realtime web

#48

I wonder if it would be feasible to add this sort of real-time feed to a conventional RDBMS like PostgreSQL. This feature would be quite useful for at least one of my projects, but I'm not sure I want to give up a mature SQL-based DBMS for something relatively unproven like RethinkDB.

You could probably get a poor's man version of this by setting up materialized views, a trigger on those views, and then write code in the trigger that pushes updates onto a queueing system. It wouldn't be quite as convenient, but would probably accomplish what you want in many situations.

I thought you could not do row-level triggers on views in Postgres: http://www.postgresql.org/docs/9.4/static/sql-createtrigger....

Re: Advancing the realtime web

#49
post #18

Earlier quoted context omitted.

You could probably get a poor's man version of this by setting up materialized views, a trigger on those views, and then write code in the trigger that pushes updates onto a queueing system. It wouldn't be quite as convenient, but would probably accomplish what you want in many situations.

This exists: https://github.com/omniti-labs/pg_amqp

This is another similarly stalled project: https://github.com/skariel/webalchemy
Post reply on HN