Case 9
OT, CRDTs, and Conflict-Free Editing
Concurrent edits merge without a single global lock. OT needs a server; CRDTs can peer-sync.
OTCRDTYjsFigmaoffline sync
An interactive study companion for Martin Kleppmann's classic on reliable, scalable, and maintainable systems.
Concurrent edits merge without a single global lock. OT needs a server; CRDTs can peer-sync.
Multiplayer editing uses a central server to order operations and broadcast deltas. CRDT research powers newer whiteboard features with less server coupling.
// CRDT document sync (Yjs-style conceptual)
import * as Y from "yjs";
const doc = new Y.Doc();
const text = doc.getText("content");
text.insert(0, "Hello");
const update = Y.encodeStateAsUpdate(doc);
// Broadcast update to peers; merge is commutative — no central lock