Trainline, also known as thetrainline.com, seems like the perfect online service to have been born in the cloud. It needs to provide a service that cuts across the boundaries of 44 train operating companies and 24 countries. It also needs to constantly back up its data and systems to avoid downtime, and it wants to minimize the time that customers wait for responses.
But in fact, it only started moving into the cloud 18 months ago.
Instead of the cloud, it was based in a less-than-leading-edge co-location service in Rotherham, England, a provincial steel town near York. And instead of instant provisioning and access to wide pipes, Trainline spent six days and $2,000 to get one set of its servers at the site connected to another set on the other side of the facility.
Eighteen months ago, its database operations ran on an Oracle Exadata appliance, something that Chief Technology Officer Mark Holt described in Diginomica as "an amazing piece of kit, but it's an amazing piece of kit for the '90s, not an amazing piece of kit for 2016."
That was something of an understatement for Holt, who on Dec. 2 published a Linkedin commentary that included: "We now have a spare Exadata that I’m desperately keen to throw in the river."
Trainline's trip from Rotherham to both Dublin and Frankfurt, where its IT infrastructure now resides in Amazon Web Services data centers, is now complete. At AWS's recent ReInvent show in Las Vegas, Trainline's head of cloud and platform agility, Chris Turvil, and head of platform development, David Stanley, sat down with InformationWeek to explain how they moved onto EC2.
Want to see how FINRA, a Wall Street regulatory agency, moved onto the cloud? See FINRA Commits Mission Critical App To Amazon Cloud.
Trainline sells almost $3 billion in train tickets a year across Europe. That's because it's competing with the 44 companies (14 in the UK alone) that operate trains in different countries, and 17 years ago it got the jump on helping consumers, often by phone, patch together the set of tickets they needed at the best price to make a trip of multiple connections.
One challenge was moving its Oracle database transaction system into the cloud from its high speed, on-premises Exadata appliance. Exadata performed as expected, but Trainline was looking to move away from all possible single points of failure to a more resilient system.
Trainline also wanted to be able to frequently change and update its software to keep up with the marketplace. It had won a dominant position in European ticket sales by starting fresh and not being bound by the conventions of the train companies. Eighteen months ago, it decided it wanted to be certain of maintaining that position, Turvil said.
"We had our share of legacy systems and technology," Turvil said. As they mapped their infrastructure for the move to the cloud, they found a router they knew nothing about that had been running for 11 years. "I'd have been very scared if I had to do a reboot on that router," he noted.
Trainline infrastructure now runs in three different Amazon availability zones, with the possibility that one could go out of service through a fire or loss of power but the other two would keep running. Two are in Dublin and one is in Frankfurt, where Trainline keeps its backup and recovery systems.
"Travel really matters to people. Our technology can make people's lives easier," noted Stanley. Two hundred and ten of Trainline's 400 employees are part of software engineering teams and CTO Holt set a goal of robust "continuous integration" of new code for Trainline's systems. One new system that swiftly materialized following the move to the cloud was BusyBot, a crowd-sourced application that could report on the state of the rail line a customer was using. It resembles the crowd-sourced car trip application, Waze, in the U.S., where drivers report accidents, obstacles in the road or stretches of highway with slowdowns.
Chris Turvil of Trainline
Trainline's BusyBot could do something similar for the trains running across Europe. "If you're walking toward the train, you want to know what carriage to walk toward that still has empty seats," said Stanley, and that kind of reporting takes quick analytics and fast response times.
A listener to the interview said he'd been traveling across Germany headed for the Frankfurt Airport, but everyone was ordered off the train as it stopped in the main Frankfurt station, one stop short of the airport. The conductor didn't speak English and the traveler didn't speak German. (The train was 15 minutes behind schedule and would make up 10 minutes by skipping its airport stop.) What now, the listener asked himself at the time. "BusyBot would have been able to help you in that situation. It would have shown the next train to the airport," said Stanley.
BusyBot was developed in three months "from concept to delivery," said Turvil. The rapid development was enabled by using AWS data streaming service Kinesis, event response and management system Lambda and the AWS NoSQL system, DynamoDB. Trains are frequently oversold in the UK and crowded in other parts of Eruope. BusyBot can tell the weary traveler where empty seats may be found on a given train.
Turvil said Trainline has monitored the performance of Amazon services to make sure that extended latencies don't affect the performance of its customer applications. Lambda can scale up in 14 milliseconds, giving the BusyBot app a chance to run analytics in response to an event notification such as the cancelled run of a scheduled train or a problem on a track that will delay departures for several trains. BusyBot can informer users of when the next train will run, alternative routes, or how much they will save by moving that segment of their trip to a less traffic-intense time.
Turvil said Trainline has needed to look at all its applications and re-architect them as microservices, not tiny granular microservices, but segmented nevertheless into smaller pieces. That allows IT to add features to an application more quickly or make a software patch, as needed.
A new application that has caught on so successfully that it's mandated that train operators soon support is Trainline's mobile app that displays a bar code on a smart phone that represents the traveler's ticket. It's been implemented throughout 60% of the train service providers and will be implemented by all of them by 2018.
That kind of quasi-official sanction will make it harder for competitors to cut into Trainline's business and make some of those potential competitors, the train system operators invest in supporting Trainline service. That's what moving to the cloud has done, said Turvil. It's made Trainline more modern, agile and stickly to customers.
Customer Peter Gill in a review comment said Dec. 4 it's not justs the technology but the knowledge of the train system: "When I have contacted Trainline it never takes long for them to answer my call and I have always had good experiences with the people who were dealing with my issues."
And Trainline has found the same Oracle system that existed on its Exadata hardware appliance available as part of AWS Relational Database Service. It is monitoring its database applications for any decreased performance and found they actually function 10% faster, said Turvil. He has no explanation for that but is happy about it. "Exadata makes you lazy," he warned. Instead of writing applications to perform better, you throw Oracle hardware at them, he said.
As for the appliance itself, Turvil has urged Holt not to throw it in the river. "I think he should use it as side table," he said.