10 countries, 100 lots, each lot has 500 spots,
in total 500000 spots and turn over of 2 per day, which makes it 1M reservations per day,
128 bytes × 1M/day × 365 × 2 ≈ 93 GBWe would have a few endpoints, one for the GET /lots/{id}/availability
it returns 200 with a list of available spots cacheable
another POST /reservation to hold the reservation with TTL in case the driver doesn't show up and POST /reservation/{id}/confirm to finalize the booking
when a car enters a message will be published to the topic and another one when it exits
in case of conflict, we only book a slot when it has a free status and we check before we act and the booking has a TTL it expires after x minutes
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.