@vonwao
I don’t have a ton of experience with RethinkDB (only 3 prod apps using it for ~6mo) but here’s my take:
TL;DR RethinkDB seems to be Mongo done right, plus realtime specific features. The entire architecture is based on a push philosophy rather than a request/response philosophy.
> I'm curious why you think Rethink is much superior to Mongo.
- Joins between tables at the DB level (one of the first for noSQL DBs)
- Changefeeds make realtime easy and more efficient
- Easier for devops to maintain
- Really nice ‘functional’ API shines with comples queries (mongo is nice too but complex queries are a mess)
- Hindsight allows them to fix mistakes made by other noSQL databases
- They run Jepson tests against each release while in development
- The company seems to be very forward thinking while MongoDB… not so much
How do I know Rethink is not the “shiny new thing” that everyone is attaching to?
A lot of the hype probably probably is. However, it does solve a lot of problems well (mainly Realtime and joins).
I heard Rethink is working on a more granular oplog feature,
I haven’t heard this yet but their mechanism for realtime is using a ‘changefeed’ that watches queries. The entire database was designed around this in mind so that the DB knows at a very low level when a changefeed has changed. From what I hear it’s a lot more efficient. Unlike the raw oplog, this allows anyone to get realtime updates without the livequery system like Meteor. You just need some kind of pubsub to send results to a client.
They’re also working on a software layer that sits in front of RethinkDB to give you basic Firebase like auth/permission things and eventually GraphQL.
… making it easy to gradually upgrade my app… but DB is different, you have to fully commit to one or the other.
It was actually fairly easy to migrate an app from MongoDB to Rethink. I had a client that was scared by the recent bad press of Mongo and wanted to switch to something else. Rethink was one of the ones that made migratio easy (compose even has a converter). If you’re app level code is using a facade like Post.update(docId, data)
then it’s easy to swap it over. Making the primary key _id
instead of id
prevents a lot of headaches.
To be fair, I don’t understand the critiscim of Mongo design decisions to make a great decision. I’m only using RethinkDB in new client apps to prevent future issues. This Quora post is a great summary of complaints (valid or invalid).
This is a great podcast explaining what Rethink does and how it differs from other noSQL/SQL databases:
http://softwareengineeringdaily.com/2015/08/19/push-databases-with-rethinkdb-ceo-slava-akhmechet/