‹ The Books Eighteen Books in One Scroll

Spokes are places, later as they run outward · arcs are messengers · red is the one changeLanes are processes, time left to right · arrows are messages · red is the changed assumption Gold is what one post sees, the same on both nights · red is what differsGold is one process's view, the same in both runs · red is what differs

Eighteen Books in One Scroll

One change at a time.

Eighteen books, two islands. Each book in the series grows out of another by changing one thing: a wind that drops, a coin in each tent, a writer who may lie.

Eighteen books, one family of papers. Each paper grows out of another by changing one assumption or one demand: partial synchrony, randomization, Byzantine faults.

Scroll to begin

Places that share no clock and talk only by messenger can still act as one.

Processes that share no clock and communicate only by messages can still behave as one.

The whole series shows how, one change at a time.The whole field unfolds from there, one assumption at a time.

The whole family

Eighteen books. Seventeen changes.Eighteen books. Seventeen changes.

Every red arc is one change; every book sits one change from the book it grows from. Tap a book to read it.Each red arc is one changed assumption or demand. Tap a node to read its book.

Now ten moves that come back from book to book under different names. Learn one, and you have met it everywhere it appears.Now ten techniques that recur across the papers. Each lights the papers that use it.

Thread one

Number itLogical timestamps

With no common hour, number things instead, and break ties by a name.Counters replace clocks, and identifiers break ties.

Thread two

One moment inside each spanLinearizability

Copies act as one when every request seems to take effect at one moment between its sending and its answer.The single-copy illusion, defined on invocations and responses alone.

Thread three

Wait for most, never allIntersecting quorums

A silent colleague may be absent or dead, so never wait for all; wait for most, since any two majorities share someone who carries what the first one did.Wait for n − f replies; any two quorums share a correct process.

Thread four

Carry the latest forwardValue carry-over across views

Each new attempt asks most of them what they last accepted and proposes that, so whatever may have passed survives a change of hands. Leading is a job, not a rank: two leaders only slow things down.A new leader adopts the highest-ranked value a quorum reports; leaders help liveness, never safety.

Thread five

Safe in any wind, done once it dropsSafety always, liveness eventually

Safety never waits on the weather; only progress does. Sandglasses and slates end a wait, and never decide anything.Timing assumptions are used for termination only.

Thread six

Echo before you trustByzantine cross-checking

A liar's word counts only when enough witnesses echo it, so the two stories can never both stand.Relay, sign and gather 2f + 1 before acting.

Thread seven

Leave it to chanceRandomization

Where no plan can be sure, chance can come close: it takes the schedule's power away, and costs a little certainty.Coins, random partners and probabilistic bounds.

Thread eight

Only growMonotonicity

What only grows merges in any order, any number of times, and what stays true once true can be read from any honest count.Join-semilattices, stable properties and monotone queries.

Thread nine

Write the absence downMake absence explicit

Nothing cannot travel, so turn it into something that can.Markers, defaults, no-ops and tombstones.

Thread ten

Hold back, never hold upBuffer, do not block

Show only what is whole, and answer at once from what already is.Delay visibility, never the response.

The island of Arche from far out over the sea in the evening light: one mountain rising to a ridge in the middle, a low coast ringing it

The first island

Arche

A single limestone massif, Mount Phyle, fills the middle of the island and leaves only a strip of coast round it. Nobody can see across.

The first island's papers: no shared clock, faults that stop or lie, and timing anywhere from synchronous rounds to none at all.

Under a clouded sky, a file of loaded carts follows the ring road along a low sea cliff, the calm sea at the left and scrub and cypresses on the slope above

Arche · setting one · the Ring RoadLogical time and consistency

Three Houses Keeping Order

Three trading houses round a mountain that none of them can see past, joined by a road on which no messenger can pass another. They keep no common hour.

Three processes, no shared clock, reliable FIFO channels. Everything a process knows is in its own log or has arrived as a message.

How to read the roundHow to read the timeline

