MongoDB vs RethinkDB : Why we had to choose MongoDB

We keep a small portion of our data in MongoDB. We recently evaluated RethinkDB as a replacement for our Mongo cluster, after reading about how much more robust its storage engine is. Here is our technical analysis of why we had to stick with Mongo:

1 - No POJO library for Java

With Mongo, we use the Spring Data MongoDB library. It takes care of converting plain Java objects to/from the json format that Mongo drivers need. It results in typesafe, high level code and we never have to interact with the low level Mongo driver.

With RethinkDB, we found no such thing. The only way to interact with it was through its Java driver, which forced us to manually convert our objects to/from Maps. This essentially wiped out all the ease of using a document database in the first place. It meant everything that takes a single line with Spring and Mongo would take many, many lines with RethinkDB.

2 - MongoDB Cloud Manager

MongoDB's Cloud Manager service takes care of handling all the administrative tasks of MongoDB. Specifically:

a - Installation

Mongo Cloud installs MongoDB on our private servers. Its the best of both worlds, since we get Mongo inside our virtual network but its managed like a PAAS. We don't have to care about the exact installation steps. While RethinkDB might be easy to install, nothing beats clicking a button in a GUI.

b - Upgrades

For production, the story doesn't end at installation. With RethinkDB, we would have to write custom scripts to upgrade the database whenever a new version was released. We would have to put in effort to understand the upgrade procedure and notes of each release to ensure the update completed with minimal to no downtime.

With MongoCloud, upgrades are fully automated and just requires a few clicks.

c - Backup

A database without a backup is just a cache.

Mongo Cloud takes full care of backups and restore without us needing to do anything manual.

With RethinkDB, we would have to write custom scripts to run its command line backup tool and ensure the script was always working.

Conclusion

RethinkDB might have been a better database engine. However, choosing a database product doesn't stop at the engine. We realized that both our development and administrative burden would increase by an order of magnitude if we switched to RethinkDB. Thus, for now we continue to stick with Mongo.

Show Comments