Requirements


Functional Requirements:


  • Users can see available shows.
  • Users can view a seating map to pick seats.
  • Users should be able to book multiple seats
  • How long the users should be able to lock seat? When should the seat be released after it has been selected - I am assuming 10 min.
  • Is refund allowed - Within 24 hours full refund I am considering.



Non-Functional Requirements:


  • How many users are expecting per second during peak traffic - 100k/sec
  • How much latency do we design for between seat locking and payment - 200-500 ms



API Design

Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...


getShows(String locationId) - get the shows in a location

getShows(String showName) - get the shows by showName

getAvailableSeats(showId) - get available seats for a show

lockSeat(seatId) - lock seat on selection for 10 min

bookSeat(seatId) - book the seat permanently

cancel(seatId) - cancel the seat and mark as available

pay(seatId) - pay for the seat and return ticket


High-Level Design

Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.






Detailed Component Design