1) User should be able to search a parking lot near him.
2) User should be able to book the parking slot
3) Parking slot should be selected from car to relevant size and bigger size ( like car should be parked to medium and large slot )
4) User should get notification and check booking order
No double booking should be allowed
Highly available
1 million active users
10000 parking lots
Get /parking/{location} -> returns all parking lots near a certain radius
Get /parking/{parking lot} -> status of available slots
Post /parking/{parkinglot}/{slot} -> book the slot else throw the error (orderId)
Post /payment/{orderId} [idempotentId]
Get /order/{userId}
Get /order/{userId}/{orderId}
There main services
Parking
1) Get nearby parking lots
2) Get available slots
3) Book the parking slot
Payment
1) Booking service generate a payment link
2) Links with other third party system and handles order in database
Order/Booking
1) Parking send it order to generate a Id for booking a slot
2) Order Id can be queried
1) Sql based database for parking lot, transaction and order id
2) Redis for caching slot id
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.