For hotel booking systems like Expedia or Booking.com, how would you determine what rooms are available at a particular hotel and persist the reservation? 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. I see a lot of system design tutorials on the Internet but they don't seem to integrate with the Providers, so Idk If they're missing this or if it's a different scenario. I imagine that in a real system design for this kind of Travel Agency, one of the biggest challenges is to decide how/when/where to integrate with the providers, it looks like the core business of our application, like fetching the available options/blocking the reservation for a period of time and these kind of things. Any pointers on that? A high-level design considering this or even an SD that talks about it. #systemdesign #Expedia #booking
In real life, it is a series of handshake agreements between multiple parties. It starts with an Mohawk designed MVP (looks good from the front, ugly on the back) to initiate the partnership. Then over time, a team will start building features over time until everything works just good enough to move onto the next thing.
Got it, can I ask for your opinion in a specific scenario? Imagining that I have a system that receives events from these providers (these events might include new available flights, hotel room availability, price changes, or other updates related to services provided by these external entities), does it make sense to: - Save this data in a NoSQL DB, like elastic search for example, and this DB would be used for searching. - And after the user decides to book it, store in a SQL database that ensures ACID BTW, I would probably have a webhook system to handle these notifications in an asynchronous way using kafka. My main question is that if it makes sense to not store this data in a SQL database at first.
Good question: look at the other commenter's suggestion and gather requirements. What kind of requirements would help you prefer a nosql solution vs a relational DB? How important is cost of resources, flexibility, and scale? What kinds of information will help you make the best decision for your MVP? What if this idea may be scrapped within a month? Would you still design the solution in the same way?
System design problems aren’t real life. This is why the first few minutes of an interview is for clarifying requirements. You likely will never have to integrate with providers in an SD interview.
You’re right, but my friend just participated in a process that they asked him to