Created
October 13, 2022 07:43
-
-
Save KevinNha/c2602e158836ae613292c8ae8b12e005 to your computer and use it in GitHub Desktop.
Design a Hotel Reservation System
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System Architecture and Design | |
This is a whiteboarding exercise. | |
Just like pair programming, ask clarifying questions to understand the variables you should take into consideration. | |
Feel free to guide the conversation to an area where you are comfortable but be prepared to go deep into the conversation about the technical details and tradeoffs encountered. | |
Ask for validation of your answers to ensure you are covering the question asked. | |
This section will require some whiteboarding (no additional coding). | |
Your interviewers will ask you to design a hotel booking system. This interview is an opportunity to collaborate and iterate on a solution with your interviewers. | |
You will be asked to create a representation of your design and provide a high level overview. | |
Focus on your areas of strength. We want you to design a system that shows off your knowledge and skills. | |
You are not expected to have designed this system before the interview—the interviewers will guide you on the specific requirements and the assumptions to make during the exercise. | |
Make sure to discuss your approach and thought process throughout each step of the discussion. | |
Then, there would need to be a queuing system for doing chronological operation.
Database locking mechanism as well to ensure guests don't overlap.
Represent database with a few tables.
- guest table
- room table with attributes like room number, guest count, amenities that can be filtered during the booking process
- booking table with room
erDiagram
GUEST o{--}o BOOKING : "can book"
GUEST {
string guestId
string name
string phone
string paymentMethod
}
ROOM ||--|| BOOKING : booked
ROOM {
string roomNumber
int maxOccupant
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From a network load perspective, you'd have a loadbalancer set up to direct to appropriate destination.
Same for database cluster (e.g., AWS RDS cluster with primary and at least 2 read replicas)