User can park a car into parking lot
user will get a ticket when join
User can do advanced pay
User can pay when leave
Different parking type: compact, standard, electric charger
User can view if there are empty spot for each car type
availability
Consistency
10 states
100 parking lot
Capacity of 200 cars, 70% standard cars, 20% compact cars, 10% electronic car
Each parking lot. there are 1000 cars parking
10 *100 = 1000 parking lots
For each day, the system will receive 1M parking
each reservation including:
ticketID (20 bytes)
car license(10 bytes)
reservation start time(8 bytes)
reservation end time(8 bytes)
in total ~ 50 bytes
will have 2 MB data
since the data is structured use relational database is a good solution
API used for users
check_capacity(lot_ID, vehichle_type, parking_start_time, parking_end_time, ) return if the parking lot has capacity, it also return price
reserve_spot(lot_ID, user_id, vehichle_type, parking_start_time, parking_end_time) book a parking spot, return reservation id and price
pay(user_Id, ticket)
API used by systerms/ manage
vehicle_arrived(reservation_id, date_time)
vehicle_left(reservation_id, date_time)
Tickets Table
ticket_id
car license
start_time
end_time
payment_status
parking table
parking_id
capacity
location
parking spot table
parking spot id
parking id
vehicle type
status
lot_capacity table
parking_id
vehicle_type
number of available space
You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design. If you are unfamiliar with the tool, you can simply describe your design to the chat bot and ask it to generate a starter diagram for you to modify...
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...
To make
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?