Real Differences between OT and CRDT for Co-Editors
OT (Operational Transformation) was invented for supporting real-time co-editors in the late 1980s and has evolved to become a core technique used in today’s working co-editors and adopted in major industrial products. CRDT (Commutative Replicated Data Type) for co-editors was first proposed around 2006, under the name of WOOT (WithOut Operational Transformation). Follow-up CRDT variations are commonly labeled as “post-OT” techniques capable of making concurrent operations natively commutative, and have made broad claims of superiority over OT solutions, in terms of correctness, time and space complexity, simplicity, etc. Over one decade later, however, CRDT solutions are rarely found in working co-editors, while OT solutions remain the choice for building the vast majority of co-editors. Contradictions between this reality and CRDT’s purported advantages have been the source of much debate and confusion in co-editing research and developer communities. What is CRDT really to co-editing? What are the real differences between OT and CRDT for co-editors? What are the key factors that may have affected the adoption of and choice between OT and CRDT for co-editors in the real world? In this paper, we report our discoveries, in relation to these questions and beyond, from a comprehensive review and comparison study on representative OT and CRDT solutions and working co-editors based on them. Moreover, this work reveals facts and presents evidences that refute CRDT claimed advantages over OT. We hope the results reported in this paper will help clear up common myths, misconceptions, and confusions surrounding alternative co-editing techniques, and accelerate progress in co-editing technology for real world applications.
💡 Research Summary
The paper conducts a comprehensive comparative study of Operational Transformation (OT) and Commutative Replicated Data Types (CRDT) as the two dominant consistency‑maintenance techniques for real‑time collaborative editors. It begins by outlining the three classic consistency requirements—causality preservation, convergence, and intention preservation—and introduces a general transformation‑based framework that both OT and CRDT implicitly follow. Within this framework, the authors dissect the concrete mechanisms each approach uses to achieve consistency.
OT, invented in the late 1980s, works with position‑based operations that are sent unchanged across the network. Each site maintains an operation buffer and a set of generic control algorithms. When a remote operation arrives, the control algorithm selects concurrent local operations from the buffer and applies one of four transformation functions (Tii, Tid, Tdi, Tdd) to adjust positions, thereby producing a transformed operation that can be safely applied. The transformation functions are simple, deterministic, and have O(1)‑to‑O(log n) cost. Extending OT to richer data models (rich‑text, spreadsheets, 3D models) merely requires redefining the transformation functions while reusing the same control logic. OT also supports garbage collection of buffered operations once they can no longer be concurrent, keeping memory usage bounded.
CRDT, first introduced as WOOT in 2006, takes a different route. It assigns immutable identifiers to every character or object and represents deletions as tombstones. User‑generated position‑based edits are first mapped to identifier‑based operations that manipulate the internal identifier sequence. Because identifiers are globally ordered, the operations are theoretically commutative, eliminating the need for explicit transformation functions. However, the paper shows that CRDT still performs an implicit transformation: the mapping from external positions to internal identifiers must consider concurrent inserts and deletions, and the identifier generation scheme must guarantee uniqueness and order. In practice, this leads to several costly side‑effects. Identifier lengths can grow logarithmically or even linearly with the number of edits, and tombstones accumulate, causing both memory bloat and O(n)‑type processing overhead for look‑ups and merges. Conflict‑resolution mechanisms for identifier collisions add further algorithmic complexity.
The authors argue that while both families share the same high‑level transformation philosophy, their low‑level realizations diverge dramatically in terms of correctness guarantees, computational complexity, and engineering practicality. OT’s explicit transformation functions make correctness proofs more straightforward and enable efficient implementations that scale to large documents and high edit rates. CRDT’s reliance on identifier management introduces hidden costs that have prevented its widespread adoption in production systems. Empirical evidence from industry shows that major collaborative platforms—Google Docs, Microsoft Office 365, and numerous startup editors—use OT as their core consistency engine, whereas CRDT‑based editors remain largely experimental or confined to plain‑text prototypes.
Beyond performance, the paper highlights functional extensibility. OT naturally integrates with higher‑level features such as group undo, awareness, and rich‑text formatting because these features can be expressed as additional transformation rules. CRDT, by contrast, requires substantial redesign of its identifier scheme and tombstone handling to support such extensions, making it less flexible for evolving product requirements.
In conclusion, the study refutes the common myth that CRDT is inherently superior to OT for collaborative editing. Both approaches are transformation‑based, but OT’s simpler, lower‑overhead design aligns better with real‑world constraints, while CRDT’s theoretical elegance is offset by practical scalability issues. The paper suggests future research directions: reducing CRDT’s identifier and tombstone overhead, hybrid approaches that combine OT’s efficient transformation with CRDT’s commutative guarantees, and more rigorous benchmarking of both paradigms in production‑scale environments.
Comments & Academic Discussion
Loading comments...
Leave a Comment