/quote
Request:
Response:
/hold_spot
Request:
Response:
/reserve_spot
Request:
Response:
/arrive
Request:
Response:
/leave
Request:
Response:
/cancel
Request:
Response:
???No show auditing/canceling of reservations???
See block diagram!!!
Reserve Journey:
Payments will be completed on using a third party provider/service, like Stripe.
All hold/reserve operations completed by the transaction/reservation services should update the db and invalidate the cache for that parking spot (making it available/unavailable for others to hold/reserve). Invalidating the cache should cause an update to be be made to the client/lot gate devices. Keeping the cache up to date with the write operations allows read operations (quote) to check the cache first, before querying the db. Caching what parking spots are available at given times should help with read/quote bursts of traffic.
If the cache is stale and a user tries to hold/reserve a spot that is no longer available, the client app should recognize that the error is for that reason, refetch the quote and update the client in a way that is intuitive for the user so that they can attempt to hold/reserve another spot.
The Relational DB is the source of truth for reservations.
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.