Every action is broken down into operations accompanied by an identifier for the baseline reference it occurred on. There is a globally identified set of “accepted” operations that clients know how to apply.
If two users perform actions at the same time, incoming operations are transformed to include the local operations that happened before that baseline.
Many implementations were wrong, only leading to the following to work:
- Server-based OT, splitting multi-user collaboration into groups where each client pairs individually with the server. The server coordinates the document state and operation list to ensure that transformation only ever occurs within these pairs, thus avoiding the complexity (and edge cases) of three-way transforms.
- OT with what's known as "transform property 2". CP2/TP2 finally gave the community a provably correct multi-way transformation algorithm, but it turned out to be _so complex_ that very few data structures have working TP2 implementations.
from https://www.tiny.cloud/blog/real-time-collaboration-ot-vs-crdt/
https://www.tiny.cloud/blog/real-time-collaboration-ot-vs-crdt/