Replication, Consistency and Convergence

Copies improve availability only when the read, write, conflict and repair rules are precise. Recorded histories turn vague consistency labels into contracts that can fail a test.

Section 4 of 9 · 14 units · about 64 hours

0/14

By the end you can State a consistency contract that accepts or rejects recorded histories, reproduce one violation under partition or failover, and defend the measured latency, availability, staleness, conflict and repair trade-off.

Units

Build it

Mini project · about 16 to 22 hours

Replicated store with checked histories and repair evidence

Extend loglab with configurable replication policies, executable consistency contracts and version-aware repair. Reuse net/, clock/, member/ and storage/ on your machine, keeping controller-driven promotion distinct from consensus and convergence distinct from a legal client history.

  1. 1Build validated operation histories and independent register witness search in history/; distinguish sequential consistency from linearizability, pending effects, malformed input and inconclusive search. Compare fixtures with Knossos's register model, retaining witnesses, contradictions and a negative control that drops pending writes.
  2. 2Add configurable write authority, read routing and acknowledgement policies in replica/. Replay topology-specific partitions against hand-derived contracts; record receipt, persistence, application, replies and lineage-scoped record lag, including a crash before persistence. Preserve explicit event schedules and independent model verdicts before timing runs.
  3. 3Implement controller-driven promotion, stale-epoch rejection and snapshot-plus-suffix bootstrap. Check divergent-leader rejoin, empty replacements and retention gaps against a single-node replay oracle; preserve lost acknowledged suffixes. Add session frontiers with wait-or-fail routing, monotonic reads and writes, writes-follow-reads and context-loss regressions.
  4. 4Implement dependency visibility, sibling dominance, restart-safe actors and versioned deletes against an event-ancestry oracle. Preserve skewed and equal-tag LWW losses, sibling-policy comparisons and unsafe-reclamation regressions. Retain Gossip Glomers Challenge 4 histories separately from dependency checks; optionally test incoming-context dotted replacement.
  5. 5Implement fixed-membership read write-back and fixed-preference sloppy quorums; check pending-write inversion and disjoint fallback sets with your register checker. Add recipient-aware delayed, duplicate hinted handoff and version-aware read repair; keep an unread-key negative test and distinguish partition stalls from safety violations.
  6. 6Build canonical, ordered, domain-separated Merkle comparison over versioned snapshots, including cold keys and tombstones. Compare differences and repaired state with a full-scan oracle; retain separate rebuild, comparison and transfer counters. Replay deterministic crash, failover, delete and duplicate-repair schedules without erasing earlier history violations.
  7. 7After correctness gates, compare consistency, conflict and repair policies across repeated matched runs on your machine; validate extraction against hand-counted traces. Retain versions, workloads, seeds, latency distributions, outcomes, staleness, conflicts, repair bytes, acknowledged loss and convergence. Keep Gossip Glomers 3d/3e results separate, including negative trade-offs.
What you hand in
  • The replica/ implementation with explicit contracts, recovery boundaries and reusable deterministic schedules in faults/.
  • Validated history/ fixtures, Knossos comparisons, independent model verdicts and negative-control regressions in tests/.
  • Raw traces and repeated-run comparisons in reports/, separating simulated ordering, measured timing, unsuccessful work and unobserved convergence.
How to check it
How it's graded

History oracle independence

Pass: Your checker agrees with Knossos on legal, illegal and pending-write fixtures, returns witnesses, and separates invalid input and incomplete search from violations.

Great: A deliberately broken pending-write rule fails its negative control; minimized counterexamples identify the violated ordering edge without inspecting implementation state.

Conflict and repair correctness

Pass: Your ancestry oracle checks sibling dominance and deletes; full-scan comparison validates Merkle repair. Tests expose LWW loss, resurrection, sloppy nonintersection and the unread-key limitation.

Great: Metadata-only differences, duplicate handoff and restarted actors remain correct; an optional dotted extension removes only siblings covered by the incoming context.

Measurement honesty

Pass: Hand-counted fixtures validate your extractor before repeated matched runs; raw histories support latency, outcomes, lag, conflict, repair, loss and convergence claims with named versions and workloads.

Great: The comparison preserves a negative regime, separates repair construction from transfer costs and reports pending operations or unobserved convergence rather than inventing completion times.

Resources