Unit 9 of 15 · about 4 hours · explain, implement
Jepsen generator, client, nemesis and checker roles and a fault and workload coverage matrix
A fault campaign without named roles is a pile of scripts. The four roles turn testing under faults into a repeatable design with a checker verdict per cell.
You'll be able to
- Name the four Jepsen roles (generator, client, nemesis, checker) and what each produces or consumes.
- Run an Elle
rw-registercheck on two fixed transaction histories and read the anomaly types. - Draft a fault and workload coverage matrix: faults down one side, workloads across the top, checker per cell.
Covers
Read
In this order, only the parts listed
0 of 2 done
- Jepsen framework roles at v0.3.14Jepsen - Consistency Models and Analyses
client.clj(theClientprotocol),nemesis.clj(theNemesisprotocol),checker.clj, andgenerator/interpreter.clj(interprets pure-generator operations, spawns worker threads, records the history) - Elle: Inferring Isolation Anomalies (Kingsbury and Alvaro)Elle: Inferring Isolation Anomalies from Experimental Observations (Kingsbury and Alvaro)
Abstract and Sections 1-2 (arXiv v1, 23 March 2020): black-box isolation checking from client observations, Adya-style dependency-graph inference, the soundness claim and the completeness requirement on histories
Elle infers several anomaly classes from a supported workload's observations; predicate anomalies are outside the paper's scope. State the workload, the recoverability assumptions and the checked anomaly set. A clean run is not a proof.
Focus on
- The generator produces operations; clients execute theirs against the system and the nemesis executes fault operations; the interpreter records both in one history, and the checker reads that history. Histories, not logs, are the handoff.
- Elle infers dependencies from what reads observed. Unique register values reveal some write-read dependencies but rarely a full version order; append-only lists expose more, so workload design is checker design.
- Anomaly types name the violation:
:G1ais a committed transaction reading a version written by a transaction known to have aborted. An indeterminate write is not an aborted one. Read the type before the graph. - The matrix is the coverage claim. An empty cell is an untested combination; say so instead of letting the campaign imply it.
Common mistakes · 3
- Leaving AWT initialization to chance on a headless machine. For a headless run, set
-Djava.awt.headless=trueexplicitly; failures without it depend on the environment. - Passing a plain vector as the history. Elle asserts on a real history object (
jepsen.history/history); the not-history error is your bug, not a system result. - Calling
elle.core/checkwith bare model options on a hand-built history. It fails with an API error, not a verdict; use the model-specific entry (elle.rw-register/check) instead.
Try it yourself
Closed-book, before checking anything
valid? true; valid? false with :G1a), and sketch a 3-by-3 fault and workload matrix with a checker per cell.Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.What does each Jepsen role hand to the next?Answer
The generator hands operations to clients and the nemesis; clients run theirs against the system, the nemesis runs fault operations, and the interpreter records both as the history. The checker reads that history, never the live system.
2.What is a
:G1aanomaly in one sentence?AnswerA committed transaction read a version written by a transaction known to have aborted. The fixed history uses a definite
:failwrite followed by a read returning its value; an indeterminate write would not qualify.3.Why does Elle prefer list-append workloads over read-write registers?Answer
Appended lists reveal the order of versions, so Elle can infer far more dependencies. Unique register values reveal which write a read saw, but rarely the full version order.
4.Your matrix has an empty partition-plus-snapshot-isolation cell. What do you report?Answer
An untested combination. The campaign covers only filled cells; the empty one is a stated gap, not a pass.
Practice
- Elle rw-register check on two fixed histories
With Elle 0.2.2 from Maelstrom 0.2.4, call
elle.rw-register/checkonjepsen.history/historyobjects for the two fixed histories: committed write then read (expectvalid? true) and definitely aborted write then read (expectvalid? falsewith:G1a; other diagnostics vary by version)For a headless run, set
-Djava.awt.headless=true. Keep both verdicts; the matrix in Reproduce gets one checker per cell from this pattern.
You're done when
Both Elle histories return the predicted verdicts with the anomaly type read correctly, and your matrix names a checker for every filled cell and marks the empty ones.
Only when you can do this without notes.
Leads to
- Real-system architecture reconstruction, path tracing and control-plane versus data-plane stateAim the campaign at a reconstructed real system instead of your own log.
- Raw histories, evidence labels, an independent reproduction package and a skeptical defenseFile every campaign history as raw evidence with its checker verdict.
Notes
Resources · 2 for this unit, 13 more in the section
- Jepsen - Consistency Models and AnalysesJepsen · required
Use the framework's generator, client, nemesis and checker roles to design the campaign, Knossos for single-register linearizability and Elle for transactional anomalies on recorded histories, and the public analyses for fault models. A simplified local checker must declare its object, model and completeness limits.
- Elle: Inferring Isolation Anomalies from Experimental Observations (Kingsbury and Alvaro)arXiv · required
Read how Elle infers version orders from list-append and register histories and detects cycles for G0 to G2. It needs complete histories, and a clean run is not a proof of serializability.
Also in this section
- TLA+ Video CourseLeslie Lamport · primary
Complete lectures 1 to 10 (lectures 8, 9 and 10 have two parts each) and check the corrections page, while specifying a reduced transaction, workflow or replicated-log model from the capstone. Run TLC after every extension, report the model bounds with every result, and retain the first meaningful counterexample rather than polishing only the final model.
- TLA+ ExamplesTLA+ Foundation · support
Check
specifications/transaction_commit/(TCommit.tla,TwoPhase.tla,PaxosCommit.tlawith their.cfgfiles) with TLC alongside the lectures, and read the Paxos specifications for depth.specifications/TwoPhase/is a hardware handshake, not transaction commit. - Cambridge Concurrent and Distributed Systems Notes (Kleppmann) - CRDTs and CollaborationUniversity of Cambridge (Martin Kleppmann) · support
Use Section 8.1 (operation-based and state-based CRDTs, operational transformation) for the CRDT unit, and work Exercise 21 (prove the operation-based map CRDT converges) and Exercise 22 (its multi-value variant).
- A Comprehensive Study of Convergent and Commutative Replicated Data Types (Shapiro et al., 2011)INRIA report (Berkeley course copy) · support
Read Sections 1 to 3 (state-based and operation-based definitions, the semilattice and delivery conditions) and one example type for your implementation, not the whole catalog.
- Learn TLA+Hillel Wayne · support
Use the core lessons and the examples as a second explanation when a lecture stalls, and as the PlusCal reference if you write algorithms rather than raw actions.
- Hypothesis - Stateful TestingHypothesis · required
Use
RuleBasedStateMachineagainst a reference model for property-based state-machine tests of your extension, keep the failing seeds and shrunk examples, and plant a bug to show the machine detects it. - MIT 6.5840 - Verification Lecture and Final ProjectMIT PDOS · required
Study the Spring 2026 verification lecture and IronFleet reading, then use the final-project guidance to frame a bounded real-system extension, evaluation and report. Course grading and staff review are unavailable to self-study, so use the roadmap defense rubric.
- How Amazon Web Services Uses Formal Methods (Newcombe et al., 2015)Amazon Science · support
Read it for why industrial teams specify designs in TLA+ and which bugs model checking found that testing missed. Its effort figures are anecdotes, not benchmarks.
- FoundationDB: A Distributed Unbundled Transactional Key Value Store (Zhou et al., 2021)FoundationDB · support
Read the simulation-testing section (deterministic single-threaded simulation, fault injection, seed replay) as the model for your own scheduler, and the architecture for unbundled transactions.
- DDIA 2e - Chapters 9, 10 and 14 ReviewMartin Kleppmann and Chris Riccomini · required
Revisit uncertainty, consistency, consensus and responsible system design while extracting the final contract. Use the book to challenge assumptions and alternatives, not to replace executable evidence.
- HLD Handbook - CRDTs, Multi-Region and Architecture Trade-offsHLD Handbook · support
Read the CRDT, multi-region, distributed SQL and relevant case-study chapters only after the formal core passes. Use its design prompts to prepare the final comparison and defense.
- CMU 15-721 - Selected Advanced Database Systems UnitsCarnegie Mellon Database Group · depth
Select at most one lecture group that informs your extension: #02 and #03 (data formats and encoding), #08 (scheduling and coordination) or #17 to #22 (system analyses such as BigQuery, Databricks, Snowflake, DuckDB and Redshift), with their papers. The course project needs a group, cloud credits and staff sign-off, so there is no runnable self-study project.
- Replicated Log and Stream Processor - Final CapstoneRoadmap-Final · support
Finish the protocol and invariant specification, deterministic fault campaign, bounded real-code extension, fallback, ablations, workload regions, negative result, operations dossier and independent reproduction package.