Syllabus

Interview walkthrough: clarify the prompt, design, implement a working booking system, then harden for concurrency and multi-instance.

The interview

The prompt lands. Clarify requirements and set a delivery plan before you draw a single class.

  1. 1The Interview Prompt
  2. 2Clarify Requirements
  3. 3How to Approach

Design

Entities, relationships, and service APIs — what you put on the board before coding.

  1. 4Entities & Relations
  2. 5Service APIs

Implement v1

Build a runnable happy path: models, repos, booking saga, failure handling.

  1. 6Models & Repositories
  2. 7Booking Happy Path
  3. 8Failure Handling

Concurrency follow-up

Interviewer asks: two users, same seats. Climb from synchronized to finer JVM locks.

  1. 9The Race Condition
  2. 10First Fix: synchronized
  3. 11Finer JVM Locks
  4. 12Seat Locks & Deadlocks

Multi-instance

What changes when you run more than one pod — DB locks, Redis, optimistic versions.

  1. 13Why JVM Locks Fail
  2. 14DB, Redis & Optimistic

Ship it

Pick a production answer and run the working project end to end.

  1. 15Decision Matrix & Run