Estimate the scale of the system you are going to design...
user uploading will be by default added as admin for the file
6. deleteFolder POST /dropbox/create-folder
NO SQL database is the right choice as we are dealing unstructured data but for access control we need structured datas which can work for the worlds
User details
Metadata of file
File details related to s3 where it is uploaded
access control of the file it checks here if any other user then admin has access to read/ write etc.
Postgres is the right choice or mongo
AWS S3 for storage
caching the metadata
fecthing presigned url from s3 and storing in file details
ACID to be taken care it should not happen user added access to some other use but some other user removed it
caching eventual will also work but saga pattern to be implemented it should be delete from s3 + clear all metadata from tables
we can use multiple service one for metadata other for files data so that meta service is reusable
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?