BRAIN-IoT: Model-based Framework for the Development, Deployment and Management of Distributed IoT Applications

IoT applications are composed of a highly heterogeneous interconnection of distributed platforms and devices offering a wide diversity of capabilities. BRAIN-IoT focuses on the realization of a framework and methodologies for fast and safe implementation of intelligent IoT applications leveraging on Component-Based Development and Event-Driven dynamic deployment techniques, similar to Function-as-a-Service (FaaS) paradigm. The objective is to provide a software engineering approach, which enables the advanced exploitation of the full range of diversity in Smart City and Industry 4.0 environments. Such environments promise to be orders of magnitude more sophisticated than traditional Enterprise ones. They will be massively distributed, heterogeneous, federated, and co-evolving software ecosystems: adapting, changing, and scaling in response to local requirements and environmental changes. For such software ecosystems to be economically sustainable, operational simplicity, maintainability, and runtime adaptive must be intrinsic to their architectures; for this reason, these non-functional requirements are basic objectives for the development of a solution in this field. BRAIN-IoT allows the design of IoT applications composing and orchestrating existing IoT Platforms. Components orchestration is implemented via modeling, code-generation and deployment of relevant software artifacts, which implements Smart Behaviors and Adaptation Layers, both in a static and Event-Driven way. BRAIN-IoT implements its core capabilities leveraging and extending different ECLIPSE tools such as Papyrus and SensiNact.


The next generation of Smart City and Industry 4.0 applications will be geographically distributed, heterogeneous, co-evolving software ecosystems, significantly more sophisticated than the current Enterprise or Cloud compute environments. To be economically sustainable and achieve solution longevity, these software ecosystems must be operationally simple, cost-effective to maintain over extended periods of time, and able to adapt to both changing environmental conditions and service requirements in a cost-effective way.

Software Systems continue to be built for fixed unchanging production environments with pre-determined functional behaviours. The issues of operational complexity, maintainability, and economic sustainability tend to be ignored. Planned functional changes, or changes forced by the underlying runtime environment, are still treated as exception behaviours. Attempts to increase agility are then pursued by a DevOps model: this results in increasingly tight-coupling between the production environment and the source development teams. While this is manageable for enterprise and centralized cloud environments, which, to varying degrees of success, enforce homogeneous Information Technology (IT) environments, the approach fails in highly heterogeneous and evolving ecosystems of inter-related software services.

Smart City and Industry 4.0 environments promise to be orders of magnitude more sophisticated than traditional Enterprise environments. Such environments will be massively distributed, heterogeneous, federated, and co-evolving software ecosystems: adapting, changing, and scaling in response to local requirements and environmental changes. For such software ecosystems to be economically sustainable, operational simplicity, maintainability, and runtime adaptivity must be intrinsic to their architectures; for this reason, these non-functional requirements are basic objectives for the development of a solution in this field.

The BRAIN-IoT Solution

