paros ~
GitHub →
paros · Paxos in Rust

The Paxos family, built from the ground up

paros builds Paxos one flavor at a time: single decree, Multi-Paxos, matchmakers, grid quorums, proxy leaders and replicas. Each flavor is a sans-IO state machine, and each gets a TLA+ model before anything is built on it. You can step through every one of them in your browser, on the code paros ships.

Paxos flavors5
I/O in the corenone
Before codeTLA+
01Learn the flavors
  1. Single-decree PaxosTwo phases choose one value, once.
  2. Multi-PaxosA log of slots with a stable leader.
  3. Matchmaker PaxosChange the acceptors with no stop.
  4. Compartmentalized PaxosSplit the leader into roles that scale alone.
  5. QuorumsMajority, grid and partitions: who must answer.
02The coreparos-consensus
  • Sans-IOparos-consensus has no I/O, no clock and no randomness. Inputs go in, one Ready comes out, and the driver does the I/O in a fixed order.
  • One role per fileProposer, acceptor, replica, matchmaker, proxy leader, batcher, quorum read: the roles of the papers, composed into deployments.
  • Models firstA rule that the papers do not have, or a flavor that is not modelled yet, gets a TLA+ model and a control before its code.
  • Eleven examplesSmall runnable programs drive the deployments and the roles, and assert the property each one shows.

The library · the driver loop · the deployments · how it is checked

03The journalto be designed again

One ordered, durable log for each journal id, with four calls: Write, Read, Truncate and SetLeader. The journal is built again on the consensus core, once the core has segments: a segment ends at a decided command, and the acceptors keep one log.

The first design of the journal is at the tag journal-design-a. The service around it, parosd, is being rebuilt; the version before the rewrite is at the tag v0.2.0-alpha.1.