Siddhartha Reddy - CAP Theorem: You don’t need CP, you don’t want AP, and you can’t have CA
Channel: Hasgeek TV
Date: 2015-07-17

If you use any distributed database, you would have surely heard of the CAP Theorem: “Consistency, Availability, Partition tolerance — choose any two!” But CAP theorem is a little more nuanced than that, and it’s impact on how you should choose and operate distributed databases even more so.

Consider these two examples:

A distributed key-value store where nodes accept all writes but then respond to all read requests with a null.
A distributed key-value store where every node rejects all write as well as read requests.
We can build the above systems using just some bash utilities. The first is an example of an AP system and the second is an example of a CP system; in fact, these examples are more-or-less straight out of the paper that proved the CAP Theorem. Given that such trivial systems can be classified as CP/AP, is CAP-Theorem even a viable framework for analysing distributed databases?

Tentatively, the talk will cover:

intro to CAP theorem (the assertion; meaning of C, A, & P; proof)
examples of trivial CP & AP systems
why CA is not meaningful, CP is not viable, AP is not useful
alternatives to CAP theorem
analysis of a few real-world databases