Each spoke is a place. Each arc, a messenger.Each lane is a process. Each arrow, a message.

A spoke runs outward through time, later and later. Each dashed ring is one moment everywhere at once. Every book below is drawn this way, as the book it grows from with one change, and the change is red.

Time runs left to right along each lane; each dashed upright line is one instant of real time. An arrow is sent at its left end and received at its right one. Every paper below is drawn as the paper it builds on, with the changed assumption in red.

A cause always carries the smaller number.If a → b, then C(a) < C(b).

Ordering Without Clocks

The three houses share no hour and trade only by slip. Each keeps a tally that rises with every entry and jumps past any number a slip brings. With ties going to the lower house, all three keep one order, enough to share one storehouse. A column of three tallies, one per house, tells cause from coincidence. Neither sees news a goatherd carries over the mountain.

With no shared clock, Lamport clocks make a → b imply C(a) < C(b), and breaking ties by process number gives one total order, enough for mutual exclusion without a coordinator. Vector clocks capture causality exactly: a → b if and only if V(a) < V(b). Neither sees causality that travels outside the messages.

Read the book ›

Try it

Keep the tallies yourself.Run the Lamport clocks yourself.

Write entries, send slips, and watch each house jump past whatever number a slip brings. The list below is the one order all three houses keep: by tally, with ties to the lower house.Make local events and send messages; a receive sets C to max(C, t) + 1. The list below is the total order by (C, process id).

