Unit 12 of 14 · about 6 hours · implement
Operation history schema, a single-object reference model and a consistency checker
The Systems unit on distributed histories and deterministic failure simulation built a first checker. Here the new work is explicit indeterminate operations, validated event pairing and an independent checker comparison.
You'll be able to
- Record invocations, responses and indeterminate outcomes without inventing a real-time order.
- Implement a bounded single-register checker against an independent sequential model.
- Return a legal witness, a demonstrated violation or an inconclusive search result with its scope.
Covers
Read
In this order, only the parts listed
0 of 3 done
- Herlihy and Wing (1990): incomplete historiesLinearizability: A Correctness Condition for Concurrent Objects (Herlihy and Wing, 1990)
Sections 2.1 to 2.2, printed pp. 467 to 469: histories, complete histories, extension and equivalence
Revisit only the definitions your checker needs; do not repeat the full paper.
- Jepsen: operations, crashes and history representationJepsen Consistency Models
Fundamental Concepts: Processes, Operations, Invocation & Completion Times, Crashes and Histories (page read 2026-10-15)
- Jepsen v0.3.14: outcome encoding and Knossos modelsJepsen Consistency Models
Tutorial 4, Models and the initial
checker/linearizableexample, lines 27 to 114; read Tutorial 3's outcome rules at https://github.com/jepsen-io/jepsen/blob/e5c458ad6671846938d11c3ac28db6439f9a822f/doc/tutorial/03-client.md#L195-L202Use the register model and outcome conventions as an independent reference. Do not provision the tutorial's remote machines; the required work is a local Python checker and Maelstrom's local register oracle.
Focus on
- Pair events by stable operation identity. Record client, object, function, arguments, result, invocation, completion and outcome; keep replica configuration and epoch as diagnostic metadata.
- Validate the history before checking it: missing or duplicate responses, impossible result shapes and reused identities are input errors, not consistency verdicts.
- Enumerate legal model transitions subject to response-before-invocation edges. For indeterminate writes, consider both omission and a possible completion; a timeout is not a definite failure.
- Use the simulator or a single local observer to establish event order. Unsynchronized server timestamps cannot manufacture precise cross-client real-time edges. Exhaustion of a search budget is inconclusive, not a counterexample.
Common mistakes · 3
- Using the replicated implementation's state or merge function as the supposedly independent sequential oracle.
- Discarding timed-out writes, or marking a transport error as definite non-execution without evidence.
- Calling a single-register verdict transaction isolation, multi-key atomicity or a durability proof.
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 a timed-out write precede a later successful read in a legal witness?Answer
Yes. Its effect may have happened despite the missing response. The checker may complete that operation consistently with the observed history.
2.Why retain both an operation ID and a logical client identity?Answer
The operation ID pairs events and distinguishes attempts; client identity supplies process-order constraints. After an indeterminate operation, a new logical process identity avoids pretending the old process has no outstanding operation.
3.What does an accepted bounded history establish?Answer
That this history has a legal witness for the encoded object model and timing constraints. It does not establish correctness for unobserved schedules or a stronger model.
4.If a checker reaches its search limit without finding a witness, may it report a violation?Answer
No. Unless the search is complete or another sound argument proves impossibility, the result is inconclusive.
You're done when
Your checker agrees with the independent oracle on accepted, rejected and indeterminate-write fixtures, returns witnesses for acceptance, and never labels an incomplete search a violation.
Only when you can do this without notes.
Leads to
Notes
Resources · 2 for this unit, 14 more in the 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.
- 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.
Also in this 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.
- 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.
- 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.
- 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.
- 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.