Christopher Meiklejohn, Ph.D. candidate from Université catholique de Louvain delivers their talk, "Just-Right Consistency: Closing The CAP Gap", on DAY 1 of the Percona Live Open Source Database Conference 2017, 4/25, at Santa Clara, CA.

The CAP theorem points to unavoidable tradeoffs between consistency and availability when the network can partition. This decision heavily impacts system performance and cost.

Current database design forces application developers to decide early in the design cycle, and once and for all, where they sit in this spectrum. At one extreme, strong consistency, as in Spanner or CockroachDB, requires frequent global coordination; restricting concurrency in this way greatly simplifies application development, but it reduces availability and increases latency. At the opposite extreme, systems such as Riak or Cassandra provide eventual consistency only: they never sacrifice availability, but application developers must write code to deal with all sorts of concurrency anomalies in order to prevent violation of application invariants.

However, a system only needs to be consistent enough for the application to remain correct. We propose a unique middle ground, Just-Right Consistency (JRC), composed of various techniques that do not sacrifice availability, unless provably required for the application to execute correctly.

We overview JRC, and present an open-source cloud-scale database built for it, Antidote. Antidote stores Conflict-Free Replicated Data Types (CRDTs) under Transactional Causal Consistency (TCC), the strongest model that does not compromise availability. Optionally, a transaction can be ACID, but Antidote keeps availability high by moving the required coordination outside the common path. Finally, we leverage research tools that help developers use ACID properties selectively, only when necessary for correctness.


Stored Under: Percona Live Sessions, NoSQL, Replication, High Availability, Replication