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
- CRDT vs OT for conflict resolution
- Block tree storage and fractional indexing for order
- WebSocket sync and presence
- Offline reconciliation
- Search indexing pipeline
added …