This was asked in the system design round. I was pretty confident about my system design capability but I got stumbled around this simple question.
Design a Simple parking Garage.
func req:
Keep it simple
max 5000 lots
don't care about the veh types or cost or payment
Front facing POS + online api has to show available slots
There are sensors to detect the car is parked or not whih has to update db.
My Soln:
table:
Garage
ParkingLot:
api:
GET garage/availableSlots/{garageID}
Design
[DB]
|
[UI] -> [LB] -->[getSlotsService]---------------------->|<---[updateSlotsService]<----(kafka queue)<----[sensor data]
|
|
[write back cache]Questions:
RESULT
BOMBED the System Des round. Roast me with this design and comment below how you would have done it.
NOTE: Interviewer repeatedly said dont look for scaling now keep it extremelt simple.
What I Missed
IOT -> Sensor to system communication. In my design how sensor to DB communication is done? REST or any other way?
Metrics -> detect flaws.