I hope this is the right place to ask since this is a programming related question.
I’m developing a venue reservation app (similar to booking.com) and am almost done however I have 1 request for clarification/advice from people with far more experience.
Let’s say there are 2 individuals (PersonA and PersonB) looking at the last room available for a certain property. At what point should the property become unavailable to the other party assuming both are interested in booking the room at around the same time?
Programatically, Should I create A “Suspense Account” table for about to be/could be bookings if for instance PersonA selects the room to be booked I can then take that potential reservation and place it in the “Suspense Booking” table, and immediately make it unavailable to PersonB? I can then release the booking after a certain period of time and delete the entry from that table.
Alternatively I can follow the direct approach and wait until the booking has been completed by either PersonA or PersonB and then make the room unavailable to one or the other.
What is the best approach as I am interested in the best approach to tackle this problem.