Design: a file sync service
The core idea
A file-sync service carries changes between a remote folder and devices that may be offline.
It has to move the right bytes, distinguish an edit from a retry, and preserve work when two devices change the same file.
In this lesson
- What should the folder promise?
- The device needs a memory of the last sync
- Separate agreement from byte transfer
- Prepare the pieces of an edit
- Publish a revision, then acknowledge it
- Two edits and one lost reply
- Learn changes without losing the obligation to apply them
- Rename and deletion need identity rules
- Reclaim storage without breaking history
- Size the two workloads separately
- Run the complete history
Continue reading
Pro unlocks video lessons, visual walkthroughs, full notes, diagrams, case studies, and implementations across the System Design archive.