Site A characters / row Site B characters / row Operation in flight
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Operational Transform: Converging Concurrent Edits

Two simulated mobile clients, A and B, edit the same text buffer at once over a connection with real latency. Every keystroke becomes a genuine insert/delete operation that applies instantly on its own device and travels to the other after the configured delay; the classic Operational Transform rules — the same insert-vs-insert, insert-vs-delete and delete-vs-delete transform functions used by real collaborative editors — shift each incoming operation's index to account for what the receiving side already did locally, so both documents provably converge to one identical string no matter the order operations arrive in. Switch OT off and the very same edits apply at their raw, untransformed positions instead, and the two rows of characters drift apart in real time — a direct, visual demonstration of why naive last-write-wins syncing corrupts shared documents on real mobile networks.