Loading...
list
string GetParkingLotDetails(int parkingLotId)
int FindFreeParkingSpace(int parkingLotId, bool disabledFriendly)
int BookParkingLot(int parkingSpaceId, datetime start, datetime end)
string GetReservationDetails(int reservationId)
bool CancelBooking(int reservationId)
We need a distributed lock mechanism to handle possible concurrent reservation of the same parking space
Possible solutions:
A RDBMS is used to handle well the transactions but it won't scale very well if we need to support much more requests
The active-active topology can handle the failure of one of the database node
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?