A BRAIN-IoT Federation is a geographically distributed entity composed of two or more BRAIN-IoT Fabrics; a BRAIN-IoT Fabric is a data-center centralized structure composed of one or more Fibres (each an OSGi framework); a Fibre may dynamically assemble composite OSGi functions or services, or where required, act as a local management agent controlling traditional applications deployed as container images. BRAIN-IoT Fabrics are self-contained entities with relocatable management services, which provide device discovery, search, composition and orchestration, allowing the rapid deployment of applications. Each BRAIN-IoT Fabric is able to dynamically deploy Smart Behaviours to appropriate resource within the environment in response to environmental triggers. The approach taken is conceptually similar to compute Lambdas made popular by Amazon Web Services (AWS); but more sophisticated in that the required behaviours are dynamically installed at the most appropriate points within a highly heterogeneous environment. The BRAIN-IoT federation achieves this by leveraging the Requirements and Capabilities metadata provided by default by all OSGi Bundles. To create Smart Behaviours, BRAIN-IoT framework includes model-based tooling that is compliant with Internet of Things Architecture (IoT-A) and optionally, via the use of Behavior, Interaction, and Priority (BIP) allows verifiability of runtime behaviours. The solution presented is part of the BRAIN-IoT framework that aims to support smart autonomous and cooperative behaviours across populations of heterogeneous Internet of Things (IoT) entities; an example of which may be heterogeneous agent-based CPS. For this population of entities, BRAIN-IoT also includes mechanisms to enforce privacy and data ownership; and uses open semantic models to enable inter-operable operations and exchange of data and control features between members. A primary requirement of BRAIN-IoT is to accommodate environmental and functional: i.e., environmentally triggered adaptations, where a new physical device/entity is encountered, which must be managed/interacted with; self-repair /re-optimization, where unforeseen failures occur within the environment or more appropriate resources are made available; adaptation to environment requests, spanning from simple cases, like scaling in response to load, to sophisticated behaviours. Smart Behaviours address these requirements. Each BRAIN-IoT Fabric is able to dynamically deploy them to appropriate resource within the environment in response to environmental triggers. If the required behaviours do not exist in either the runtime or the Smart Behaviour repository, then they may be rapidly created via the BRAIN-IoT modelling process. Sophisticated aggregate behaviours can be achieved via chaining together simpler behaviours: these behavioural chains are automatically assembled by each BRAIN-IoT Fabric. From a Complex Adaptive System (CAS) perspective, the approach pursued can also be thought of as analogues to a simple Urn Model example: the Smart Behaviours Bundle Requirements/Capabilities metadata represents the Boundary, while the Smart Behaviours Events represent the corresponding Signals.

BRAIN-IoT Fabric is comprised of the following three structural layers.

Physical: The set of physical computing resources within the physical environment to be managed (e.g.,Linux Servers and Robot Operating System (ROS) Robots). Physical resources may be introduced into, or removed from the environment at any point.

Fabric: To create a Fabric, a set of OSGi/Java agents and infrastructure services are installed upon this physical layer, which provide BRAIN-IoT's consensus, discovery, system provisioning, and communication services.

Systems: A System is a distributed entity composed of a set of interrelated software components. One or more systems may be deployed to a Fabric. In response to an Operator Command or an Environmental Trigger, the BMS component is responsible for selecting the most appropriate Smart Behaviour from the BRAIN-IoT Marketplace, selecting the most appropriate BRAIN-IoT node/s. Also, each System may include System Parts for functional components that are known in advance to be needed in the target environment: i.e., for physical device integration BRAIN-IoT Edge nodes require sensiNact gateways.

Smart Behaviours: Smart Behaviours define the final structural layer of a BRAIN-IoT environment. In response to environmental triggers, each BRAIN-IoT System is capable of dynamically deploying sets of interrelated Smart Behaviours. These Smart Behaviours may be generic in nature or specific to a particular runtime environment and use-case. BRAIN-IoT provides a model-based framework for the modeling and creating of dependable sensing and actuation in intelligent decentralized IoT systems; which are referred to as 'Smart Behaviours'. The resultant software artifacts may be released into a BRAIN-IoT Marketplace and made available to one or more BRAIN-IoT Fabrics. In addition to Smart Behaviours, the BRAIN-IoT modelling environment may also create required System Descriptions with appropriate system parts. As shown in Figure 1, one or more Fabric(s) may import specified Systems from the BRAIN-IoT Marketplace:

  • Different Fabrics may import the same System: i.e., System 1 is imported to Fabric 1 and Fabric n.
  • A Fabric may host multiple Systems: i.e., Fabric n imports System 3 and System 1.

In contrast to the current Agile Continuous integration/Continuous delivery (CI/CD) Industry practices of pushing developer changes as rapidly as possibly into Production, the BRAIN-IoT Marketplace provides essential decoupling between the development and the runtime. Developed artifacts are pushed to the repository, then pulled from the repository as and when required by each BRAIN-IoT Fabric.

Figure 1: Relationship between Modeling Tool, Marketplace and Runtime Infrastructure

Use Cases

