Microservices and virtualization have recently revolutionized the world of software development bringing agility and innovation in this domain. Microservices promote the use of fine grained and independent services that are implemented as autonomous entities interacting each other through well known APIs: independent software modules ease the maintenance process and reliability, making it easier to identify which components fail, restart failed services or correct the identified problems. Virtualization helps instead to decouple hardware resources from software: software can run on multiple hardware architectures and can be easily moved and shifted from one server to another. With the advent of containerization technologies (such as Docker for example) microservices can be realized as “containers” that result to be extremely fast to start up and can be easily deployed (using a common packaging mechanism) and can be easily released and shared via common repositories (like the Docker Hub).
Many companies have already understood the benefits of such technologies and embraced them starting to benefit of them in the cloud, when deploying their solutions, making their applications highly available, scalable and adaptable to their business needs.
Benefits of these technologies in the cloud are widely acknowledge, but what about microservices, containerization and the Internet of Things (IoT)?
Recent improvements on using these technologies not only in big servers of data centres but on constrained devices (like, for example, a Raspberry PI board) have opened the possibility to rethink how a critical component of IoT solutions i.e., the IoT gateway can be build following a modular and flexible architectural approach. An IoT gateway is the component that talks and interact with IoT devices and has to support a plethora of different communication protocols (like for example, BLE, ZigBee, LoRa or many other proprietary wired protocols) so a multitude of software components serving the various protocols can be envisaged. Modularity can help to create adaptable gateway solutions fitting specific requirements for device support and limiting maintenance, fixing and troubleshooting of software solutions. The same can happen when deciding which IoT functionalities are needed and have to be on-boarded in the gateway for a specific IoT solution. This and much more is what the AGILE project, an EU funded project (under the H2020 Framework Program) that aims to foster and address.
AGILE aims to build a language-agnostic and modular software gateway framework for the IoT with support for protocol interoperability, device and data management, support for IoT applications execution and external cloud communication. The framework is for both for developers who wish to quickly prototype IoT solutions and for end users who want to easily customise their gateway based on their context and have full control of their data and devices.
Main driver for the design and implementation of AGILE architecture are the following principles:
- Need for strong modularity: to support most common features for an IoT gateway such as IoT/M2M protocols, different databases for local data storage, different security modules, and to allow at the same time developers to easily plug-in new modules implementing additional/proprietary protocols for inter-device or cloud communication or extending it plugging in additional features (different database support, security, etc.).
- Address a language-agnostic approach, offering support for more than one runtime and programming environment; AGILE components identified for integration (protocol libraries, user interfaces, etc.) use in fact different runtimes (such as Java, Python, Node.js). This objective is maintained to avoid constraining external developers into using one only specific runtime environment or programming language for developing their application on top of the AGILE software components.
- Support for user interfaces that simplify user- (developers and end users) interaction with the core AGILE modules (such as device management, data management, protocol support, application design and execution, etc.).
AGILE adopts a microservice architecture for its solution. The following picture represents the modular architecture of the AGILE framework that highlights the central role of the AGILE API in enabling communication and interaction of the various independent microservices offering a core set of capabilities that are always extendable via integration of third party open components simply adopting the AGILE API specification to internally cooperate and interact.
The AGILE Modular Architecture Approach
The following picture represents instead AGILE microservices that will run partly in the cloud and partly on the IoT Gateway.
AGILE Software Architecture: Development View of Microservices
At the gateway level, we can identify the gateway operating system hosting the whole AGILE services and applications (based on Linux distributions, targeting multiple architectures such as ARM and x86/x86 64 architectures), the containerization infrastructure (based on Docker) allowing us to encapsulate AGILE services and AGILE applications into isolated microservices, and the remote gateway and fleet management components used to remotely manage Gateway resources and the IoT applications hosted ion the gateway itself.
On top of this infrastructure we have the AGILE Framework, i.e. the set of microservices offering:
- Communication Protocol Services – such as e.g. Bluetooth/BLE, ZigBee, Zwave, etc., developed as independent microservices and offering a set of common services for device communication and interaction;
- IoT Device and Data Management Services – device registry services and a generic interface to interact with all managed devices and services to manage data generated by them;
- IoT Gateway Management Services – services for managing gateway resources like CPU, network, local storage, operating system (management of software updates), control of the I/O board, gateway reboots, etc.
- Gateway Configuration and Recommender Services – services supporting the user in the proper configuration of the gateway and its components considering network connectivity, security, privacy, and data sharing policies the developer wants to use/enforce.
- Developer Tools – i.e. a visual environment for the creation of IoT workflows and to manage deployment of IoT apps into the AGILE gateway.
- Security Components – user authentication, encryption, and data access control services.
The gateway will offer also a dedicated environment to host local IoT AGILE applications deployed and running into AGILE Gateway itself.
At the core of AGILE Gateway stays the AGILE API, the main integration layer of capabilities offered by the AGILE Gateway to developers, exposed in the form of an efficient internal bus and in the form of a restful API for exposing AGILE services to application developers.
The Cloud part of AGILE is composed by a set of microservices that will implement AGILE cloud capabilities needed to handle AGILE apps in the cloud (an IoT Apps recommender, the IoT Apps repository hosting application to be downloaded and installed in the gateway, and the services to remotely deploy IoT in the gateway), together with microservices handling external clouds integration and services for remotely manage the gateway from the cloud.
So what’s next? If you want to know more about AGILE and follow its progress please subscribe to AGILE newsletter here. First AGILE software release has already been made available on GitHub and a major release is planned for the following months.
- Fabio Antonelli, Create-Net