Free Low-level design lessonsLow-level design · Stage 1 · Case studies · Step 6
Case study: movie ticket booking
Seats are a shared, scarce resource: the model, the double-booking race, and how holds, locks and constraints prevent it. About 14 minutes.
Why does the 'hold' step exist between selecting a seat and paying?
- ATo reserve the seat for a short time so the user doesn't pay for a seat someone else takes
- BTo make payments faster
- CTo write an audit log
Show the answer
To reserve the seat for a short time so the user doesn't pay for a seat someone else takes. It makes the payment step safe, with an expiry so seats aren't blocked forever.
4 questions on this idea
Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.
Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve