Real-time notification system

The transportation company needed a way to instantly inform their passengers about changes related to the train schedule

A major UK train and bus company (that moves millions of passengers a year) wanted a system through which customers are informed about any delayed or cancelled train journeys they are interested in. The commuters would receive SMS, e-mail, and Twitter messages about the status of their train journeys.

This project required integration between the transportation company and third parties to get train movement data.

Our Solution

In a nutshell:

Ricston implemented the integration solution using MuleSoft’s Anypoint platform. This allowed an easily maintainable and upgradable solution where new ways to send messages to clients could be implemented with minimal effort.

The solution focused around the integration of several major data systems:

  • The first source was a big fixed file format file (more than 800MBs) of all the train schedules of the entire country for the following few months. This schedule was ingested by Mule using streaming tricks and saved into a database using batch operations.
  • The second source of the data was a JMS queue hosted by the third party sending over 20 messages per second on real live train progress and in peak times, the volume would increase sometimes peaking at 40-50 message per second.

Upon receiving the real live update of the trains, a trigger checks if any user is interested in this update. If that is the case, a Mule application would broadcast this message on a topic on another internal JMS broker.

In Mule, an application for each channel (SMS, email and Twitter) was developed where each application would be listening on the topic and send the relevant information on its designated channel. Each application would implement the necessary integration for the message sending. For email, Mule’s SMTP connector was used. For Twitter, Mule’s out of the box Twitter connector was used. This connector had limitations so a fork was taken from GitHub and necessary updates were done. Mulesoft accepted all pull requests from these updates. For SMS, the integration was done using REST services, hence the default mule HTTP connector was used to achieve this.

Send Ryan a message

Ryan Delia
Services Director