Design a Real-Time Collaborative Document Editor

Problem

Design Notion's real-time collaborative editor where many users edit the same block tree simultaneously.

Requirements

Functional:

  • Multiple users edit concurrently, see changes live
  • Conflict-free merging of edits
  • Offline edits reconcile on reconnect
  • Full-text search across blocks

Non-functional:

  • Millions of docs, many collaborators each
  • Low-latency sync
  • No lost edits

Discussion points

  1. CRDT vs OT for conflict resolution
  2. Block tree storage and fractional indexing for order
  3. WebSocket sync and presence
  4. Offline reconciliation
  5. Search indexing pipeline
added …
LeaderboardSalaryAccount