AlgoMaster Logo

Design Movie Ticket Booking System

Ashish

Ashish Pratap Singh

hard

A Movie Ticket Booking System is a software application that enables users to search for movies, view showtimes, select seats, and book tickets at cinemas or multiplexes.

Movie Booking

In this chapter, we will explore the low-level design of a movie ticket booking system in detail.

Let's start by clarifying the requirements:

1. Clarifying Requirements

Before starting the design, it's important to ask thoughtful questions to uncover hidden assumptions and better define the scope of the system.

Here is an example of how a conversation between the candidate and the interviewer might unfold:

After gathering the details, we can summarize the key system requirements.

1.1 Functional Requirements

  • Users can search for shows based on a movie title and a city.
  • The system should support multiple cities, cinemas, screens, and shows.
  • Each screen has a defined layout of seats with different types (e.g., REGULAR, PREMIUM).
  • A user can book one or more available seats for a specific show.
  • Double booking should be prevented.
  • The ticket price should be calculated dynamically based on configurable rules (e.g., seat types)
  • Users can subscribe to movies and receive notifications when booking opens for them.
  • The system must be flexible to support different payment methods.

1.2 Non-Functional Requirements

  • Concurrency: The system must be designed to handle concurrent booking requests gracefully, ensuring data integrity and preventing race conditions like double-booking.
  • Extensibility: The design should be modular. It should be easy to add new pricing strategies (e.g., holiday pricing) or new payment methods without significant changes to the core system.
  • Modularity: The system should follow good object-oriented principles with a clear separation of concerns.
  • Simplified Interface: The system should expose a simple API for clients to interact with, hiding the underlying complexity of the booking, locking, and payment processes.

After the requirements are clear, lets identify the core entities/objects we will have in our system.

2. Identifying Core Entities

Premium Content

This content is for premium members only.