Quantifying and Generalizing the CAP Theorem

09/16/2021
by   Edward A. Lee, et al.
0

In distributed applications, Brewer's CAP theorem tells us that when networks become partitioned, there is a tradeoff between consistency and availability. Consistency is agreement on the values of shared variables across a system, and availability is the ability to respond to reads and writes accessing those shared variables. We quantify these concepts, giving numerical values to inconsistency and unavailability. Recognizing that network partitioning is not an all-or-nothing proposition, we replace the P in CAP with L, a numerical measure of apparent latency, and derive the CAL theorem, an algebraic relation between inconsistency, unavailability, and apparent latency. This relation shows that if latency becomes unbounded (e.g., the network becomes partitioned), then one of inconsistency and unavailability must also become unbounded, and hence the CAP theorem is a special case of the CAL theorem. We describe two distributed coordination mechanisms, which we have implemented as an extension of the Lingua Franca coordination language, that support arbitrary tradeoffs between consistency and availability as apparent latency varies. With centralized coordination, inconsistency remains bounded by a chosen numerical value at the cost that unavailability becomes unbounded under network partitioning. With decentralized coordination, unavailability remains bounded by a chosen numerical quantity at the cost that inconsistency becomes unbounded under network partitioning. Our centralized coordination mechanism is an extension of techniques that have historically been used for distributed simulation, an application where consistency is paramount. Our decentralized coordination mechanism is an extension of techniques that have been used in distributed databases when availability is paramount.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 8

page 9

page 12

page 18

page 24

page 31

page 33

page 41

01/07/2019

Keeping CALM: When Distributed Consistency is Easy

A key concern in modern distributed systems is to avoid the cost of coor...
02/10/2019

Antidote SQL: Relaxed When Possible, Strict When Necessary

Geo-replication poses an inherent trade-off between low latency, high av...
04/05/2018

Scaling Out Acid Applications with Operation Partitioning

OLTP applications with high workloads that cannot be served by a single ...
06/21/2018

Automated Detection of Serializability Violations under Weak Consistency

While a number of weak consistency mechanisms have been developed in rec...
09/16/2021

BuDDI: A Declarative Bloom Language for CALM Programming

Coordination protocols help programmers of distributed systems reason ab...
02/14/2020

Consistency Analysis of Replication-Based Probabilistic Key-Value Stores

Partial quorum systems are widely used in distributed key-value stores d...
01/25/2019

Partitioned Paxos via the Network Data Plane

Consensus protocols are the foundation for building fault-tolerant, dist...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.