Many cursors, one document
Several people type in the same document at once. Their edits arrive out of order and overlap. The system must converge everyone to the same final text without losing keystrokes.
Operational transformation
Each edit is an operation like insert at position five or delete three characters. When two operations were made against the same starting state, the server transforms one against the other so applying both in any order yields the same result.
- Edits are modeled as operations with positions
- Concurrent operations are transformed to account for each other
- Every client converges to one identical document
A server that orders
A central server assigns a global order to operations and rebroadcasts transformed ops. Clients apply incoming ops against their local state, transforming as needed, and the document stays consistent.
Convergence does not require locking the document. Instead it rewrites concurrent operations so their effects compose cleanly.
Key idea
Model edits as operations and transform concurrent ones against each other through an ordering server, so every collaborator converges to one identical document without locks.