BookMyShow
Design a movie ticket booking system around seat locks with expiry, all-or-nothing selection and safe concurrent booking.
Requirements
Clarify, then fix the scope. The interesting part of this problem is not browsing movies but two people wanting the same seat at the same moment.
- A show is one screening of a movie. It has a seat layout; seats have a category and a price.
- A user selects seats. The system locks them for a short time, say five minutes, while the user pays.
- If payment completes in time, the seats become booked. If not, the lock expires and others can take them.
- Selecting several seats is all or nothing: either the user gets every seat or none.
- Two users must never end up holding the same seat.
Out of scope: search, theatres and cities, payment itself, refunds, notifications.
1 of 7