CSEP 552 Reading 3
Due Monday, November 30 at 11:59pm.
In this reading we look at caching and weak consistency. When is a stale answer acceptable? What keeps a stale answer from becoming a wrong one?
Choose one of the papers below, read it, and write a response. See the readings page for more details on your response.
-
Nishtala et al. Scaling Memcache at Facebook.
- This paper describes Facebook's distributed cache.
- Questions to consider while reading: how do they use leases, and what problems do the leases solve? When can a client read stale data? How much staleness is acceptable? How does invalidation work across regions?
- Local copy (UW login required).
-
Brewer. CAP Twelve Years Later: How the "Rules" Have Changed.
- The author revisits the "CAP theorem" ("Consistency, Availability, Partition-tolerance -- pick 2 out of 3") and argues that "pick 2 out of 3" is misleading.
- Questions to consider while reading: what choices does a system actually face during a partition? How does a system recover consistency once the partition heals? Which of the systems you have built or studied this quarter chose consistency, and which chose availability?
- Local copy (UW login required).
-
Hellerstein and Alvaro. Keeping CALM: When Distributed Consistency Is Easy.
- This paper asks which programs can run correctly without any coordination, and identifies monotonicity as a key technique.
- Questions to consider while reading: which parts of the labs are monotonic, and which need coordination? What would you give up to make a system coordination-free? How does monotonicity help us decide whether a system should give strongly consistent guarantees (e.g. linearizability) or use weak consistency?
- Local copy (UW login required).
Extra (optional) readings
Leases, locks, and time
-
Kleppmann. How to do distributed locking (blog post, 2016).
- Why a lock with a lease is not safe without synchronized clocks, and how fencing tokens fix it.
-
Adya et al. Slicer: Auto-Sharding for Datacenter Applications (OSDI 2016).
- Google's service for assigning keys to servers, which hands out assignments with leases and trades strict consistency for availability.
Weak consistency models
If you read one of these, read Session Guarantees (10 pages). Burckhardt is a 150-page monograph; chapters 3 and 5 are the core.
-
Terry et al. Session Guarantees for Weakly Consistent Replicated Data (PDIS 1994).
- Defines read your writes, monotonic reads, writes follow reads, and monotonic writes, the per-client guarantees that a weakly consistent store like Bayou can provide.
- Local copy (UW login required).
-
Terry et al. Managing Update Conflicts in Bayou, a Weakly Connected Replicated Storage System (SOSP 1995).
- A replicated store for devices that are often disconnected, where writes are tentative until committed and applications supply their own conflict resolution.
- Local copy (UW login required).
-
Bailis et al. Highly Available Transactions: Virtues and Limitations (VLDB 2014).
- Which isolation levels and session guarantees (monotonic reads, read your writes, causal consistency, and others) a system can provide while staying available during partitions, and which it cannot.
-
Burckhardt. Principles of Eventual Consistency (Foundations and Trends in Programming Languages, 2014).
- A book-length treatment that defines eventual consistency, causal consistency, and replicated data types (CRDTs such as counters and sets) precisely, using histories and abstract executions, and then gives implementations.
Deterministic simulation testing
- Eaton. What's the big deal about Deterministic Simulation Testing? (blog post, 2024).
- A good overview of deterministic simulation testing, where we run the system in a single-threaded simulation that controls time, randomness, and the network, much like the dslabs search tests.
Submit
Submit your response on Gradescope by Monday, November 30 at 11:59pm.