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.


This is essentially a question about which policy to implement, and there's no "best" policy, you need to evaluate the different policies against your use cases and decide which one works best for you. Users of reservation apps are generally aware that they are competing with many others for a limited resource, and that someone who's faster might get it before them, so the simplest option of just making the resource unavailable when a reservation has been made might be good enough. A more complicated scheme might introduce coding issues without offering significant user experience improvement. It's your call.

|improve this answer|||||
  • thanks for the reply. I allowed sometime to see if i would get a better response. I was actually hoping for something along the lines of if we develop the solution this way the performance will be improved/impacted or if we do something else the user experience will be improved/impacted but typically the best/industry practise is to do it like this or that. – John D Jun 13 '19 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.