Skip to main content

Real-time Doc Collaboration (Google Docs)

Difficulty: Hard

What It Tests

Conflict-free collaborative editing, cursor sync, version history, convergence guarantees.

Topics Covered

Hello Interview Breakdown

Read the full Hello Interview breakdown →

Video Walkthroughs

Approach Hints

  • Use Operational Transformation (OT) — each client sends operations; the server transforms concurrent ops before applying and broadcasting
  • A central server serializes all operations to guarantee convergence: all clients reach the same document state regardless of arrival order
  • Persist the full operation log for version history and point-in-time restore; take periodic snapshots to avoid replaying the full log
  • Separate cursor/selection sync (100ms update rate, ephemeral) from document content sync (apply + broadcast on every op)