When Two Writes Must Stay in Order and the Rest May Not
System Design

When Two Writes Must Stay in Order and the Rest May Not

Subtitle: Only linked writes are fixed in order. Left column - Causally related (order is fixed): - You read a value, then you write - Your write depends on that read - Every replica shows that order - Never reordered, anywhere Right column - Concurrent (order is free): - No read-then-write chain links them - Neither write saw the other - Replicas may apply them in any order - Different replica, different order The boss photo case: - 1. You drop the boss from the list - 2. You post the photo - 3. Post lands first, he sees it - Causal order forbids that swap Where it breaks: - It cannot see causality outside it - You phone a colleague, they write - No edge exists: the hidden channel - Stamps grow with the writer count - Truncated clocks quietly weaken it How replicas enforce it: - A dependency stamp, not a clock - Vector clocks ride with a write - Apply waits for what it needs - Strongest one up in a partition