Edif. Científico Técnico CITE-III, Universidad de Almería

PhD Manel Mena

News

/

New

Title:

PhD Manel Mena

Subtitle

May 2023

Web

Una arquitectura de microservicios para componentes digitales en la Web de las Cosas

 

Manel Mena Vicente

 

Supervisors: Luis Iribarne y Javier Criado

 

TIN2017-83964-R, Study of a holistic approach for the interoperability and coexistence of dynamic systems: Implication in Smart Cities models

 

Download thesis ]

 


 

ABSTRACT

 

In recent years, the use of Internet of Things (IoT) devices and Cyber-Physical Systems (CPS) has grown exponentially. According to the latest forecast by Cisco Systems, the number of devices connected to the Internet will be approximately 500 billion, and there are no indications that this upward trend will change. The large number of devices and their heterogeneity make establishing ecosystems of this kind a non-trivial task. Firstly, this type of devices is governed by a vast number of protocols, which makes software development, device usage, and integration overly complex. As a result of this same problem, the aspect of interoperability between devices and platforms also arises.
Another common issue when working with this type of devices is that, due to their low power consumption nature, they are often restricted in terms of computing power and memory capacity. This leads to communication bottlenecks, both when accessing their states (e.g., reading the temperature from a sensor, checking the status of a bulb) and when attempting to act upon them (e.g., turning on a device, changing the state of an actuator, etc.). Communication can be very slow, and in cases where the device receives many simultaneous requests, it may not be able to respond to all of them.
 
To address all the aforementioned aspects, this doctoral thesis proposes the concept of Digital Dice (DD). Digital Dice are virtual representations of physical elements (e.g., IoT devices or CPS) that aim to provide a series of improvements over them. Digital Dice propose a virtual abstraction of IoT devices or cyber-physical systems based on microservices and aim to be protocol-agnostic to users. In an initial approach, the integration of data protocols (e.g., MQTT) and semantic protocols (e.g., JSON-LD) was worked on. The following microservices can be part of a Digital Dice:
 
• Controller (C): This component manages the necessary functions for establishing communication with the user. Some of the methods or routes in this facet will require application-level or user-level authentication, or both. In other words, the user can only access these routes if they have the necessary permissions, and through a specific application. This communication will be conducted through a RESTful API initially, although the user will also be provided with a series of methods using the Server-Sent Events (SSE) protocol to receive real-time notifications.
 
• Data Handler (DH): This component is responsible for direct communication with the device's associated database. Its main functionality is to retrieve data that users want to access and store user requests that result in a state change of any interaction established by the device in the database. Additionally, it will also log any requests made in the system. For actuator devices, this service will record both the state change of the actuator itself and who performed the interaction. For sensor devices, it will log any state changes in the sensor, along with who accessed it and when, for further analysis. Besides these functionalities, this facet also allows querying the current state of the device and its associated state change history, supported by a document database, MongoDB, which offers scalability.
 
• Reflection (R): This component is responsible for establishing communication with the physical device, providing a single access channel, and "reflecting" any state changes that occur both in the physical device and the associated database. The component manages the translation of messages sent to and received from the physical device into a format that can be interpreted by the other components. For example, if the physical device uses a communication protocol like MQTT, it translates the incoming/outgoing messages into a JSON format, which is commonly used by the rest of the microservices (implementing the components).
 
• Event Handler (EH): This component is responsible for managing events occurring in the physical device, previously registered by the Reflection component. It is also responsible for listening to events (both external and internal) that may affect the device managed by the component's microservice.
 
• User Interface (UI): This component consists of a visual representation in the form of a web-based graphical user interface (Web Component) of the specific IoT or CPS device. Therefore, when the user only requires a direct graphical visualization of the device's state, they can make use of this capability.
 
• Virtualizer (V): This component is responsible for virtualizing the physical device, allowing for safe testing without affecting the actual device. This virtual representation is created by analyzing the information stored in the database, making it possible to perform tests without the physical device being connected.
 
Controller, Reflection, and Data Handler are mandatory microservices for any Digital Dice, while Event Handler, User Interface, and Virtualizer are optional, depending on the needs of the IoT device or cyber-physical system being represented by the Digital Dice.
The ability to replicate the facets (i.e., capabilities) of a Digital Dice, as well as its internal functioning, is what allows for scaling the requests received by IoT devices. Additionally, thanks to the principle of single responsibility in a microservices architecture, it is possible to scale only the facets that are most affected at any given time. For example, if the facet (i.e., component) receiving the most requests is Data Handler because multiple users are trying to access historical data of the device, then it will be possible to replicate only this facet.
 
Digital Dice also handles the possibility of managing what has been termed as a "causality model" or "causal relationships" in this thesis. Lastly, different strategies and mechanisms have been developed to ensure high availability (HA) in Digital Dice, which is a necessary property in IoT networks and cyber-physical systems, such as in Smart City models, Industry 4.0, or Smart Manufacturing.
 
The main contribution of this doctoral thesis is the proposal for managing and utilizing IoT devices or cyber-physical devices that enable interoperability and integration within a microservices architecture, following the standards set by the W3C's Web of Things. This contribution aims to abstract developers, experts, and users of IoT devices from the protocols they use to communicate with each other, as well as the protocols used to communicate with the systems that manage them.