The encyclopedia · R&D & Science · Technical decision · 2011-2018
CRDTs let replicas diverge and still converge without locks
Conflict-free replicated data types make concurrent edits commute, so offline replicas merge safely — the foundation under Figma-style multiplayer.
INRIA · University of Cambridge
the move
Multi-user editing faces a fundamental problem: when two people edit the same document offline or on different connections, both copies change, and someone must reconcile them. Traditional approaches either lock parts of the document — blocking collaboration — or use operational transformation, whose state combinations explode and are famously hard to prove correct.
In 2011, Marc Shapiro and colleagues proposed conflict-free replicated data types (CRDTs): data structures engineered so that concurrent updates commute. If every update commutes and merges are associative, replicas that diverged can be merged in any order and still converge to one identical state, with no central coordinator and no conflict dialog. Registers, counters, sets and text editors can all be built this way.
The theory hardened over the next years: the 2018 OpSets paper by Martin Kleppmann and colleagues built an executable framework that mechanically verifies replicated-datatype algorithms, exposed a correctness property for collaborative text that several published algorithms violated, and specified an atomic move operation previously thought impossible without locking.
Production systems adopted the idea. Figma's multiplayer engine is explicitly inspired by CRDT research: its server-authoritative, per-property design works like a last-writer-wins register, chosen after the company rejected operational transformation as unnecessarily complex. Redis, Riak and Cosmos DB ship CRDT-based data types, and Apple's Notes uses CRDTs to sync offline edits between devices.
why it works
- Commutative merges make the outcome independent of update order
- Replicas can edit offline and converge without any central authority
- Mechanical verification replaced hand-waved proofs of correctness
- Figma-style products got real-time collaboration without OT's complexity
what transfers
If the coordination is the bottleneck, redesign the data so coordination is unnecessary: choose operations whose results are order-independent, and concurrent users get consistency for free.
what came after
CRDTs are now the standard answer for offline-first collaboration and replication: Figma's multiplayer sync, Apple Notes, Redis and Riak data types, and peer-to-peer editing tools build on the idea, and the research line continues with the hard parts of text editing, tree moves and Byzantine settings.
references
- OpSets: Sequential Specifications for Replicated Datatypes
- How Figma's multiplayer technology works
- Conflict-free replicated data type
spotted an error? The archive wants to know.