Operational Transformation, CRDTs, and Offline Collaboration
Collaborative editors merge concurrent changes from multiple clients. Operational Transformation transforms operations against concurrent operations under a coordination protocol. CRDTs define mergeable data structures that converge under specified conditions and can support offline updates.
Neither approach is universally superior. Consider offline duration, ordering, undo/redo, cursor positions, document size, server authority, and metadata growth. Tombstones and old operation history need compaction and retention policies.
A sync protocol should use stable operation IDs, acknowledgments, version cursors, and snapshots. Clients that reconnect from an expired history position need a full snapshot and a defined reconciliation path. Authorization must be checked for each document action, not only at initial connection time.
- OT transforms operations; CRDTs provide defined convergence semantics.
- Offline support adds metadata and compaction costs.
- Snapshots and cursors make synchronization recoverable.