DropBox 00:00:01 A small edit inside a large file A designer changes one spread of a large portfolio on her laptop. Design a Dropbox-style synchronizer that transfers the changed content and a new version manifest without assuming every byte needs another trip. The operating system reports the change. The device waits until the file rests. Four megabytes at a time, so a file larger than memory is no problem. The list of names is the new version. Its order matters. Only block 2 is new. Sixteen megabytes became four. Block size is a design choice: small blocks can save transmission after small edits while increasing metadata and hashing work. Profile realistic files and edit patterns. 00:00:46 Upload the missing blocks, then publish a manifest Compare the local block identifiers with the blocks this account is authorized to reuse. Upload missing blocks first. A file version should become visible only when every referenced block is durably available. Twenty-five names for a 100 MB file, the size, and the namespace. Straight to the store, with its SHA-256 checksum. Our servers do not touch the bytes. A version may only list blocks that exist. Marks for clean-up are removed here. The journal entry becomes an event: wake devices, scan, index. Tie the manifest commit to the expected parent version. A network break after some blocks arrive can leave reusable temporary data without exposing a half-complete file. 00:01:36 Another device catches up from its cursor The designer's phone receives a change hint. Hints are expendable. A retained, ordered change feed lets the phone ask what happened since its last successfully applied cursor. The phone keeps one connection open while the app is in use. The phone sends its cursor: 8120. With a signed address. A private block rarely sits at an edge, so it comes from the store. After applying. A crash before this line only repeats the work. Verify blocks and assemble the new version before advancing local progress. If the device crashes between those actions, replay must safely reapply the same change. 00:02:17 Deduplication must respect ownership A block with matching content may already exist. Reusing it can save bandwidth, but exposing an arbitrary global existence test can disclose information about someone else's files. One call for the whole file instead of one per block. In this example the first block is already accessible within the user's own authorized folder, so the client can avoid transferring it again. The laptop sends h2 and h3 with their checksums. No counter is raised. Clean-up reads the lists of live versions instead. Check authorization before acknowledging reusable content. Reference tracking and garbage collection must preserve every block still named by a live or retained version. 00:03:00 Two offline edits meet The laptop and phone both edited version one without seeing the other's change. The first new manifest can commit against version one. The second is now based on an obsolete parent. The laptop changes a page. It remembers: based on version 1. It commits with base 1. The current version is 1. 409. Nothing was overwritten, and the blocks are already stored. It reads version 2 and shows both. The person is told and decides. Preserve both users' work through a conflict copy, supported merge or explicit user decision. Fast synchronization is useful only when a returning device cannot quietly erase a newer edit.