Design Two-Way Desktop Sync for Box Drive With Offline Edits

Last updated: November 29, 2026

Quick Overview

Design the client and server pieces that keep a user's desktop folder and their Box cloud folders in sync in both directions, including offline edits, renames and moves, and conflicting changes from collaborators.

Box
System Design
Software Engineer
Box
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design the client and server pieces that keep a user's desktop folder and their Box cloud folders in sync in both directions, including offline edits, renames and moves, and conflicting changes from collaborators.

Box Drive exposes a user's entire Box account as a local folder and has to reconcile local file system changes with a cloud tree that many collaborators edit. A hard design round expects a change feed with cursors, a local state database, a three-way reconciliation model, and a careful conflict policy that never loses user work.

What the Interviewer Expects
  • Uses a server change feed with a durable cursor instead of polling every folder
  • Keeps a local database of the last synced state as the merge base
  • Reconciles local, remote, and base in a three-way comparison per item
  • Identifies items by stable ids so renames and moves are not delete plus create
  • Defines conflict outcomes that preserve both versions
  • Handles large uploads with resumable chunked sessions
Key Topics to Cover
Change feeds and cursors
Three-way merge
Conflict resolution
Resumable uploads
Client-side state
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you detect local changes reliably on macOS and Windows, and what if the watcher misses events?
  • How would you support on-demand (placeholder) files so a 2 TB account does not fill the laptop?
  • A folder is moved remotely while a user is adding files to it offline. Walk through the result.
  • How do you stop a sync bug from mass-deleting files in the cloud?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Bidirectional sync of files and folders, with offline work, renames, moves, deletes, and collaborator edits. Never silently lose data, converge after reconnect, respect permissions (a viewer cannot up...

High-Level Design

Server: an event stream per user (GET /events?stream_position=... with long-poll) emitting item-level changes with item id, parent id, name, version, and etag. Client: a file system watcher (FSEvent...


Submit Your Answer
Markdown supported

Related Questions