Design a Movie Ticket Booking Platform
Design the object model, durable repository contracts, and failure-safe interactions for browsing shows, holding seats, and confirming bookings.
For this exercise, assume customers browse movies and scheduled shows at venues, inspect the seats for one show, place a short-lived hold on selected seats, and either confirm or cancel the booking.
A seat within one show may belong to at most one active hold or confirmed booking, and concurrent hold attempts for overlapping seats must resolve atomically so at most one succeeds. Expired or cancelled holds release their seats.
Confirmation uses an injected payment collaborator; a repeated confirmation request must not create a second charge or booking, and a payment failure leaves the hold active only until its original expiry. Design the object model, focused interfaces, interaction flows, and durable persistence boundary.
Choose a database or storage model, identify the records and indexes that protect show-seat ownership, and explain how retries and recovery preserve the lifecycle.
External payment-provider implementation, refunds, promotions, dynamic pricing, recommendations, venue administration, multi-region deployment, and vendor-specific infrastructure are outside scope.