Parking space api:
-Floor
-Size
-Empty?
Garage api:
-total floor
-spaces []:
-entry price
Car api:
-size
-hour in
-hour out
Simple database running the garage api and managing the spaces in the garage. garage database is sharded and based on floor assigned to the car
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...
Car enters the garage, the ticket manager acts as a gateway determining if the car can enter based on the space manager, car is then place in the garage database based upon floor its assigned. the time check runs checking the cache soon to expire times and removing the cars from the garage whos time is up, notifying the space manager that there's space. the cache pulls times from garage that meet a minimum threshold of times about to expire.
see high level
No tech here, used caches to help manage time checking from garages to ensure quick removal of times
The time check is a massive bottleneck as if it goes down, the entire system of removing cars breaks
Make a priority queue to manage the times and have a counter check it periodically