Replicated Data Consistency Explained Through Baseball (2013)

Different cloud providers provide cloud storage with different mixes of consistency:

Cloud providers are motivated to provide multiple consistency guarantees due to the inherit tradeoff between consistency, performance, and availability. This paper presents six consistency models in plain English and motivates their use with a baseball application.

Read Consistency Guarantees. Assuming writes linearized using something like Paxos, we define six read consistency guarantees:

These consistency guarantees can be organized using the following partial order:

    SC
CP BS MR RMW
    EC

Baseball as a Sample Application. Imagine a key-value store which provides all of the read consistency guarantees outlined above. Consider a baseball application that writes home and visitor runs into two separate variables in this key value store. Consider the following game:

1 2 3 4 5 6 7 8 9 RUNS
Visitors 0 0 1 0 1 0 0 2
Home 1 0 1 1 0 2 5

The read consistency guarantees allow for the following reads:

Read Guarantee Permitted Reads
SC 2-5
EC {0, 1, 2}x{0, 1, 2, 3, 4, 5}
CP 0-0,0-1,1-1,1-2,1-3,2-3,2-4,2-5
BS 1-inning: 2-3,2-4,2-5
MR 1-3: 1-3,1-4,1-5,2-3,2-4,2-5
RMW writer: 2-5; other: {0, 1, 2}x{0, 1, 2, 3, 4, 5}

Read Requirements for Participants. Different users of the baseball database have different consistency requirements:

Lessons. - All of the six presented consistency guarantees are useful. - Different clients may want different consistencies even when accessing the same data. - Even simple databases may have diverse users with different consistency needs. - Clients should be able to choose their desired consistency.