Skip to content
StackDecode
System Design
20. System Design Case StudiesAnimated

Real-Time Collaboration Platform (Google Docs)

Many people edit the same document live.

The idea

Operational transformation or CRDTs merge concurrent edits through a collaboration server.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

AliceBobCollab serverOT / CRDT engineDocument store
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Both edit at once over WebSockets.

step:
1/4
at:
Alice
1/11

The green dot is a request moving through the system.

Step by step

  1. 1Client sends an edit
  2. 2The server transforms it against others
  3. 3Broadcast to collaborators
  4. 4Everyone converges

Where it is used

Real-time editors.

Watch out for

Ordering and offline merging.

Related