Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Full Catalogue

The repository contains 100+ verified specifications in specl/examples/. The showcase contains 8 curated examples. Below is the full catalogue organized by domain.

Consensus

SpecDescription
paxosSingle-decree Paxos (Lamport)
epaxosEgalitarian Paxos (Moraru et al.)
multipaxos-reconfigMulti-Paxos with reconfiguration
flexible-paxosFlexible Paxos (quorum intersection)
raftRaft consensus (Vanlightly async model)
raft-simplifiedSimplified Raft (leader election only)
pbftPractical Byzantine Fault Tolerance
simplexSimplex consensus
crash-consensusConsensus with crash failures
viewstamped-replicationViewstamped Replication
nbacNon-blocking atomic commitment

Distributed Transactions

SpecDescription
two-phase-commitClassic 2PC
three-phase-commit3PC (non-blocking variant)
percolatorGoogle Percolator (snapshot isolation)
parallel-commitsCockroachDB parallel commit protocol
two-phase-locking2PL concurrency control
snapshot-isolationSnapshot isolation protocol
mvccMulti-version concurrency control
timestamp-orderingTimestamp-based CC
occOptimistic concurrency control
sagaSaga pattern (compensating transactions)
stmSoftware transactional memory

Mutual Exclusion & Locking

SpecDescription
petersonPeterson’s algorithm (2 processes)
dekkerDekker’s algorithm
bakeryLamport’s bakery algorithm
lamport-mutexLamport’s distributed mutex
ricart-agrawalaRicart-Agrawala mutex
maekawaMaekawa’s quorum-based mutex
ticket-lockTicket lock
test-and-setTAS lock
mcs-lockMCS queue lock
clh-lockCLH queue lock
redlockRedis distributed lock (finds Kleppmann’s bug)

CRDTs

SpecDescription
g-counterGrow-only counter
pn-counterPositive-negative counter
or-setObserved-remove set
lww-registerLast-writer-wins register
crdt-flagEnable/disable CRDT flag
crdt-setG-Set and 2P-Set

Broadcast & Communication

SpecDescription
reliable-broadcastReliable broadcast
causal-broadcastCausal ordering broadcast
fifo-broadcastFIFO broadcast
atomic-broadcastAtomic (total order) broadcast
gossipGossip protocol

Cache Coherence

SpecDescription
mesiMESI protocol
moesiMOESI protocol

Clock Synchronization

SpecDescription
lamport-clocksLamport logical clocks
vector-clocksVector clocks
cristian-clock-syncCristian’s algorithm
berkeley-clock-syncBerkeley algorithm

Replication & Consistency

SpecDescription
chain-replicationChain replication
primary-backupPrimary-backup replication
abdABD shared register
cas-registerCAS register
log-replicationLog replication protocol
optimistic-replicationOptimistic replication
anti-entropyAnti-entropy protocol
read-repairRead repair
sloppy-quorumSloppy quorum

Failure Detection & Recovery

SpecDescription
swimSWIM protocol
phi-accrualPhi accrual failure detector
split-brain-resolverSplit-brain resolution
termination-detectionTermination detection
leader-electionLeader election
bully-electionBully algorithm

Concurrent Data Structures

SpecDescription
ms-queueMichael-Scott queue
treiber-stackTreiber stack
work-stealingWork-stealing deque
flat-combiningFlat combining
hazard-pointersHazard pointers (safe memory reclamation)
epoch-reclamationEpoch-based reclamation
aba-problemABA problem demonstration

Classic Concurrency

SpecDescription
dining-philosophersDining philosophers
reader-writerReader-writer lock
bounded-bufferBounded buffer
barrierSynchronization barrier
sleeping-barberSleeping barber
dining-savagesDining savages
cigarette-smokersCigarette smokers
priority-inversionPriority inversion
double-checked-lockingDouble-checked locking

Infrastructure Patterns

SpecDescription
token-bucketToken bucket rate limiter
circuit-breakerCircuit breaker
exponential-backoffExponential backoff
leaseDistributed lease
reactorReactor pattern
map-reduceMap-reduce
outboxTransactional outbox
idempotent-receiverIdempotent receiver
walWrite-ahead log
group-commitGroup commit
bulkheadBulkhead pattern

Hashing & Routing

SpecDescription
consistent-hashingConsistent hashing
rendezvous-hashingRendezvous (HRW) hashing

Semaphore Puzzles

SpecDescription
sem-barbershopBarbershop problem
sem-barrierBarrier synchronization
sem-dining_philosophersDining philosophers (semaphore)
sem-h2oH2O molecule formation
sem-mutexBasic mutex
sem-producer_consumerProducer-consumer
sem-queueBounded queue
sem-readers_writersReaders-writers
sem-rendezvousRendezvous
sem-santa_clausSanta Claus problem
sem-unisex_bathroomUnisex bathroom