LateRooms.com had a fax problem. Despite being a digital hotel booking platform the reservations team still had to send thousands of faxes to hotels around the world to secure the bookings. So the developer team wrote an application programming interface (API) that would help securely automate this process and: “Over a six month period we rolled out and eventually got to a point where we could turn the fax system off.”
No more fax
“The whole travel industry is backward to a certain extent,” solutions architect Andrew Braithwaite told the Apigee I Love APIs conference in London yesterday, “we used to send thousands and thousands of faxes to hotels all over the world and that is not the most reliable system. We used to have lots and lots of rooms where someone would turn up at a hotel thinking they had booked, and that hotel would just say 'I don’t know anything about that'. That was not great as a hotel business, so we wanted to move that online.”
LateRooms.com doesn’t take payment direct for bookings, so it needed an API to communicate this booking information from the partner responsible for the data. However, as Braithwaite said: “We needed to be absolutely certain that we knew who was accessing [the booking information] and that they were authorised to see it, so that’s where Apigee came in.” By using OAuth on Apigee Edge Laterooms could guarantee the security of the API and implement it, starting the six month process that ended with the death of the fax system.
Before turning to a more API-happy approach LateRooms was dealing with a fairly typical legacy system. Braithwaite laid it out as: “We’ve got a massive SQL server estate that we use, everything went through there, the business data and our services and we had one, big, library of code that had all our business logic in and all our external systems used that library code to do anything.”
This made making changes extremely cumbersome, as all teams had to release at the same time. Braithwaite gives the example of changing a line of text in an email campaign: “Everything had to change. To add one word to an email we had to spend three months messing about, organising everybody. It just wasn’t sustainable.”
LateRooms.com by its very nature has always been an API business. “Our affiliate APIs, which we have had for ten years now, they probably do 130 million requests a day from affiliates.” The site also gets more than fifty percent of its traffic from mobile, an offering that was “pretty horrific” until recently, according to Braithwaite.
The first step was to design a mobile app: “The only way we could think of to do that was to come up with some APIs,” says Braithwaite. "It meant that we could get something out fairly quickly and it was a small step towards doing what we wanted to do.”
Each product team at Laterooms (for example mobile or reservations) is responsible for its whole stack. As Braithwaite explained: “Because of the way we have architected this, with the individual product teams that own the whole stack, we’ve also been able to remove our big SQL server database to a certain extent.”
Once the APIs had been built for the mobile app and mobile web LateRooms.com started looking into ways of leveraging them using Apigee’s API management platform.
First up was the web interface: “We wanted to get a consistent experience across all of our sales channels, the main one being mobile web and our web platform. So we completely rebuilt our web platform to be responsive. We built it upon the APIs we had already written and it’s been really successful for us.”
Next up was the search team: “It sounds mad but our search team using a search technology called elasticsearch was a radical thought a couple of years ago. When I first started we were using SQL server, so there was a big search store procedure that kind of worked but it wasn’t brilliant. We got the API in place and now our search and our search algorithm are very good, very quick.”
Lastly there was a shift from the SQL server to Couchbase: “Because it is XML documents and we can also actually deploy that in AWS, so that has let us revamp our data centre and deploy things in the right place for all of us.”
To sum up, Braithwaite said: “It’s taken us two years to get to this point and we’re by no mean finished […] We have the Amazon thing, if you don’t talk about the API you can’t talk. We used to have all sorts of back doors and workarounds that we had to engineer out but now everything talks through APIs,” and no one has to see a fax machine again.
Find your next job with computerworld UK jobs