System Design Article

Design Google Docs (Collaborative Editing)

Difficulty: Hard

Design a real-time collaborative document editor like Google Docs where 1B+ users can co-edit the same document with sub-200 ms latency, never lose a keystroke, and converge to the same state across all clients regardless of network conditions. The interview centerpiece is concurrency control: how to merge two users' simultaneous edits without conflicts. We compare Operational Transformation (OT, used by Google Docs) and Conflict-free Replicated Data Types (CRDT, used by Figma, Notion, Linear), explain the convergence problem (TP1, TP2 properties), walk through cursor presence, and design the document storage as an append-only operation log compacted into snapshots.

System Design
/

Design Google Docs (Collaborative Editing)

Design Google Docs (Collaborative Editing)

Design a real-time collaborative document editor like Google Docs where 1B+ users can co-edit the same document with sub-200 ms latency, never lose a keystroke, and converge to the same state across all clients regardless of network conditions. The interview centerpiece is concurrency control: how to merge two users' simultaneous edits without conflicts. We compare Operational Transformation (OT, used by Google Docs) and Conflict-free Replicated Data Types (CRDT, used by Figma, Notion, Linear), explain the convergence problem (TP1, TP2 properties), walk through cursor presence, and design the document storage as an append-only operation log compacted into snapshots.

System Design
Hard
design-collaborative-editor
case-study
unique-specialized
google-docs
collaborative-editing
operational-transform
crdt
real-time-sync
websockets
presence
vector-clock
event-sourcing
consistency-models
system-design
advanced
premium

267 views

4

This system design article is available for premium members only.

Upgrade to Premium