Booking system takeaways

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the architecture category.

Last Updated: 2023-12-03

a. You should be flexible in what times you count as "fitting the appointment slot". For example, if someone booked for 14:00 and arrives at 14:15 they should still be able to validate their appointment and reach the next step. But this won't happen if you use simple logic like if current_time >= appointment_time

b. As limited slots get booked up, more contention pressure gets applied to the remaining slots. Therefore race conditions, such as when person-A and person-B are simultaneously trying to buy the last ticket for the slot, occur with higher frequency.