BRAIN-IoT solution is tested and evaluated in two futuristic scenarios, namely Service Robotics and Critical Infrastructure Management.

Service Robotics

The Service Robotics use case will involve several robotic platforms, like the open-source Robotics Operating System (ROS), which need to collaborate to scan a given warehouse and to assist humans in a logistics domain. The term Service Robotics is generally related to the use of robots to support operations done by humans and the logistics domain is one of the more interesting, for the presence of several tasks, where the robots can help the workers, making their tasks easier and safer. For example, they can cooperate to move a heavy object from one place to another. At the same time, robots involved in the scenario should scan the whole warehouse and update in real-time informative interfaces for the managers and the workers (e.g. warehouse's map), sharing the collected information. In addition to the information related to the maps of the whole monitored area, the connected robots will also be equipped with a set of sensors, which will allow collecting interesting information, like room temperature, presence of humans or presence of obstacles in the robot-path. Since several robots collaborate to collect the information, they can keep the status of the area updated in real-time and balance the effort required among them. In the beginning, the robots are configured with some default information, like the map of the warehouse. Then, this information is updated in real-time, while the robots perform their main tasks. The demonstration use case proposed will include both real-time collection of data and control of the included robots. Particularly, the actuation of these robots will be an interesting test-bed for the platform, to demonstrate how the solutions developed by BRAIN-IoT allow to control remotely, in a standard way, the complex devices involved in this scenario.

Critical Infrastructure Management

The Critical Water Infrastructure Monitoring and Control use case focuses on the management of the water urban cycle in metropolitan environment of Coruna. The base of this system will be made of a complex portfolio of probes, meters, sensors, devices, and open-data sources deployed on the field, including water, flow, and pressure meters on the water mains; smart devices, which measure the main chemical-physical characteristics of water; pluviometers, which can monitor the level of rainwater in a specific zone; water circular pumps, which can be used to control the flow of liquids in heating systems. These devices will be geographically distributed, heterogeneous and will be provided by different owners: directly by the water utility, by end-users themselves or by third-party service providers, like, SMEs providing ancillary water services. For this reason, there will be different data involved in these scenarios: meteorological open data, reservoir water level data, purification data, distribution data in the various subsystems, customer data in urban water supply processes, sewage collection and sewage treatment data in different subsystems. The collection of all this data will allow to provide value-added services, like showing to the client, commercial or not, the quality of the water provided to them or the possibility to react quickly to critical situation and to do predictive maintenance, through the ability to detect anomalous behaviours and to fix them before they become an issue difficult to be fixed. The BRAIN-IOT solution will enable this scenario, allowing to collect data from all the different domains and to actuate the devices where needed. The WOT-based approach used for the design of the platform will be leveraged to collect the data, provided by different IoT platforms, using heterogeneous protocols and data formats. Specifically, the use case will involve SICA-EMALCSA platform, SOFIA2 platform, MACRAUT platform, AGATA platform and other private platforms. Furthermore, BRAIN-IOT will focus particularly on designing and developing ways to control devices abstracted by these solutions.


The symptoms caused by system complexity are increasingly encountered and understood in the context of both Industry 4.0, and for Smart City projects. Operational complexity is rapidly becoming an operational roadblock. To meet the environmental, social and economic potential promised by Smart City and Industry 4.0, this issue must be addressed: tomorrow's sophisticated software ecosystems must be dramatically simpler to manage, maintain, adapt, and evolve. To achieve this objective, the IT industry must look towards the science of Complex Adaptive Systems for guidance. This paper presents BRAIN-IoT consortium's attempts to pursue this engineering philosophy. By leveraging existing open Industry Standards for modularity (OSGi), the BRAIN-IoT delivers a software ecosystem capable of deploying/assembling, orchestrating, and managing sophisticated IoT applications. Conceptually, it is similar to, but significantly more flexible than compute lambdas; BRAIN-IoT demonstrates how sophisticated distributed behavioural pipelines of software components can be dynamically assembled, in response to environmental triggers. Meanwhile, by pursuing a modular structural hierarchy (i.e., an holonic approach), BRAIN-IoT enables the natural creation of federated distributed environments ideally suited to the demands of both Smart Cities and Industry 4.0. The BRAIN-IoT project demonstrates how these concepts can be applied to a variety of real-world scenarios to create high-value services: the chosen use cases demonstrating the flexibility of the BRAIN-IoT approach within a diverse set of operational environments. The Robotics warehouse use case demonstrates BRAIN-IoT's use in highly automated, dynamic, and adaptive manufacturing environments. In contrast, the second use case concerns the monitoring and control of public water management infrastructure for the city of Coruna and demonstrates the use of BRAIN-IoT in mission-critical human-in-the-loop Operational environments. Operational simplicity and robustness remain paramount considerations. Hence, in addition to developing the functional elements required to deliver the target Use Cases, BRAIN-IoT will continue to escalate the severity of cascading failure events and test BRAIN-IoT's mean-time-to-recovery abilities.

Additional Information

Learn More About

Authors of Article

Enrico Ferrera is a Senior Researcher and Project Manager at LINKS Foundation, Turin, Italy. His working activities are in the area of systems interoperability, Internet-of-Things (IoT) and distributed intelligent systems. He is currently working in projects addressing autonomous systems, cyber-physical systems (CPS), and IoT with applications in home automation, smart cities, energy, industry 4.0, sustainable process industry (SPIRE), connected vehicles and robotics. He co-authored several technical articles, conference papers and book chapters, and he is also involved as program committee member in international conferences. He is actively participating in national and international/H2020 EU research and large-scale pilot projects in IoT/CPS, autonomous systems, process optimization domains. As project coordinator of BRAIN-IoT, he is actively involved in the European Cluster of security and privacy projects.
Davide Conzon received the Bachelor of Science in computer engineering in 2005 and the Master of Science in Computer Engineering with specialization "Multimedia and Software Applications" in 2007 both at Politecnico di Torino. Currently he is working in LINKS Foundation where his research interests are focused on the Internet of Things infrastructure and applications; particularly, he is the main responsible of the teamwork that works on design and development of VIRTUS, an XMPP-based IoT middleware software. He participated in several national R&D projects including following EU funded R&D projects: ebbits (FP7 IP), IMPRESS (FP7 STREPs for EU-Brazil collaboration), SatisFactory (H2020 - FoF - IA) and CPSwarm (H2020-ICT-01-2016) within which he has designed and developed software for the easy integration and virtualization of devices and robotics simulation tools. Since April 2015 he is a member of the XMPP Standard Foundation.
Xu Tao received her Bachelor Degree in Computer Engineering from Politecnico di Torino as an exchange student in 2015 October, then she continued her education path here and, in April 2018, she received the master's degree in Computer Engineering at the Politecnico di Torino with a master thesis entitled "A Policy-Based Architecture for Container Migration in Software Defined infrastructures", carried out at Saint Louis University in USA . From March to April 2017, she did an internship as a software developer at Seica (Turin, Italy), a global supplier of automatic test equipment and selective soldering systems. During this experience, she was evolved in the Software Group, where she contributed to develop a cloud bridge for Automation Smart Home System. Since May 2018 she joined LINKS Foundation as researcher of the Pervasive Technologies Area.
Dr. Richard NICHOLSON founded Paremus in 2001 and seeing little Industry progress in the delivery of Autonomic systems; created the Service Fabric concept: a highly modular, self-assembling federated runtime platform; built from the ground up leveraging OSGi™. A Physicist by training, Richard maintains an academic interest in Complex Adaptive Systems and the relevance of Biological and Ecological structural patterns to the next generation of Smart City, Industry 4.0 & 5G Edge Cloud software to deliver tangible business benefit: i.e. containment of structural Complexity; optimising business Agility and ultimately economic sustainability. Richard is actively involved in IT industry standards bodies including a Board Member of the OSGi Alliance and the Urban Technology Alliance.
This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 780089