The system lets drivers reserve slots online and gives the QR codes to show at the arrival
The system shows the slot location to the driver
The system prints a ticket
The system opens a gate
The system indicates that the slot is occupied by thevehicle and starts to measure time
Then the driver leaves, the system lets them pay throught the payment gate
The system frees the slot when the driver leaves
If payment fails, the system lets to pay by cash, the operator handles the payment and frees the solt in the system
If the parking lot is full, the system finds the slot of the according type which will be free the first and show the driver how long should they wait
If the gate is not open, the system shows another gate location to the driver, warns admins and closes the gate for using until it is back.
If the ticket is lost, the system accepts scans from the mobile screens
The system can handle 10000 parking slots and 100 gates
The registration in the systme happens in 1 second
Searching and assigning QR code happens in 1 second
Printing a ticket takes 5 seconds
No assigning of the same spots to different people
The system is accessible 99.9% of the time
Each gate can handle 1 car in 10 seconds.
Taking into account one car stays there for 4 hours, 6 cars per slot, 60000 active users per day.
Concurrent users: 10000 maximum
100 users make a request each seconds in peak hours, for 2 reads and 4 writes per user we should handle 200 reads and 400 write s per second, 120000 reads and 240000 writes per day.
Storage? Bandwidth?
Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Define the data model. Identify the main entities, their attributes, and relationships. Consider the choice of database type (SQL vs NoSQL) and justify your decision based on access patterns...
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.