Design a BookMyShow System (LLD)
Difficulty: MEDIUMCategory: LLDFrequency: 1Asked On 2025-04-15
Problem Statement
Design and implement a Ticket Booking System for movies, events, and shows, similar to BookMyShow. The system should manage users, shows, theaters, bookings, and payments, while ensuring seat availability, concurrency handling, and scalability.
🔶 Functional Requirements
1.User Management
•Users can register, login, and maintain profiles.
•Users can view booking history and cancel bookings (within allowed time).
2.Theater & Show Management
•Add theaters with multiple screens.
•Add shows for movies/events with timings, screen allocation, and seat types.
•Maintain seat maps with availability status.
3.Booking Management
•Search for shows by movie/event, location, or date.
•Select seats and book tickets.
•Prevent double booking with real-time seat locking.
•Support group bookings and seat selection preferences.
4.Payment Processing
•Support multiple payment methods: cards, UPI, wallets, net banking.
•Handle successful and failed transactions gracefully.
5.Notifications & Alerts
•Send booking confirmations via email/SMS.
•Notify users of cancellations or show changes.
6.Optional Features
•Dynamic pricing based on demand.
•Discounts, offers, and loyalty points.
•Cancellation & refund management.
🔶 Non-Functional Requirements
•Concurrency: Handle multiple users booking the same show simultaneously without double-booking seats.
•Scalability: Support high traffic during peak booking hours.
•Performance: Seat selection and booking confirmation should be fast (<2 seconds ideally).
•Reliability: Ensure transactions are atomic; payment should not be charged if booking fails.
•Extensibility: Easy to add new shows, theaters, or seat types.
🔶 Constraints
•Each seat can be booked only once for a show.
•Booking cancellation should be within allowed time windows.
•Payment should succeed for booking to be confirmed.
•Seat selection must respect different categories (VIP, Premium, Regular).
🔶 Example Use Case
1.User searches for Avengers show in Mumbai on a specific date.
2.System displays available theaters, shows, and seat maps.
3.User selects 2 VIP seats → system locks seats temporarily.
4.User completes payment → booking confirmed → seats marked as booked.
5.User receives confirmation email with ticket details.
6.Another user trying to book the same seats during the lock period is prevented.
👉 In short:
Design a BookMyShow system that allows users to search shows, select seats, make payments, and manage bookings while ensuring concurrency, seat availability, fast performance, and reliability.