Picking the Right Database

In addition to the features offered by a particular database, you need to consider three main aspects when picking a document-based database. These are consistency, availability, and partition tolerance, as defined by the CAP theorem.[91] Since these goals are at odds with one another, you’ll have to decide on the two that are most important to you.

Consistency

When we have consistency, each client has the same view of the data. This aspect comes into play when you have a database cluster with multiple nodes. In a consistent database, each node is guaranteed to have the same view of the data.

Some databases, such as CouchDB,[92] provide eventual consistency. This means that while each node in the cluster is self-consistent, ...

Get Web Development with Clojure, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.