RethinkDB in Ruby

Originally published at:

You’ve probably heard of a bunch of NoSQL databases: Redis, MongoDB, Cassandra, etc., all of which offer a variety of different advantages and come with a set of disadvantages. If you’re building a new application, it’s pretty important to select a database that meets your needs. In this article, we’ll cover RethinkDB, taking a look at how to set up RethinkDB, how it fits into the landscape of NoSQL, and how to use it from Ruby.

Why RethinkDB?

RethinkDB is a JSON document store. That means that it allows you store a bunch of JSON documents and then query them later on. Turns out that RethinkDB isn’t the only document store available. Not even close. Even when the RethinkDB project was started, there were already tons of options available for someone looking for a NoSQL database. So, what’s the point of learning yet another database? To put it simply, RethinkDB combines some of the best features of its competitors and presents a pretty compelling set of advantages.

One of its closest relatives is MongoDB. Mongo quickly grew in popularity because of its focus on developer productivity: creating documents and querying them is incredibly easy to get started with in Mongo. Unfortunately, Mongo has had pretty significant problems with scaling. Granted, some of these problems arise from poor deployment practices but not all the issues raised are unfounded. But, Mongo definitely nailed developer productivity. On the other hand, we have databases like Riak that aren’t as much fun to write code for, but generally scales pretty well without a ton of effort on the part of the Dev Ops team. RethinkDB tries to sit in the middle of this “tradeoff” (there doesn’t seem to be a real reason for this to be a tradeoff): it attempts to provide Mongo-like ease-of-use while still keeping the Dev Ops people happy.

Continue reading this article on SitePoint

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.