Prepare for a real-time collaborative comments system design prompt for shared documents or canvases. The question covers durable comment writes, WebSocket fanout, reconnect backfill, ordering, permissions, hot-document scaling, and missed-update recovery.
Design a real-time commenting system for a collaborative canvas or document. Users should see new comments quickly, receive updates on threads, and recover conversation history when they reopen the document.
<details>
<summary>Hint 1</summary>
Start by naming the core entities, constraints, and success criteria.
</details>
<details>
<summary>Hint 2</summary>
Make the trade-offs explicit before going deep on implementation details.
</details>
### Constraints & Assumptions
- Users collaborate on shared documents or canvases.
- Comments can be created, updated, resolved, and loaded later.
- Real-time delivery is important but durable history is required.
- The design should support many users viewing the same popular document.
### Clarifying Questions to Ask
- Do comments attach to document positions, objects, or free-form coordinates?
- Are edits and deletes required?
- What latency target defines real-time?
- Should offline users receive notifications?
- How are permissions inherited from the document?
### What a Strong Answer Covers
```premium-lock What a Strong Answer Covers
```
### Follow-up Questions
- How would you handle a user reconnecting after missing updates?
- How would you scale one document with thousands of viewers?
- How would you support comment anchors that move?
- What consistency guarantee do users need after posting?
Quick Answer: Prepare for a real-time collaborative comments system design prompt for shared documents or canvases. The question covers durable comment writes, WebSocket fanout, reconnect backfill, ordering, permissions, hot-document scaling, and missed-update recovery.
Design a real-time commenting system for a collaborative canvas or document. Users should see new comments quickly, receive updates on threads, and recover conversation history when they reopen the document.
<details>
<summary>Hint 1</summary>
Start by naming the core entities, constraints, and success criteria.
</details>
<details>
<summary>Hint 2</summary>
Make the trade-offs explicit before going deep on implementation details.
</details>
Constraints & Assumptions
Users collaborate on shared documents or canvases.
Comments can be created, updated, resolved, and loaded later.
Real-time delivery is important but durable history is required.
The design should support many users viewing the same popular document.
Clarifying Questions to Ask Guidance
Do comments attach to document positions, objects, or free-form coordinates?
Are edits and deletes required?
What latency target defines real-time?
Should offline users receive notifications?
How are permissions inherited from the document?
What a Strong Answer Covers Premium
Follow-up Questions Guidance
How would you handle a user reconnecting after missing updates?
How would you scale one document with thousands of viewers?
How would you support comment anchors that move?
What consistency guarantee do users need after posting?