Loading...
POST parking/checkin
GET parking/availableSlots
POST parking/checkout
GET parking/payment
SQL DB - Lock for update to be used
Tables involved are
Vehicle
Slots
Bills
Race conditions can be managed with select for update that applies locking the slot
Cache is used to get the available slots, not to hit the DB for each and every call
Microservices architecture