Bookings for the first-day-first-show of a superstar's new film open at 9:00 on a Friday morning. Lakshmi and her three college friends have planned this for a month. They want seats F5 to F8, together, at a 400-seat theatre in Hyderabad. So do roughly 100,000 other fans, who open the page in the same minute. (Lakshmi, the theatre, Sameer and every number here are made up for teaching.)
Sameer built the ticketing app, ShowTime. His mental model is a small cinema's box office. The box office has one paper chart of every seat. Two customers stand at two counters and both point at F7. The clerks must not both write "sold." Someone has to decide who wins, and the loser must be told immediately.
An online ticketing service has the same problem with a far bigger crowd: thousands of people looking at the same seat map at the same moment, for a few hundred seats. This guide designs a movie and event ticketing service in the style of BookMyShow. It is an original interview design, not the internal architecture of any named company.
What happens at 9:00
Idea it forces
"Two people both see F7 as free"
The seat map is a picture; the hold is the promise
"Lakshmi needs four seats together, or none"
Hold every seat in one atomic update
"Someone held seats and walked away"
Holds that expire on their own
"Her payment page spun for a minute"
Payment as a separate workflow, with reconciliation
"100,000 fans hit the page in a minute"
Waiting room, cached seat maps, protecting the door
In 30 seconds, as an architect would frame it: "One invariant: for each show and seat, at most one active hold or confirmed booking. Seat maps come from a short-lived cache, but holds are made by one atomic update on the authoritative seat rows. Every chosen seat must be available, or its hold expired, or nothing is held. Expiry is checked by the claim itself, so correctness never waits on a cleanup job. Payment happens outside the transaction, with idempotency keys and reconciliation. For on-sale rushes, a waiting room protects the booking path, so the database only sees admitted users."
1. "Two people both see F7 as free": the rules
Users browse cities, movies, theatres and shows. They open a seat map, choose seats, pay and receive an e-ticket. Theatre staff publish shows, set prices and see sales. Cancellations and refunds follow a stated policy.
The invariant: for each show and seat, at most one active hold or confirmed booking exists.
Rule
Why it matters
Sell a seat at most once
Two people cannot sit in F7
Hold all chosen seats or none
A group of four is useless with three seats
A hold expires on its own
An abandoned checkout must not block a seat forever
Keep the price the user accepted
Prices can change between hold and payment
A retry must not charge twice
A network reply can vanish
Stop selling when the show starts
Late sales are worthless and confusing
The seat map on the screen is a picture, not a promise. It may be a few seconds old, so the booking step always rechecks the truth.