System Design · Citadel · Medium
Design an in-memory file store that keeps a single retained copy of each distinct byte sequence while allowing multiple exact path names to reference that copy. A naive implementation hashes every written file and, when the hash already exists, points the new path to whichever path first stored those bytes. Improve this baseline in two ways: avoid computing a content hash unless it is truly needed, and permit path deletion without breaking other paths that still share the…
Checking your access…