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

Causal consistencyEventual consistency and convergenceState-based and operation-based CRDT vocabulary
1

Read

In this order, only the parts listed

0 of 3 done

  1. 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

  2. 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.

  3. 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.

2

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.
3

Try it yourself

Closed-book, before checking anything

Draw a post write, another client's read of that post, and that client's reply write. Deliver the reply before the post to a third replica. Show that immediate reply visibility violates causality even if later propagation makes all replicas agree; then add a dependency check that delays visibility. Separately, merge grow-only counter states and by componentwise maximum: both orders and a duplicate merge give , whose query is 5. Explain why adding the two whole states repeatedly would double-count.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 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. 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. 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. 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.

5

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

Also in this section