Loading...
These are the specific functionalities that the system must support:
Size per spreadsheet = 100 rows * 10 columns * 100 bytes = 100,000 bytes (or ~100 KB)
Total spreadsheets = 10,000 users * 5 spreadsheets/user = 50,000 spreadsheets
Total storage = 50,000 spreadsheets * 100 KB = 5,000,000 KB (or ~5 TB)
Total transactions = 10,000 users * 15 transactions = 150,000 transactions/hour
Total bandwidth = Total transactions * Average size/transaction
= 150,000 transactions * 1 KB = 150,000 KB/hour (~ 134 MB/hour)
≈ 37 MB/s
Total servers = Concurrent users / Users per server
= 10,000 / 100 = 100 servers
/auth/signup{ "name": "string", "email": "string", "password": "string"}{ "id": "string", "name": "string", "email": "string"}/auth/login{ "email": "string", "password": "string"}{ "token": "string"}/auth/user{ "id": "string", "name": "string", "email": "string"}/spreadsheets{ "title": "string", "access_level": "string"}{ "id": "string", "title": "string", "created_at": "date", "updated_at": "date"}/spreadsheets/{id}{ "id": "string", "title": "string", "cells": [ ... ], "created_at": "date", "updated_at": "date"}/spreadsheets/{id}{ "title": "string", "access_level": "string"}{ "id": "string", "title": "string", "updated_at": "date"}/spreadsheets/{id}{ "message": "Spreadsheet deleted successfully."}/spreadsheets/{id}/cells{ "cells": [ ... ]}/spreadsheets/{id}/cells{ "row": "int", "column": "int", "value": "string", "formula": "string"}{ "id": "string", "row": "int", "column": "int", "value": "string"}/spreadsheets/{id}/versions{ "versions": [ ... ]}/spreadsheets/{id}/versions/revert{ "version_id": "string"}{ "message": "Reverted to version successfully."}/cells/{cell_id}/comments{ "content": "string"}{ "id": "string", "cell_id": "string", "content": "string", "created_at": "date"}/cells/{cell_id}/comments{ "comments": [ ... ]}User Interface (Client Application)
Backend Services
Database Layer
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...
Here's a high-level overview of the steps involved in the operation of the Real-time Collaboration Service:
{ "type": "cell_update", "spreadsheet_id": "12345", "cell": { "row": 2, "column": 3, "value": "New Value" }, "user_id": "user123"}{ "type": "cell_update", "spreadsheet_id": "12345", "cell": { "row": 2, "column": 3, "value": "New Value" }, "user_id": "user123"}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?