For hotel booking systems like Expedia, how would you determine what rooms are available at a particular hotel? I can see 2 options: 1. Keep a database of all hotel rooms and their availabilities. When users book through Expedia, we can access the data in our DB directly. When users book on the hotel’s website, the hotel will have to notify us, then we’ll write to our DB. 2. When a user tries to book through Expedia, make an API call to the hotel. We’ll rely on the response to determine what available rooms there are. That way, our system doesn’t need to worry about maintaining data on room availabilities. #systemdesign #Expedia #booking #TripAdvisor
India
Yesterday
981
Any Indians Think Kashmir Should be Independent?
Cars
2h
440
EV is a scam. PG&E will milk you dry.
Ask Blinders
16h
699
Why Pronouns shit captured US ? I don’t see this anywhere else
Tech Industry
Yesterday
3463
I do tech screens at Google. AMA
India
12h
2616
Why is it so G*damn difficult to move money out of India
Overall, good thinking here. But it all depends how far down the rabbit hole you want to go. Are you talking strictly about booking? Payment? Pricing? Communications? I would encourage you to think through what something means to be available. It may differ between boutique hotels, bed and breakfasts, vacation rentals, etc. Once you have identified some parameters around what availability, think through a search flow. Once you’re able to navigate to a property, think through how pricing could possibly determined. Is it a flat rate always, dependent on when you’re booking, if you have a coupon, whether you have pets. Once pricing is determined, how do you actually book? When do you pay for it? Tons of stuff, this is just a very small part of it.
Your design is good, but I would consider the vast amount of data you’re talking about. Let’s say each hotel has 100 rooms, each of those rooms is available 365 nights and have different price/packages they are sold at. So you need to maintain availability as well as price parity. The way Expedia does it relies on hotelier systems appending their prices and availability via a API or EPC (Expedia partner central) to a customer facing DB. Expedia search API relies on caching technology that is able to collect the data from the customer facing DB in less than 2 minutes but is intelligent about which dates/rooms/hotels to cache. The goal is to avoid expensive database calls. Those take time and increase the risk of a poor search experience. So, in short - think large scale and avoid making a API calls to the hotel each time you need to do a search. It’s not reliable.
Thanks for your input! You mentioned that Expedia accesses room availability info from a customer-facing DB via an API. Who maintains this DB?
“Avoid making a api calls to the hotel each time you need to do a search” It is ideal, but it also depends what the system of record is. If something is listed on Expedia and it’s booked via Expedia, does that mean it’s official? Does the hotel want to maintain ownership of this? What happens if two bookings happen at the same time, and there is just one room available?