A Technical Look: How Expedia is Simplifying Travel Planning
By John Kim and Aman Bhutani
This content originally appeared on Expedia’s Science of Travel Blog.
Isn’t that crazy?! Do you remember the last time you searched for a flight or hotel? How many searches did you do? Did you remember the results of all your searches? How about even two or three searches?
In our lab, we’ve noticed that people can barely remember the searches they’ve performed or the results that they’ve seen. What we’ve also noticed is despite technological advances, many people still opt for good old pen and paper to help them determine the best travel choices.
In an age where you want to search and book at any point in time on any device, taking physical notes seems impractical. By the time you write things down and share the information with your travel companions, all that information has probably changed and all your hard work has gone down the drain.
Here at Expedia, we’ve developed technology to solve this. The time has finally come to ditch the pen and paper.
Meet Expedia’s Scratchpad.
With Scratchpad, we’ve eliminated the need for you to take handwritten notes. Scratchpad allows you to return instantly to the hotels, flights, and packages you looked at before, with the same dates you used during your last search and the most current price.
Scratchpad records everything for you so you don’t need to jot anything down. Much like your handwritten notes, you can keep what you want and delete information you no longer need. The power is in your hands. And the best part? We keep all this information up-to-date for you.
Scratchpad makes it easier to search across devices too: start your search on your laptop during lunch break, continue it on the Expedia app on your smartphone on the subway ride home, and then review options with your travel partner on your tablet later that night.
This new feature is already live on our site. Check it out and let us know what you think. We already have more ideas on how to make Scratchpad even better, but we’re always hungry for feedback. We’re so excited to continue developing features that the world has never seen before.
At Expedia, speed and scale are of the essence so we implemented the note-taking functionality inside Amazon EC2. Whenever a user conducts a search, a brief message is sent to our cloud-based User Interaction Service. We also used Apache Thrift as a lightweight (and, so far, flexible) format to encode and transmit those messages. Our goal is to preserve backward compatibility as the message format evolves, something that Thrift has done well so far.
The User Interaction Service is a simple broker. Its job is to inspect messages and hand them off to a variety of consumers, each of which can write the details of that message into a different place in the collection of data stores. The relationships between this data, between users, the searches they do, the hotels and flights and cars they look at, and the things they eventually buy, make up an enormous network of nodes that we call the Travel Graph.
Rather than build a traditional relational database schema that encompasses everything, we’ve built the Travel Graph as a collection of special-purpose data stores. A good example of this is the note-taking system that records your shopping on the site, which is a simple sharded MongoDB cluster that scales well (with a few caveats).
Today we’re recording about 100 notes per second for all our users combined, for around 200GB of data overall. We expect that figure to increase by one or two orders of magnitude as we keep track of more things and rollout worldwide. Other special-purpose systems help us aggregate and trend that data so that we can show shoppers what the travel marketplace looks like in real time.
The data that results from users shopping on Expedia should ultimately be an integrated part of the entire shopping experience and not just limited to the Scratchpad page itself. As a result, the Travel Graph service layer collects data from the various data stores and returns it back to our site servers.
We’ll break down individual pieces of this architecture in subsequent posts, with comments from the development teams that have built them, and focus on practical implementation. In the meantime, keep watching the site—we’re releasing new Scratchpad features quickly and would love to know what you think.