Estimate the scale of the system you are going to design...
# REST Examples
GET /file/path/to/file.txt
PUT /file/path/to/file.txt
POST /file/path/to/file.txt?append=true
DELETE /file/path/to/file.txt
nodes Table – Files and Directories
TABLE nodes (
id,
name ,
parent_id,
is_directory,
size,
created_at,
modified_at,
permissions,
owner_id UUID,
);
chunks Table – Logical Data Blocks
TABLE chunks (
id,
node_id,
chunk_index,
checksum,
size,
);
locks Table – Distributed Locking
TABLE locks (
node_id ,
client_id,
lock_type TEXT CHECK (lock_type IN ('read', 'write')),
acquired_at,
expires_at ,
PRIMARY KEY (node_id)
);
Explain how the request flows from end to end in your high level design. Also you could draw a sequence diagram using the diagramming tool to enhance your explanation...
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
Explain any trade offs you have made and why you made certain tech choices...
Try to discuss as many failure scenarios/bottlenecks as possible.
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?