Problem Statement: Google Docs Real-Time Editing
What we are building and why convergence under concurrency is the core
Problem Statement: Google Docs Real-Time Editing
We are designing the real-time editing engine behind a collaborative document editor: many people type into the same document at the same time and every one of them must end up with the identical document, character for character, while seeing each other's changes within a heartbeat. The fact that defines the architecture is convergence under concurrency. Two people editing the same position generate operations against different document states, so you cannot simply apply edits in arrival order; you must reconcile them so all replicas converge.
The cleanest way to reason about the system is a two-plane split. The control plane handles auth, document ownership, sharding, and the session registry that maps a document to the server currently coordinating it. The data plane is the real-time path: the operational-transformation (OT) engine that orders and transforms edits, the fan-out that pushes transformed operations to every connected editor, and the catch-up path that resynchronizes a client that fell behind. State this framing up front, because every later decision, from storage to scaling to failure handling, lands cleanly on one of these two planes.
Key Highlights
- •Convergence under concurrency is the core problem, not storage
- •Control plane: auth, ownership, sharding, session registry
- •Data plane: OT engine, fan-out, catch-up resynchronization
- •Concurrent edits are generated against different document states
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "This is a convergence-under-concurrency problem, organized as a control plane plus a data plane."
- "Concurrent edits are generated against different states, so they must be transformed to converge."