We have a course registration system. Each course has a set of seats allocated. ONLY when the actual order is placed is the seats allocated decremented. Therefore, at the moment, it is possible for the seats registered to be overallocated for course.
We want to prevent overallocation of seats.
So far I've come up with 3 ways, if there is only 1 seat remaining:
- First to place the order gets the registration, the other user is shown a waiting list page
- As soon as the course is added to the shopping cart, the seat total is decremented and no one else can order this course till the users session timesout (25mins+).
- As soon as the course is added to the shopping cart, the seat total is decremented and no one else can order this course for a "fixed amount of time"...say 5 minutes to give the user a fair amount of time to place the order/decide.
To me, number #3 sounds like the fair approach. Does anyone have any examples of other ecommerce systems on how they handle the above problem? Per day, we get about less than 20 orders.