Design a Conference Room Booking System
Model users, rooms and bookings with conflict-safe reservations, cancellation and explicit time-zone behavior.
Problem statement
For this exercise, assume one organization has configured named conference rooms, each with an IANA time zone. Authentication and the room directory already exist; all signed-in members may book any room.
A user views availability, reserves one room for one interval, reads the booking and may cancel only their own booking. No room may have overlapping active bookings. Intervals are half-open[start,end), so one booking may start exactly when another ends. Availability is advisory until the booking is confirmed.
For this exercise, requests express local start/end and an IANA input zone. Reject nonexistent local times; repeated local times require an explicit valid offset choice. Validate both endpoints, then store fixed start/end instants for conflict checks and retain original local intent and zone for explanation.
Displaying a booking in another zone never changes its interval, and a later time-zone rule update does not silently reschedule it. Creation is payload-bound to a user request key so a lost response can be recovered without another booking.
Design the users/rooms/bookings relationships, API contracts, booking flow and distributed authority. Recurrence, attendee invitations, notifications, payments, room administration and atomic multi-room booking are outside scope. No coding submission is required.
What to build
- Find configured rooms and view their busy/available intervals with explicit room identity and time-zone context.
- Validate one room and temporal-intent request, then confirm a non-overlapping active booking or return a clear conflict, invalid-input or unavailable/uncertain outcome.
- Read a booking’s fixed interval and state, and let only its organizer cancel it idempotently.
- Recover the original user-scoped request outcome after a retry or lost response; a changed payload under the same key is invalid.
At scale
- For this exercise, assume 10,000 rooms,100,000 users, peaks of 200 create/cancel mutations and 5,000 availability queries per second.
- For this exercise, bookings start in the future within 90 days and last at most 8 elapsed hours.
- For this exercise, healthy create/cancel targets 300 milliseconds p 95 and room-availability reads 500 milliseconds p 95;100 requests may contend for the same room.
- For this exercise, an acknowledged booking or cancellation survives an application-instance crash; unavailability never authorizes overlapping confirmations.