Microservices Architecture in Open Retail Interface for Public Transport Tickets
Santtu Sulander · Theseus (Ammattikorkeakoulujen) · 2018
Helsinki Region Transport, HSL for short, assigned a fully open retail interface to be implemented in order to be able to sell its public transport tickets. The assignment was to create and publish this interface, design and develop the system behind it and set up the infrastructure to run the system in a production environment. The objective was to build a scalable and modular system to serve all desired functionalities of the retail interface using modern technologies. The system was designed and implemented using the microservices approach. To guide the design process, Domain Driven Design, a software design pattern was utilized to map out the boundaries and business rules for all microservices within the business domain of the interface. In practice, the system was implemented entirely using built-in software components provided by Azure, a PaaS solution by Microsoft. All code written for the project was in modern JavaScript using the ECMAScript 2017 language specification. Microservices were built as instances of Azure’s serverless computing solution called Azure Functions. Azure’s globally distributed document database solution, Cosmos DB was used for all data storage needs. Sharding technology was utilized for efficient CRUD operations on high volume document collections. The open retail interface was published as a RESTful API via API Management, a gate-way service provided by Azure. The gateway was configured to validate request credentials and map the endpoints of the open retail interface to those of an underlying microservice. The results are an open retail interface and its underlying system as well-designed software components deployed onto a highly available and scalable platform.