Practice/Meta/Design Multi-player Figma
Design Multi-player Figma
Product DesignOptional
Problem Statement
Design a distributed system that enables teams to collaborate on a shared digital whiteboard in real-time, similar to Miro or Mural. Multiple users should be able to simultaneously draw, add sticky notes, move objects, and see each other's changes with minimal latency. The system must handle conflicts gracefully when users modify the same objects, maintain a consistent view across all participants, and scale to support thousands of concurrent collaboration sessions with varying team sizes from 2 to 100 participants per board.
The platform should support rich interactions including freehand drawing, text editing, object manipulation (move, resize, rotate), and collaborative cursors showing where each participant is working. Consider that boards can become large with thousands of objects, and users expect smooth 60fps rendering even during heavy collaborative activity.
Key Requirements
Functional
- Real-time synchronization -- all participants see changes within 100-200ms with no manual refresh
- Conflict resolution -- handle concurrent edits to the same object without data loss or corruption
- Operational history -- support undo/redo operations that work correctly in a multi-user environment
- Presence awareness -- display live cursors, selections, and active editing states for all participants
- Persistence and versioning -- save board state continuously and enable recovery from any point in time
Non-Functional
- Scalability -- support 10,000+ concurrent boards with varying participant counts (2-100 users per board)
- Reliability -- ensure no data loss even during network partitions or server failures
- Latency -- achieve sub-200ms propagation delay for operations between any two clients
- Consistency -- maintain eventual consistency across all clients while preserving operation intent
What Interviewers Focus On
Based on real interview experiences, these are the areas interviewers probe most deeply:
1. Data Synchronization Strategy
The core challenge is propagating changes between clients efficiently while maintaining consistency. Interviewers want to see how you handle the fundamental tension between low latency and data integrity.
Hints to consider:
- Operational Transformation (OT) vs Conflict-free Replicated Data Types (CRDTs) for handling concurrent edits
- Whether to use a centralized server as the source of truth or enable peer-to-peer synchronization
- How to batch operations to reduce network overhead without increasing perceived latency
- Strategies for handling large boards where sending the full state would be prohibitive
2. Conflict Resolution Mechanisms
When two users modify the same object simultaneously, the system must reconcile these changes deterministically across all clients.
Hints to consider:
- Last-write-wins vs semantic merge strategies and their tradeoffs
- How to maintain causal ordering of operations (vector clocks, Lamport timestamps)
- Handling transform conflicts like simultaneous move and delete of the same object
- Whether to show conflicts visually to users or resolve them automatically
3. Network Architecture and Protocol Design
The choice of communication protocol dramatically impacts latency, scalability, and implementation complexity.
Hints to consider:
- WebSocket vs WebRTC vs HTTP/2 Server-Sent Events for bidirectional communication
- Whether to route all messages through a central server or enable direct client-to-client channels
- Message format design (JSON vs Protocol Buffers vs custom binary) and compression strategies
- Handling network partitions and reconnection without losing operations or creating duplicates
4. State Management and Storage
Efficiently representing the board state affects both memory usage and synchronization speed.
Hints to consider:
- Data structure for storing objects (spatial indexing for rendering and collision detection)
- Incremental vs snapshot-based persistence strategies
- How to implement undo/redo in a distributed environment (inverse operations vs state snapshots)
- Database choice for durable storage (document store vs relational vs specialized graph database)
5. Performance Optimization
With potentially thousands of objects and dozens of simultaneous editors, naive implementations will struggle.
Hints to consider:
- Viewport-based filtering to only sync visible objects for clients
- Throttling and debouncing strategies for high-frequency operations like dragging
- Optimistic UI updates with rollback capability if server rejects changes
- Canvas rendering optimization using dirty rectangles and layering