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.