CRDTs and Operational Transform
·1 min
- CRDTs and Operational Transform algorithms both try to achieve the same purpose: how to support Google Doc style collaborative edits?
- OTs require a central server whereas CRDTs allow decentralization. The latter is important in cases where you just want to sync your mobile phone with computer when they are offline: Google Doc doesn’t support that.
- Automerge, a library implementation of CRDTs, supports a neat algorithm to ensure convergence: conflicts are unavoidable in some situations but, at the minimum, all parties should converge to one version.
- Only supports data structures: network transport is a separate concern and can vary.
- I think you only transport operations within participants, not the state. Participants arrive at common state when they apply their own and incoming operations.
- The order in which operations are applied doesn’t matter: end state will be consistent.