Design Comments for a Collaborative Whiteboard
Company: Figma
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Technical Screen
# Design Comments for a Collaborative Whiteboard
Design comments for a real-time collaborative whiteboard. The product details below are practice assumptions used to make the prompt self-contained.
### Constraints & Assumptions
- A comment thread can be anchored to an object or a board coordinate.
- Authorized collaborators can create, reply, edit, delete, resolve, mention, and observe comments.
- A board can have thousands of active collaborators and far more occasional viewers.
- Comment durability matters more than sub-second presence; live updates should normally arrive within one second.
- Object edits, moves, and deletion can occur concurrently with comment actions.
### Clarifying Questions to Ask
- What permissions differ among board owners, editors, commenters, and viewers?
- Should anchors move with objects, and what happens when an object is deleted?
- Are edit history, offline clients, moderation, search, and notifications required?
- What ordering guarantee do clients expect within a thread?
### Part 1: Data and API Contract
Define comment-thread, reply, anchor, mention, and permission data. Specify write APIs, idempotency, pagination, and conflict behavior.
#### Hints
- Treat a comment body and its anchor as independently evolving data.
#### What This Part Should Cover
- Stable identifiers and versions
- Permission checks and auditability
- Anchor lifecycle
### Part 2: Real-Time Delivery
Describe how clients subscribe, catch up after disconnection, handle reordered or duplicate events, and avoid coupling durable writes to slow viewers.
#### Hints
- A snapshot plus a position in an event stream can simplify recovery.
#### What This Part Should Cover
- Durable-to-live event path
- Ordering and deduplication
- Fan-out and backpressure
### Part 3: Reliability and Product Edges
Cover concurrent edits, object deletion, mentions, notification retries, abuse, hot boards, and observability.
#### Hints
- Decide which operations may be eventually consistent.
#### What This Part Should Cover
- Explicit conflict semantics
- Decoupled side effects
- Hot-key and failure handling
### What a Strong Answer Covers
- A durable, permission-aware comment model
- A coherent anchor and deletion policy
- Reliable live synchronization with reconnect semantics
- Scalable fan-out, asynchronous notifications, and measurable correctness
### Follow-up Questions
- How would offline comment creation synchronize?
- How would you support text ranges inside editable objects?
- What changes for a board viewed by a million people during a launch?
- How would legal retention interact with user-visible deletion?
Quick Answer: Design durable comments for a real-time collaborative whiteboard. Define anchors, permissions, versioned writes, thread ordering, reconnect and deduplication semantics, scalable fan-out, asynchronous mentions, concurrent object edits, and hot-board failure handling.