Design client-server file sync with a Merkle tree
I was asked this
No reports yet. Sign in to say where you were asked it.
A server publishes immutable versions of a directory tree, and clients keep local mirrors in sync with a chosen version. Every file has a content hash and every directory a hash of its children's hashes.
Design the sync: what snapshot metadata the server keeps, how a client compares root hashes and walks down only into subtrees that differ, how the resulting plan covers new, changed and deleted files, how only the needed content is transferred, how an interrupted sync resumes safely against the same version, and how the client verifies the rebuilt root hash before reporting success. Also cover caching and what you would monitor. Two-way editing and conflict resolution are out of scope.
No official answer yet. Draw yours on the right; publish it and it shows under Community.
Nothing published yet. Publish your canvas and it shows here for others to open and remix.
