Unit 6 of 14 · about 4 hours · explain
Causal and eventual consistency, convergence and CRDT vocabulary
Convergence answers whether copies agree after propagation, not whether intermediate observations preserve dependencies. Use a concrete causal+ design to separate those two obligations.
You'll be able to
- Reject a causal-visibility violation even when all replicas eventually converge.
- State the propagation and conflict-resolution assumptions behind eventual convergence.
- Distinguish state-based merge from operation-based delivery and their convergence requirements.
Covers
Read
In this order, only the parts listed
0 of 3 done
- DDIA, 2nd edition: convergence versus dependency orderDDIA 2e - Chapter 6 Replication and Chapter 10 Consistency Sections
Chapter 6, Replication: Consistent prefix reads, pp. 213 to 214; Automatic conflict resolution through Conflict-free replicated datatypes and operational transformation, pp. 226 to 228
- Lloyd et al., COPS (SOSP 2011): causal+ and dependency checksDon't Settle for Eventual: Scalable Causal Consistency for Wide-Area Storage with COPS (Lloyd et al., 2011)
Section 3.1 Definition, Section 3.3 Causal+ in COPS, Sections 4.1 to 4.3, including Figure 6
Stop before COPS-GT. Track dependency metadata and remote visibility; do not build a multi-datacenter deployment.
- Preguica, Baquero and Shapiro (2018): CRDT synchronization vocabularyConflict-free Replicated Data Types (Preguica, Baquero and Shapiro, 2018)
Synchronization Model, printed pp. 6 to 7, covering state-based and operation-based replication
Vocabulary only. Defer a full CRDT implementation and proofs to the linked later unit.
Focus on
- A receiver may need to hold a dependent version until its prerequisites are visible. Delivery order and visibility order need not be identical.
- Causal+ means causal consistency plus convergent conflict handling. COPS's datacenter-local linearizability is an architectural choice, not the definition of causal+.
- State-based CRDTs use inflationary updates and a join on a semilattice; associative, commutative and idempotent merge tolerates reordering and duplicates when state eventually propagates.
- Operation-based CRDTs need reliable effect dissemination and the stated ordering assumptions. Commuting concurrent effectors does not make repeated application of a non-idempotent effect harmless.
Common mistakes · 3
- Calling eventual convergence a bound on staleness or a guarantee during a permanent partition.
- Assuming every CRDT provides causal reads across independently replicated objects.
- Calling reliable delivery sufficient for an increment effector when duplicates may be applied twice.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.Can two independent concurrent writes appear in different orders under causal consistency?Answer
Yes. Causality alone does not order independent writes. A separate convergence policy determines how conflicting versions are reconciled.
2.Why is componentwise maximum idempotent but repeated addition is not?Answer
Taking the maximum with the same component again changes nothing. Adding it again counts that contribution again.
3.Does an operation-based CRDT always require causal delivery?Answer
No. Requirements depend on its effectors. Causal delivery plus commuting concurrent effectors is a common sufficient condition; without ordering, all reordered effectors must commute. Duplicate application needs a separate argument.
4.What extra property does causal+ name beyond causal consistency?Answer
Convergence through consistent conflict handling. It does not mean linearizability or bounded replication lag.
Practice
- Gossip Glomers Challenge 4: Grow-Only Counter
Specification, Service: seq-kv and Evaluation; three local nodes with the g-counter workload and partition nemesis
Use Go and Maelstrom v0.2.4 on your machine; record the actual installed version. The page was tested on 0.2.3. Start from its stateless counter contract over sequentially consistent storage, not an assumed in-memory CRDT requirement. The checker checks successful final reads against confirmed and possible indeterminate increments; it does not establish intermediate-read linearizability. Keep the run history and add your own dependency-visibility test in loglab.
You're done when
Challenge 4 passes its final-count check, you explain its weaker intermediate-read contract, and your post/reply trace distinguishes eventual agreement from causal visibility.
Only when you can do this without notes.
Leads to
Notes
Resources · 3 for this unit, 13 more in the section
- DDIA 2e - Chapter 6 Replication and Chapter 10 Consistency SectionsMartin Kleppmann and Chris Riccomini · primary
Read replication completely, then the consistency-model and linearizability portions of Chapter 10. Convert every named guarantee into allowed and forbidden histories before selecting implementation policy.
- Don't Settle for Eventual: Scalable Causal Consistency for Wide-Area Storage with COPS (Lloyd et al., 2011)Carnegie Mellon University (author copy) · support
Read the causal+ definition and the dependency-tracking mechanism; causal+ adds convergence to causal consistency, so keep the qualifier.
- Conflict-free Replicated Data Types (Preguica, Baquero and Shapiro, 2018)arXiv · support
Read it for the state-based and operation-based vocabulary and the delivery assumptions each needs; the implementation belongs to DS-9.
Also in this section
- Linearizability: A Correctness Condition for Concurrent Objects (Herlihy and Wing, 1990)ACM TOPLAS (MIT 6.5840 copy) · required
Read through Section 3.1, as MIT 6.5840 assigns: histories, real-time order and the definition every history check in this section tests. Linearizability is per object, which is why it composes.
- Dynamo: Amazon's Highly Available Key-value Store (DeCandia et al., 2007)Amazon (author copy) · required
Read the background and system architecture sections: consistent hashing, replication, vector-clock versioning, sloppy quorums, hinted handoff and Merkle-tree anti-entropy. alone does not make it linearizable, and its numbers are 2007 production results.
- Session Guarantees for Weakly Consistent Replicated Data (Terry et al., 1994)Cornell course copy · support
Read the definitions of read your writes, monotonic reads, writes follow reads and monotonic writes and how each is enforced. They hold per session, not system-wide.
- Brewer's Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services (Gilbert and Lynch, 2002)CMU course copy · support
Read the model and the asynchronous-network theorem, then the partially synchronous discussion. Availability here means every request a non-failing node receives gets a response, in every fair execution, including executions that lose messages.
- Consistency in Non-Transactional Distributed Storage Systems (Viotti and Vukolic, 2016)arXiv · support
Use it as a map of model names and their relations, then confirm any single definition against its primary source.
- MIT 6.5840 - Consistency, Linearizability and Replication PapersMIT PDOS · required
Use Spring 2026 lectures 8, 12 and 13 plus their Linearizability, Spanner and Chain Replication readings. Write one history question per mechanism and answer it before looking at the discussion material.
- Cambridge Concurrent and Distributed Systems Notes (Kleppmann) - Replication and LinearizabilityUniversity of Cambridge (Martin Kleppmann) · support
Use Chapter 5 (quorums and replication with broadcast) and Section 7.2 (linearizability and ABD) as a derivation workbook: work Exercise 19 (ABD pseudocode) and Exercise 20 (is this execution linearizable?) before writing your own checker.
- Building Distributed Systems - The StoreBuild Distributed Systems · optional
Only the first three tasks are free (the key/value interface, client routing and read consistency). Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.
- HLD Handbook - Consistency, Quorums, Replication and Anti-EntropyHLD Handbook · required
Read Part 1 consistency plus Part 2 replication and Part 3 consistency, quorums, CAP and PACELC, clocks and Merkle trees. Use the chapter exercises as oral review after implementing the histories.
- Jepsen Consistency ModelsJepsen · required
Use the model hierarchy and history definitions to name the exact contract being checked. Check recorded single-register histories with Knossos, which Maelstrom runs for its
lin-kvworkload, and never claim a stronger model than the checker covers. - Gossip Glomers - Broadcast and Grow-Only CounterFly.io and Jepsen · required
Each challenge runs locally under Maelstrom (v0.2.4; the pages were tested on 0.2.3) with its checker and, where the page says so, the partition nemesis; keep the run directory as the history. Do 3d and 3e (efficient broadcast, with message and latency budgets) and 4 (a grow-only counter over sequentially consistent storage). Explain why convergence alone does not imply linearizability or transaction isolation.
- Replicated Log and Stream Processor - Replication SliceRoadmap-Final · support
Add configurable replication, lag, failover, recorded histories, repair and a checked consistency contract. Preserve one violating history and the fix or narrowed claim.
- Vector Clocks Revisited Part 2: Dotted Version VectorsRiak - Russell Brown · support
Read Sibling Explosion through Dot The clocks for the per-sibling dot and incoming-context replacement rule. This fills the implementation gap left by DDIA's brief dotted-vector mention; use the 2015 example, not its product-default statements as current guidance.