IoT, Architecture Optimisation
Case Study: Refactoring the IoT software infrastructure for an indoor entertainment product.
About our client
A leading provider of indoor entertainment experiences with sites in multiple countries across the globe and a continuously increasing base of players in the size of millions. They have a unique approach that combines premium quality environments and technology to produce innovative, physically interactive games for families and friends.
The challenge
Our client developed a new set of games that required the implementation of a complex Internet of Things (IoT) network on every site. All IoT devices used Arduino microcontrollers to collect data from various sensors and interact with a central database to read and update game status information. The same information was also shared with and updated by various Unity and Electron apps via a legacy API. During the initial tests of the new games, several technical problems appeared which had direct impact on player experience. Despite the efforts, it proved very difficult to identify the root causes of these problems.
The Solution
Kryptium was engaged with the very clear objective to “help fix the problems” and a scope which would eventually depend on the findings of our team. We started with a due diligence of all software-related technology that was used in the new games: from Arduino sketches to the code behind the legacy API and the structure of the central database. The investigation led to the identification of multiple possible reasons for the problems and one root cause: the current architecture was too simple to handle the complexity and scale of the new games. In addition, various components had overlapping roles and there was limited real-time visibility into how each component affected game status.
Kryptium suggested a new architecture for optimised game status management, increased visibility, and clear separation of concerns between the various components while ensuring minimum impact on the already developed applications. The optimised architecture was implemented in 3 phases:
- The first phase introduced a new resilient layer for all communications between Arduino microcontrollers and the central database. The corresponding code used in the microcontrollers was also refactored.
- The second phase established a system for remote monitoring and centralised log management for all components.
- The third phase replaced the legacy API with a new one which implemented the same endpoints but with all the necessary mechanisms to support high volume traffic, failover management and detailed logging.
It is worth noting that the introduction of the new architecture not only solved software-related problems, but it also helped with the quick identification of the remaining electronics and networking problems of the IoT environment.
Technologies used
.NET Core, ASP.NET Core, Blazor, MySQL, Arduino, New Relic