by Jacopo Parri, Samuele Sampietro and Enrico Vicario (University of Florence)
The JARVIS project (Just-in-time ARtificial Intelligence for the eValuation of Industrial Signals) exploits a domain logic of digital twins to connect the IoT layer with enterprise scale components in a Lambda architecture for Industry 4.0.
In the agenda of industry 4.0, connectFiion of low level sensors and actuators with enterprise scale components is a key enabler for horizontal and vertical integration, driving the shift towards smart factories and processes. 
The JARVIS project [L1] realises a framework supporting development, operation, and maintenance of industrial systems through the integration of enterprise scale information systems and processes with physical components equipped with telemetry and actuation capabilities. In this scenario, digital twins provide a digital replica of remote physical devices, modeling resources and processes through a software representation in which they are implemented as entity objects of a domain, reconciling the needs of different levels of abstraction and control.
The JARVIS project is co-funded by the Tuscany regional government (Italy) in the POR FESR 2014-2020 program and developed by the industrial PMI partners LASCAUX, SISMIC SISTEMI, JAEWA, and BEENOMIO, with the scientific support of the labs of Software Technologies, Artificial Intelligence, and Global Optimization of the University of Florence.
The general purpose of the project is to design and develop an hardware/software architecture, enabling efficient management of industrial devices, planning and scheduling of predictive maintenance tasks, and offline or real-time analysis of assets. A prototype implementation will be tested over a concrete operative scenario, demonstrating its application in the real case of road control systems.
JARVIS aims to:
- develop a domain logic that supports agile creation of digital twins through the Reflection architectural pattern;
- develop a Lambda architecture using digital twins to connect the IoT layer with enterprise scale components and data analytics;
- integrate an ecosystem of chatbots, intended as software systems (i.e. bots) capable of sustaining a dialog (i.e. chat) with autonomy and intelligence, to support mediation and inversion of responsibility in the interaction of users with digital twins and data analytics, and also to enhance customer care services and operations management services developed by LASCAUX and BEENOMIO;
- integrate a plurality of data analytics developed by the University of Florence, applying advanced methods of machine learning, optimization, and stochastic modelling that supports just-in-time maintenance and advanced interaction with users involved in operation processes;
- undertake the joint development of a reusable framework, validating it in in the real case of speed control and access regulation to limited traffic zones (ZTL) of some Italian municipal authorities, with the know-how of SISMIC SISTEMI.
Digital Twin in the JARVIS architecture
The core component of the JARVIS architecture is a domain logic hosting digital twins of physical devices and their compositions, based on a combination of the Composite design pattern and the Reflection architectural pattern  (see Figure 1), which provides a way to represent hierarchical aggregations and also offers a mechanism to modify dynamically at runtime the structure and the behaviour of a software application, splitting the domain logic into two parts, one reflecting the other.
Figure 1: UML class diagram of digital twins, modelled for the JARVIS project, showing the combination of Reflection and Composite design patterns. As a result one DigitalTwin instance can model both a single physical device, if it is a leaf (i.e. BasicComponent), or a composite system, if it is an aggregation of many sub-components (i.e. DigitalSystem). The association class DigitalRole is useful to distinguish between children components of the same type that contribute to the same higher level system.
According to the Reflection pattern, the base level defines the logic, exploiting the hierarchical and composite structure of digital twins; while the meta level describes types, relations, structures, statuses and behaviours of the base level, defining the hierarchical conceptual structure of installed field devices.
Digital twins are deployed at the core of a Lambda architecture , designed so as to promote fault-tolerance, high-levels of data ingestion, adaptability, and deployability (see Figure 2). The overall system is organised as a composition of distributed sub-systems, whose tasks and responsibilities are characterised as follows:
- a field system instance is responsible for acquiring and generating IoT data flows, sampled by a physical device during its operating lifetime (e.g. a ZTL gate with camera and sensors). Each relevant field system is associated with a digital twin, modelled into the domain logic of the enterprise information server (EIS);
- IoT data streams are transferred to the field data server (FDS), through an IoT broker, which filters and synthetizes them, just before storing as raw data inside a NoSQL DBMS. This sub-system accomplishes the role of speed layer, being responsible for big data ingestion;
- some of the persistent raw data could be manipulated and sent in push mode to any other sub-system through an enterprise service bus (ESB), which implements the publish and subscribe enterprise integration pattern (EIP), enabling communications between sub-systems within a scalable and decoupled infrastructure;
- the EIS implements the batch layer: a digital snapshot of device status (i.e. digital twins instances) is stored in a long-term consistent DBMS, receiving and adapting fine-grained data coming from the FDS;
- context interpretation and processing are delegated to a swarm of autonomous and independent agents that interact with digital twins, enabling descriptive, predictive and prescriptive analysis, through machine learning mechanisms and stochastic model techniques (e.g. predicting or detecting a malfunction of the ZTL gate in order to restore the field device). These agents are implemented inside the data analytics server (DAS), following a micro-services architectural style;
- the serving layer proposed by the Lambda architecture is designed over many sub-systems (i.e. FDS, EIS, and DAS), which expose data in different levels of granularity via REST services, enabling the implementation of a wide variety of clients.
The system allows both push and pull duplex communications among human operators and physical devices, realising a sort of inversion of responsibility that enables just-in-time maintenance of industrial plants. At the base, an ecosystem of chatbots has been designed to supply an instant messaging platform with a smart and dynamic behaviour.
JARVIS has been designed to manage data and informations in different degrees of variability, volume and speed; thus, it is possible to consolidate low granularity data streams, originating from IoT devices, into high granularity data at rest, through the abstraction of Digital Twins and Lambda architecture. Every sub-system, during its lifecycle, could have very different times and paces of maintenance; indeed, while DAS and UIs are supposed to change very often, EIS should have sporadic mutations and adaptations. To meet these requirements, a fundamental role is played by the reflective nature of the Digital Twins, which enables to modify types and behaviours of the domain logic, without re-coding or re-deploying each sub-system.
 F. Shrouf, J. Ordieres, G. Miragliotta: “Smart factories in Industry 4.0: A review of the concept and of energy management approached in production based on the Internet of Things paradigm”, IEEE IEEM2014.
 D. C. Schmidt, et al.: “Pattern-Oriented Software Architecture, Patterns for Concurrent and Networked Objects”.
 M. Kiran, et al.: “Lambda architecture for cost-effective batch and speed big data processing”, IEEE Big Data 2015.
University of Florence, Italy