Katkat

Design Real-Time Collaborative Comments

FigmaSoftware Engineer · Technical Screen

Last updated

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.

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?

Hints

Hint 1

Hint 1: Start by naming the core entities, constraints, and success criteria.

Hint 2

Hint 2: Make the trade-offs explicit before going deep on implementation details.

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?