One order, the same in every houseTotal order (C, id)

    Ordering Without Clocks, with one change:

    first by the sun, not by the slipsreal-time order instead of causal order

    → Many Copies, Acting as One

    As if one steward kept one board.One instant inside every span.

    Many Copies, Acting as One

    The houses now ask that a request confirmed before another was even sent be filled first: first by the sun, which no tally can see. The rule of the board asks that every request and every serving seem to take effect at one moment inside its span; then nobody can tell one board from three copies. The rule can be checked board by board, and it never makes one house wait on another's business.

    Linearizability: every operation appears to take effect at one instant between its invocation and its response, so real-time order is respected and no client can tell one copy from many. It is local, since a system of linearizable objects is linearizable, and nonblocking; sequential consistency is not local, and real-time and causal order are incomparable.

    Read the book ›

    Ordering Without Clocks, with one change:

    count what is on the road as wellrecord the channels as well as the processes

    → Taking Stock Without Stopping

    A morning nobody lived.A consistent cut, never an instant.

    Taking Stock Without Stopping

    To learn whether bandits took a cart, the houses count every jar, in the storehouses and on the tracks, without halting trade. A house counts its storehouse and sends a messenger in a red sash down each track before any more carts; a house that meets a sash counts at once if it has not; each logs the carts arriving on a track until that track's sash comes. The total describes a morning nobody lived, yet one the island could have passed through, so whatever stays true once true, such as a deficit, can be read from it.

    A process records its state and sends a marker on every outgoing FIFO channel before any other message; a process receiving its first marker records at once; each records an incoming channel until that channel's marker arrives. The snapshot is a consistent cut, perhaps never an instantaneous state but reachable from the start and leading to the end, so it decides stable properties such as deadlock or termination.

    Read the book ›
    The coast from high above: hills covered in olive groves, a long inlet of the sea winding in at the left, more inlets, the open sea and islands beyond

    Across the water

    Paxos

    An island of three sections joined by narrow necks: the Chamber on the middle one and the city of Schedia on the northern, facing each other across a bay, an oracle at the fork on the southern neck, and the scholars' coast beyond it. Paxos can read the sun, and word goes by messenger, taking as long as it takes.

    The second island's papers: the limits of consensus with crashes, processes that crash and recover, leader-driven replication with crashes and liars, replicas that serve alone, and the line between waiting and not.

    Inside the Chamber at noon: a messenger in blue crosses the sunburst floor between the columns while two legislators sit on the benches along the wall

    Paxos · setting two · The ChamberConsensus & Replicated State Machines

    Part-Time Legislators Passing Laws

    A round parliamentary hall on the summit of the island's middle section, where part-time legislators wander in and out, passing laws by notes across a hall with poor acoustics.

    Three core papers on consensus and liveness: FLP impossibility, Paxos majority ballots, and Chandra-Toueg failure detectors.

    Ordering Without Clocks, with one change:

    a legislator may go homeone process may crash

    → The Limits of Agreement

    An absent colleague looks exactly like a slow runner.A crashed process looks exactly like a slow one.

    The Limits of Agreement

    Messengers always arrive across the Chamber floor but may take any time, and a legislator may go home without a word. So no vote may wait for all four, and messages can always be timed to keep the Chamber undecided. No voting arrangement can guarantee that a decree ever passes.

    In an asynchronous system where one process may crash, no deterministic consensus protocol guarantees termination. Some initial configuration is bivalent, and any pending message can be delayed so that its delivery keeps the system bivalent. Safety is never violated; termination is what is lost, even when none actually crashes.

    Read the book ›
    The paper

    The first wall

    No plan is sure to finish.FLP.

    When messengers take any time and an absent colleague cannot be told from a slow runner, no fixed rule can guarantee that a decree passes. The Chamber never passes a contradictory decree; it simply stays undecided. Three changes get through: a wind that drops on Mount Phyle, tossing silver coins in camp, or attendance slates here in the Chamber.

    Deterministic consensus in an asynchronous system with one crash cannot guarantee termination, though safety is never lost. Three changes circumvent it: partial synchrony, randomization, failure detectors.

    At bench 1:At p₁: an absent colleaguea crashed process looks like a slow messengera slow one

    The Limits of Agreement, with one change:

    indelible ink and majoritiescrash recovery and majority quorums

    → The Part-Time Parliament

    Any two majorities share a legislator.Any two majorities intersect.

    The Part-Time Parliament

    Legislators wander in and out, messengers may be slow, lost or twice delivered, and every promise goes into a scroll in indelible ink. Each numbered ballot first asks a majority for their latest votes and a promise to ignore lower ballots, then proposes the decree of the latest vote among them. One president runs ballots for every decree number at once; two presidents only slow things down.

    Paxos: numbered ballots with majority quorums. Phase 1 (prepare and promise) learns the highest-numbered accepted value; phase 2 (accept) proposes it. It is safe under any delay, loss, duplication, crash or recovery, and live when one leader and a majority stay up long enough. Multi-Paxos runs phase 1 once for every open slot.

    Read the book ›
    The papers

    Try it

    Try to find two majorities that share no one.Try to find two disjoint majorities.

    Five legislators. Three is a majority. Whatever two majorities you pick, someone sits in both, and that legislator carries the first one's latest vote into the second.Five acceptors, quorums of three. Every pair of quorums intersects, so phase 1 of any ballot hears of any value a quorum accepted.

    The Limits of Agreement, with one change:

    attendance slates and rotating chairsan unreliable failure detector ◊S

    → Telling the Absent from the Slow

    Bad slates can stall the Chamber, never split it.Safe under any detector.

    Telling the Absent from the Slow

    Each legislator chalks an attendance slate at their bench, naming colleagues suspected of having gone home and rubbing out a name when their messenger arrives. Slates are often wrong. If one present legislator is never wrongly chalked, the Chamber agrees however many leave; if that holds only in the end, rotating chairs take turns, and more than half must sit.

    Failure detectors are classified by completeness and accuracy. With S, consensus tolerates any number of crashes; with ◇S, a rotating coordinator solves it with a correct majority, and stays safe even if the detector misbehaves for ever. ◇W is the weakest detector that solves consensus, and consensus is equivalent to atomic broadcast.

    Read the book ›
    The north camp at night: a lone linen tent on a bare clearing under a full moon, olive trees and tall cypresses black against the sky beyond

    Back on Arche · setting three · the Foot of Mount PhyleTime, chance, and partitions against silence

    Four Mercenaries Who Must Agree

    Four mercenaries camped at the foot of a besieged hill, out of sight of one another, with word between them only by raven. They must all attack, or all hold.

    Four processes, asynchronous channels that always deliver but take any time, and one process that may crash. Escaping impossibility through timing and randomization, and the partition boundary of CAP.

    The Limits of Agreement, with one change:

    a wind that dropsdelays bounded after an unknown time

    → Agreeing When Messages Run Late

    Safe in any wind. Done once it drops.Safe always. Live after GST.

    Agreeing When Messages Run Late

    On windy nights a raven may sit in the pines for any time, but the wind always drops, at a moment no one sees, and a bird let go in still air arrives within a glass. Turns pass from tent to tent: the turn's owner calls an answer three mercenaries can accept, and commits on two pledges, which lock the other answer out.

    Partial synchrony: delay is unbounded until an unknown global stabilization time and bounded after it. A rotating coordinator proposes a value acceptable to n − t processes and decides on t + 1 acknowledgments; locks keep agreement under any delay, and every correct process decides soon after stabilization.

    Read the book ›
    The paper

    The Limits of Agreement, with one change:

    a coin in each tentlocal randomness

    → Agreeing by Chance

    Sooner or later, the coins land alike.Termination with probability 1.

    Agreeing by Chance

    Each mercenary may now toss a silver coin: owl for hold, goddess for attack. In numbered rounds they report what they favour, then send a second bird, sure of an answer only if three reports agree; on two sure birds they settle, on one they follow it, on none they toss. Two sure answers never meet in one round, so the coins never divide the camp.

    Each round, a process broadcasts its preference and waits for n − t reports; it proposes a value held by a strict majority, decides on t + 1 proposals, adopts a value on one, and flips a local coin on none. The adversary schedules every message but cannot foresee a coin.

    Read the book ›

    Many Copies, Acting as One, with one change:

    birds that hawks can takemessages that can be lost

    → Answering While Cut Off

    Answer, or answer as one.Available, or linearizable.

    Answering While Cut Off

    The four tents now keep one standing plan that any mercenary may move or ask about, and they would answer as one, by the rule of the board; but hawks may take any bird, cutting a tent off. A cut-off tent that must answer cannot also answer as one, for it cannot tell a night when the plan was moved from one when it was not.

    A read/write register under message loss cannot be both linearizable and available. A single primary gives consistency without availability; answering locally gives availability without consistency. With known delay bounds, timeouts give consistency in every loss-free run; in an asynchronous network even loss-free runs can be stale.

    Read the book ›

    Try it

    Toss until three agree.Flip until a majority forms.

    Say every mercenary hears all four reports. A mercenary is sure only when three agree, and then the whole camp commits. Two against two, and nobody is sure: every mercenary tosses their own coin. Owl is hold; goddess is attack.Say every process hears all four reports (n = 4, t = 1). Three matching reports give every process a proposal, and so a decision; a 2–2 split gives none, and every process flips a local coin. 0 is hold; 1 is attack.

    1
    2
    3
    4

    Try it

    Keep both. Then let the hawks fly.Partition, then pick one.

    While the birds get through, tent 4 can do both. Cut it off and try to keep both on.Without a partition a replica can be both. Partition it and try to keep both properties.

    By moonlight, the crown of Mount Phyle from just above: the chief stands inside the round wall of huge rough stones, one bandit waits down the hill outside it and another watches from the shadow of the wall

    Arche · setting four · the Crown of Mount PhyleByzantine faults

    Four Bandits Who Must Agree Though Some Lie

    Four bandits holding the crown of the besieged hill with their loot, at posts out of sight of one another, with word between them only by rat. Nobody dies up here. But some of them may lie, and nobody ever learns which.

    Four processes, any of which may behave arbitrarily: send conflicting messages, or none. Each signs with a key no one else can forge.

    The Limits of Agreement, with one change:

    liars in place of the deadByzantine faults in place of crashes

    → Agreeing Among Liars

    Three cannot bear one liar. Four can.n ≥ 3m + 1.

    Agreeing Among Liars

    On the crown, rats run within a sandglass, but a bandit may lie, telling one post one thing and another the opposite. An honest guard cannot tell a lying chief from a lying peer, so three cannot bear one liar; four can, and seven can bear two, by relaying every order and taking the greater count. With seal rings no one can forge, the number of liars stops mattering. Nobody need ever learn who lied.

    In synchronous rounds with oral messages, Byzantine agreement needs n ≥ 3m + 1, and OM(m) reaches it in m + 1 rounds of relaying and majority vote. With unforgeable signatures, SM(m) works for any number of traitors. Both rely on detecting a missing message by the end of a round, and neither needs to identify a traitor.

    Read the book ›
    The papers

    The second wall

    Half cannot speak for all.Quorum bounds.

    If half the camp may fall silent, a wind can hold every bird between the halves until each half commits alone, so more than half must live, with coins or slates alike; only a slate that never chalks one present legislator escapes. If bandits may lie, three cannot bear one liar: four can bear one, seven two. Seals lift that count only while silence can be timed; in the wind it takes four to bear one liar, sealed or not.

    With crash faults, partial synchrony, randomization and eventually accurate detectors all need n ≥ 2t + 1 (with S, any number may crash). Byzantine agreement needs n ≥ 3m + 1 with oral messages; signatures remove the bound only in synchronous rounds; under partial synchrony n ≥ 3t + 1, signed or not.

    From post 2:At p₂: a lying chiefa faulty commander looks like a lying peera faulty lieutenant

    Try it

    Each liar costs three more bandits.Each traitor costs three replicas.

    Choose how many may lie, and see how many it takes to bear them. Then hand out seal rings.Set the number of traitors and see the bound; then add unforgeable signatures.

    Inside the Tholos of Schedia, under the timber rafters of the roof: a legislator in saffron sits writing at her bench while a runner crosses the spiral floor

    Back on Paxos · setting five · Schedia and the TholosLeader-driven replication

    One Law Kept in the Tholos

    A city with laws of its own, governed from a round hall like the Chamber's, through designated writers and rotating random legislators.

    The replication lineage: Viewstamped Replication, Practical Byzantine Fault Tolerance, and HotStuff.

    The Part-Time Parliament, with one change:

    a writer's office and a seala designated primary

    → One Writer at a Time

    The latest seal and line becomes the writer.The highest viewstamp becomes primary.

    One Writer at a Time

    Only the legislator holding the writer's office writes the law, and a line passes once the writer and two of the four copiers hold it. When the writer falls silent, a caller calls a higher seal, and whoever answers with the latest seal and line becomes the new writer and sends out the whole law. A writer who stepped out can write, never pass. Wax is fast but forgets: if most go home at once, the council can stop for good, never wrong.

    Viewstamped Replication: a primary orders operations and commits once a majority holds them. On a view change, the member of a responding majority with the highest viewstamp becomes primary and sends its whole state; a deposed primary cannot commit. A simultaneous crash of a majority halts the group rather than losing a commit.

    Read the book ›

    One Writer at a Time, with one change:

    the writer may liea Byzantine primary

    → Keeping Order Among Liars

    Any two groups of three share an honest legislator.Any two quorums of 2f + 1 share a correct replica.

    Keeping Order Among Liars

    Under sortition, four legislators chosen by lot keep one law scroll in the Tholos, a copy at each bench, and the writer who numbers its lines may lie. A line stands only after two echoes, each gathering three seals of four; any two groups of three share an honest legislator, so no number can hold two lines. A writer who stalls loses the office to the next bench, who must keep every line readied before.

    PBFT: 3f + 1 replicas; the primary assigns sequence numbers; pre-prepare, prepare and commit each need 2f + 1 matching signed messages, and any two such quorums share a correct replica. A view change carries prepared certificates, so committed requests survive; doubling timeouts give liveness once delays stop growing.

    Read the book ›
    The paper

    Keeping Order Among Liars, with one change:

    votes tied into bundlesvotes aggregated into certificates

    → Changing Leaders Among Liars

    A change of writer costs no more than a line.A linear, responsive view change.

    Changing Leaders Among Liars

    Instead of every legislator sending runners across the stone floor to every other, each sends a sealed vote to the writer alone, who ties three into one bundle. A third stage of bundles means any legislator's lock is backed by two honest legislators holding its first bundle, so a new writer learns of it from the first three replies and goes at the messengers' pace, not a sandglass's. The writer's office can pass at every line.

    HotStuff: replicas vote only to the leader, which aggregates 2f + 1 votes into a quorum certificate, so each phase is linear. A third phase makes the view change linear and optimistically responsive: a new leader learns the lock from any n − f replies. Chained HotStuff pipelines the phases and rotates the leader every block.

    Read the book ›
    The paper

    See it

    From everyone-to-everyone, to one bundle.From quadratic to linear.

    Echoes send a messenger from every bench to every other. Bundles send each vote to the writer alone, and one bundle back to each. Add benches and watch the two counts part.All-to-all phases cost n(n − 1) messages; star-shaped phases through the leader cost 2(n − 1). Grow n and compare.

    12messengers, every bench to every othermessages, all-to-all
    6messengers, through the writermessages, via the leader
    A bay of the scholars' coast seen from over the water: the pale shore, olive groves and cypresses climbing behind it with a small library among them, another arm of the sea and low hills beyond

    Paxos · setting six · the Scholars' CoastWeak consistency

    Libraries That Agree in the End

    Libraries up and down a coast, each with its own copies, where nothing ever waits for a vote. The scholars call it concord: everyone here ends of one mind, by merging rather than by assembly.

    Replicas that answer from local state without coordination, and converge only eventually. The question here is what that can still promise.

    Answering While Cut Off, with one change:

    copies may differ for a whileeventual consistency

    → Spreading by Word of Mouth

    Rumour is quick. The festival is thorough.Rumor is fast; anti-entropy is complete.

    Spreading by Word of Mouth

    Libraries answer from their own copies of the compendium and agree only in the end; of two versions of an entry, the larger tally wins. Scholars in the stoa pass fresh news on until most of those they meet already know it, which leaves a few unheard; at the festival, copyists drawn by lot compare whole copies and catch the rest. A withdrawal must travel as a notice, or an old copy brings the entry back.

    Epidemic replication with last-writer-wins timestamps. Rumor mongering is fast and cheap but leaves a residue of about e−m sites for m messages per site; anti-entropy, pairwise reconciliation with random partners, reaches every site. Deletions spread as death certificates.

    Read the book ›

    Watch it

    Four hundred libraries. One new version.400 sites. One update.

    Each scholar who has the news tells one library at random, and gives up half the times it already knew. Then the festival pairs libraries by lot until no one is left out.Push rumor mongering with feedback: an infective site contacts one random site per step and loses interest with probability ½ when the site already knew. Then push-pull anti-entropy rounds with random partners.

    1have heardinfected
    399unheardsusceptible
    0letters sentmessages

    Spreading by Word of Mouth, with one change:

    ask only some of the copiespartial quorums

    → Probably Up to Date

    The odds of an old copy fall with every moment.Staleness, in probability.

    Probably Up to Date

    Each entry has three home libraries that answer for it. The writer announces a version once some of them hold it, and a reader takes the newest of the first few replies. If the two counts add to more than three, the two groups must share a library; many choose one and one, for speed. The odds of an old copy fall with every version the reader will accept and every moment after the announcement.

    With write quorum W and read quorum R over N replicas, R + W > N guarantees intersection, while partial quorums (R + W ≤ N) may read stale data. PBS gives the odds: within k versions, staleness falls as pk; in time, t-visibility comes from the WARS latency model by Monte Carlo.

    Read the book ›

    Try it

    How many to write. How many to ask.Choose W and R.

    The writer waits for some of the three home libraries; the reader asks some. In the worst case the reader asks the ones the writer did not wait for.N = 3. In the worst case the read quorum is chosen as far from the write quorum as it can be.

    The writer waits forW
    The reader asksR

    Spreading by Word of Mouth, with one change:

    merge instead of keeping the latermerge by join instead of last writer wins

    → Changes That Never Clash

    Any order. Any number of times. Always agree.Commutative, associative, idempotent.

    Changes That Never Clash

    An entry in the scholars' compendium is made of parts, each merged by its own rule. The comet's sightings are counted in pebbles, one column per library, each written only by its own library. Merging two boards keeps the larger pile in each column, so boards can meet in any order, any number of times, and always agree. Mistaken sightings go in black pebbles; a struck reference loses only the tags its striker saw. No board alone can keep the count from falling below nothing.

    CRDTs reach strong eventual consistency without coordination. State-based types merge by least upper bound, which is commutative, associative and idempotent; operation-based types need commuting operations delivered exactly once in causal order. Global invariants, such as a count that never drops below zero, still need coordination.

    Read the book ›
    The papers

    Try it

    Merge the boards in any order you like.Merge replicas in any order.

    Each library adds pebbles to its own column only. A merge keeps the larger pile in each column. Record, merge, merge again: once every board has met the news, they agree.A G-counter: each replica increments its own entry; merge is the element-wise max; the value is the sum. Any delivery order converges.

    Answering While Cut Off, with one change:

    whole visits, while cut offtransactions under partition

    → What You Can Promise Alone

    What a librarian can promise alone.What survives a partition.

    What You Can Promise Alone

    A library cut off from every other must still finish each visit. Alone, it can hide unfinished corrections, show a visit's corrections all or none, and hold an answer until the entry it answers arrives; if a reader keeps to one library, the reader also sees their own corrections. No library alone can stop two scholars who each read a count and write it one higher from losing one of the two, or promise the newest version.

    Highly available transactions: read committed, monotonic atomic view, cut isolation, monotonic reads and writes-follow-reads are achievable under partition; read-your-writes, PRAM and causal consistency need sticky clients; preventing lost update or write skew, and so snapshot isolation and serializability, is impossible, as is any recency bound.

    Read the book ›

    At a glance

    Alone, a librarian can promise…Under partition, a replica can offer…

    • ✓to hide unfinished correctionsread committed
    • ✓to show a visit's corrections all or nonemonotonic atomic view
    • ✓to hold a reply until its letter arriveswrites follow reads; monotonic reads; cut isolation
    • ◐to let readers see their own corrections, if they keep to one libraryread-your-writes, PRAM, causal: with sticky clients
    • ✕to keep both of two counts written over the same readingno lost update or write skew: so no snapshot isolation, no serializability
    • ✕to promise the newest versionany recency bound

    The third wall

    Answer, or be right.CAP.

    The last two crosses come from a wall first met across the water. A tent cut off by hawks cannot both answer every question and answer as one with the other tents. With a known flight, waiting a glass keeps the copies as one on every night no bird is lost; when birds may also be late without limit, not even then. So no library alone can keep both of two counts written over the same reading, or promise the newest version.

    The two unavailable guarantees come from CAP. Under message loss, a register cannot be both linearizable and available; with bounded delays, consistency survives in loss-free runs; asynchronously, not even then. Preventing lost update or write skew, and any recency guarantee, are therefore unavailable.

    From the cut-off tent:At the partitioned replica: the plan moveda write completed looks like the plan left as it wasno write at all

    The oracle at the fork from the hillside above its road in the evening light: the pale road climbing through scrub to the low walled enclosure, the great oak and the small tiled temple inside it, and the calm bay and its hills beyond

    Paxos · setting seven · the oracle at the forkCoordination, and when it is needed

    Students Asking Which Life to Lead

    Groups of students who ask an oracle at the fork whether the work they mean to do together lets them live as scholars, apart and never waiting, or makes them live as legislators, who wait for everyone.

    Coordination is needed exactly where a program is not monotone, and nowhere else.

    Changes That Never Clash, with one change:

    from data that only grows to questions that only growfrom monotone data to monotone programs

    → Knowing When to Wait

    Some questions only grow.Monotone means coordination-free.

    Knowing When to Wait

    A question that only grows, such as whether any copy has been made, can be answered as news comes in and is never taken back. One that rests on an absence, such as whether these are all the copies, must hear from everyone, which a librarian with no roster never can. So the oracle sends each group down the road its work's shape decides: south, to live as scholars without a roster, or north, to live as legislators who wait for every name on theirs.

    CALM: a program has a consistent, coordination-free distributed implementation if and only if it is monotone, equivalently if it can be computed without knowing the membership. Deadlock detection is monotone; garbage collection is not. A non-monotone step can be isolated and sealed with a manifest, moved off the critical path, or compensated afterwards.

    Read the book ›

    Watch it

    Every piece of work takes one road.Every computation lands on one side.

    South, to live as scholarsMonotone

    answer as news comes incoordination-free

    North, to live as legislatorsNon-monotone

    must hear from everyoneneeds coordination

    The fourth wall

    An absence needs everyone.CALM.

    A question that only grows needs no waiting and no roster; a question that rests on none, every or only must hear from everyone first. That is why an old notice of withdrawal can be thrown away only when every library has been heard from, why no board alone keeps a count above nothing, and why nothing on the coast that only grows ever waits for an assembly.

    Exactly the non-monotone computations, such as negation, aggregation, global invariants and garbage collection, need coordination; monotone ones run coordination-free, and so stay available under partition.

    From one library:At one node: every name heardall inputs seen looks like one still on the roadone still in flight

    What it all costs

    Every promise is paid for in one of four ways.Every guarantee is paid for in one of four costs.

    And the walls say which promises nothing can buy together.And the impossibility results say which combinations no cost can buy.

    WaitingCoordination

    for others to answer: the Chamber, the Tholos, the central scroll, the road north from the oracle.quorum round trips: Paxos, VR, PBFT, HotStuff, a CAP primary, non-monotone steps.

    More membersReplicas

    than may fail: more than half against silence, four to bear one liar.n ≥ 2f + 1 for crashes, n ≥ 3f + 1 for Byzantine faults.

    A little certaintyCertainty

    a coin's probability one, a few libraries unheard until the festival, the odds of an old copy, agreement only in the end.probability-1 termination, gossip residue, probabilistic staleness, eventual consistency.

    BookkeepingMetadata

    a column for every house, notices that pile up, stored seals and checkpoints, every promise in ink.vector clocks, tombstones, message logs and checkpoints, stable storage.

    The series in one breath

    Places that share no clock and talk only by messenger can still act as one. They order what happens by counting slips, not by reading the sun. They decide by waiting for most of them, never all, since any two majorities share a member, and every new attempt carries forward what most of them last held. Each liar costs three more bandits, unless seals expose the liar while time can be kept. No fixed plan is sure to finish when an absent colleague may only be slow, and no tent cut off from the rest can both answer and be right; but whatever only grows can be merged in any order, with no one waiting at all.

    Processes that share no clock and communicate only by messages can still behave as one. Logical and vector clocks order events by causality, and linearizability defines what behaving as one copy means. Consensus waits for a quorum, never for all, because any two majorities intersect, and every new ballot, view or term carries forward the latest value a quorum accepted. Byzantine faults need n ≥ 3f + 1, unless signatures and synchronous rounds remove the bound. FLP rules out guaranteed termination for deterministic consensus with one crash in an asynchronous system, and CAP rules out availability with linearizability under partition; but monotone computations, such as CRDTs, need no coordination at all.

    Start where the walk starts.Start with logical time.