Unit 13 of 14 · about 6 hours · implement

Deterministic replicated-store simulation with partition, failover and repair schedules

The Systems unit on distributed histories and deterministic failure simulation built the scheduler; reuse it with the track's RPC and storage boundaries. Here the new work is faithful replicated state, not another generic message-queue simulator.

You'll be able to

  • Extend the deterministic network harness with replication, persistence, promotion and repair transitions.
  • Replay partition, stale-authority, crash/restart and delayed-repair schedules byte for byte.
  • Preserve a violating client history and distinguish a contract fix from merely healing replicas.

Covers

Deterministic replicated-store simulationPartition, failover and repair fault schedules
1

Read

In this order, only the parts listed

0 of 2 done

  1. Replicated Log and Stream Processor: replication evidence boundariesReplicated Log and Stream Processor - Replication Slice

    Architecture constraints; Milestones B and D; Correctness requirements; Failure-injection requirements

    Apply only the replication, histories, stale-epoch and repair slice to loglab. Defer consensus elections, stream processing, distributed transactions and production-scale operations.

  2. Gossip Glomers: fault-tolerant and efficient broadcast contractsGossip Glomers - Broadcast and Grow-Only Counter

    Challenge 3d: Specification, Messages-per-operation, Stable latencies and Evaluation; prerequisite Challenge 3c Specification at https://fly.io/dist-sys/3c/

    Read 3c to identify the missing partition-recovery obligation before optimizing 3d. Maelstrom supplies local processes and a simulated network, not your deterministic crash-durability model.

2

Focus on

  • Schedule message delivery, timeout, persistence completion, apply and repair as separate transitions. Use stable event ordering and explicit random choices, not uncontrolled wall-clock scheduling.
  • Model each link direction separately. A node can receive a request yet fail to return its reply, and a partition is not equivalent to a process crash.
  • Retain durable state across restart and clear only volatile state. Reuse the local recovery contract rather than pretending in-memory replication tests storage durability.
  • Healing can restore convergence while leaving an earlier linearizability violation intact. Run the history checker over the whole client history, not only post-repair reads.
Common mistakes · 3
  • Replaying a seed while leaving timer order, map iteration or I/O completion outside the scheduler's control.
  • Counting a partition nemesis as a process-crash or disk-corruption test.
  • Deleting the bad prefix of a history after repair and announcing that consistency is restored retroactively.
3

Try it yourself

Closed-book, before checking anything

Extend your Python 3 loglab simulator with a controller-selected leader, epoch, durable log, applied state and a repair queue. Partition replication, acknowledge a leader-only write, and serve a stale follower read; then heal and deliver duplicate repair. Replay the same explicit schedule three times and require byte-identical client and transition traces. The full history remains rejected even after the final values match. Compare with a policy that routes the read to the reachable unchanged leader. Add separate schedules for promotion of a lagging follower, a lost acknowledgement, a restarted replica and an unread deleted key; name the contract and outcome for each. Do not claim the controller implements consensus.
4

Quiz yourself

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

0 got · 0 missed

  1. 1.Which state should survive a simulated process restart?Answer

    Only state that crossed the declared durable boundary. The simulator must reconstruct volatile state from that state using the recovery rules, not retain it accidentally.

  2. 2.Why is a dropped acknowledgement different from a dropped request?Answer

    The first may leave the effect applied with an uncertain client outcome; the second may prevent execution entirely. Retry and history handling must distinguish knowledge from actual execution.

  3. 3.Does a convergent broadcast challenge implement a linearizable register?Answer

    No. The operation specification and checker are different. Set dissemination and eventual visibility do not establish real-time register semantics or total-order broadcast.

  4. 4.What does a finite run with no completed operations demonstrate?Answer

    A progress stall within that observation interval. It is not by itself a safety counterexample or proof that progress can never resume.

5

Practice

  • Gossip Glomers Challenge 3d: Efficient Broadcast, Part I

    Specification and Evaluation: 25 nodes, 100 ms simulated message latency; repeat with the partition nemesis as the page requests

    Continue the Go broadcast implementation you built for Challenges 3a to 3c in the Systems and gossip units, and keep it passing the 3c partition run before you optimize. Use Maelstrom v0.2.4 locally and its Evaluation command; preserve histories and report the page's efficiency checks separately from correctness. The section mini-project supplies deterministic crash, failover and delete schedules that this network-only challenge does not cover.

You're done when

The explicit loglab schedules replay identically and retain the violating history, your 3d baseline meets its broadcast and published efficiency checks, and a separate partition run preserves correctness without imposing the fault-free latency budget.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 14 more in the section
  • 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.

Also in this section