1) Authentication & Authorization - Users should able to login and based on document access can do the operation.
2) multiple Users can view ,edit and manage spread sheets.
3)
1) Highly available
2) Consistent
3) Low latency
GET /api/v1/view/{user_id}/{doc_id}
Returns the metadata and the files to be viewed
2)create :
Post /api/v1/create/{doc_id}
return the complete docs for editing
1) User table to hold user specific information
User_id :uuid
user_name:string
email_address:string
primary column is user_id
2) workspace table holds owners infrmation and sharing status
workspace_id: uuid
user_id: uuid
is_shared:boolean
created_at:timestamp
3) file table hold file meta data information
file_id: uuid
file_name:string
create_at:timestamp
updated_at:timestamp
workspace_id:uuid
1) We have two flow first for metadata where the request will come to webserver via API gateway and stored in the database.
2)the file will be uploaded to block server in chuncked manner than upload to blob storage and notify the customer that the file is uploaded.
3)when view API is called it will be fetched from CDN 4) if any user who has access to file wants to update the spread sheet that particular row will be locked and other users can fetch write on the row which is not locked by other users.
1)For View/Read - Users will be authentication and authorized and then will fetch the file from CDN .
2) For Create/Edit - Fetch the file from CDN and can be edit and particular row will be locked for others other than user doing write there.
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?