You are on page 1of 6

2020 International Conference on Decision Aid Sciences and Application (DASA)

InteroEvery : Microservice Based Interoperable


System

Badr El Khalyly 1 Mouad Banane3


Laboratory of Information Technology and Modeling
Laboratory of Information Technology and Modeling
Hassan II University, Faculty of sciences Ben M'sik,
Hassan II University, Faculty of sciences Ben M'sik,
Casablanca, Morocco
Casablanca, Morocco
mouad.banane-etu@etu.univh2c.ma
badrelkhalyly92@gmail.com
Abdessamad Belangour4
Allae Erraissi 2
Laboratory of Information Technology and Modeling
Laboratory of Information Technology and Modeling Hassan II University, Faculty of sciences Ben M'sik
Hassan II University, Faculty of sciences Ben M'sik, Casablanca, Morocco
Casablanca, Morocco belangour@gmail.com
allae.erraissi-etu@etu.univh2c.ma

Abstract—The advent of Connected objects has been causing microservice-based IoT system that ensures applicative
a significant technological revolution. Researchers, Designers, interoperability between different objects. This paper shall
and developers have been mobilized to develop solutions that focus on the applicative interoperability, which means
can reach final users in several domains. Solutions that can connecting devices that use different protocols from IoT stack
make the interaction between users and objects easier and application level. The paper is organized as follows: this work
handier. Therefore, so many efforts have been made to facilitate shall talk about the scientific efforts in the microservices-
device control. A heavy synergy has been carried out as well to based platforms, and the scientific efforts that have been made
connect objects as a part of the Machine-to-Machine pattern. in applied interoperability to the Internet of things (Section 2).
Fitting together objects have to take into consideration the
The paper describes the system components and talk about
heterogeneity of communication protocols. Brands and
companies produce devices that enable the use of different
microservice patterns that are used in this distribution (Section
protocols from physical to application layer. Each brand adopts 3). Then, the work describes as well the application lifecycle
certain protocols in its product that may differ from other through an experimental example to show the machine to
brand’s products. This issue meets the challenge of machine behavior covered by InteroEvery.
interoperability. The building of Applications and solutions that
can monitor objects follow many architectural styles. Nowadays, II. RELATED WORK
the trend of architectural style is microservices. The In the literature, there are several papers [1] [2] [3] [4] [5]
Deployment of these applications can be performed on three [6] [7] that tackle microservices-based Internet of things
levels: Edge – Fog – Cloud. This deployment level mobilizes the platforms. Their common purpose is to propose an
integrators to create and innovate deployment and integration architecture that helps the final user to control the objects with
strategies. This paper will fit together these paradigms to create loosely coupled solutions. The heterogeneity of device
a solution that will meet the need for interoperability concerning protocols pushed authors to carry out an architecture that fit
the needs of final users. devices together. In [8] paper, authors talk about different
interoperability levels. The paper [9] talks about Taxonomies
Keywords—Interoperability, Microservices, Internet of
Things, Model Driven Engineering.
and Open Challenges in Interoperability regarding the area of
Internet of Things. Authors talk in this paper about Device
I. INTRODUCTION interoperability - Network interoperability - Syntactical
interoperability - Semantic interoperability - Platform
There is an increasing demand for applications on the part interoperability – Cross-domain interoperability. They talk as
of companies. The business logic of applications that perform well about Interoperability handling approaches in IoT such
the data processing and monitoring may change following the as Adapters/gateways - Virtual networks/ overlay-based
domain requirements. Companies that produce things – solutions - Networking technologies - Semantic web
sensors and actuators – are not obliged to change and adapt technologies – Other open challenges. In the paper [10], the
the protocols that are implemented in these things to authors propose a solution to interoperability. In their
communicate with other devices. The systems that monitor architecture, they defined a multi-protocol proxy. This
and perform parameters and data processing have to develop component handles multiple heterogeneous protocols in one
a logic that adapts the incoming data from devices and make service. This solution is complex because if a user want to
a transformation model to be sent to other devices. The system change the logic of the protocol handle, he has to change the
in question has to ensure the interoperability of heterogeneous whole code of the multi-protocol proxy. In the paper [11]
devices. Heterogeneous devices means devices that use authors propose a multilevel interoperability solution that
communication protocols that differ from communication connects heterogeneous objects that communicate with
protocols of other devices. The incoming information from different protocols at a different level: Technological –
such a sensor can be used to power several actuators. It is Syntactic – Semantic - Organizational. This solution is not
relevant to have a system that creates virtual objects for based on microservices. The changing of one of the
sensors to address the incoming information to be used by components will affect the rest of the whole system. No work
other devices. This paper aims to connect heterogeneous talks about microservice-based IoT applicative
objects that use different application protocols by proposing a interoperability platform, which links devices that use

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE

978-1-7281-9677-0/20/$31.00 ©2020 IEEE 320


2020 International Conference on Decision Aid Sciences and Application (DASA)

heterogeneous application layer protocol. (i.e. AMQP, COAP, ensure the granularity of each service, as well as the
MQTT). customization of each microservice, and the facilitation of
continuous integration. This system will connect objects
This work is to propose an architecture of the Microservice without modifying the edge computing level. That means the
IoT platform to meet the need of applicative interoperability. user can connect heterogeneous devices without modifying or
The principal purpose of this architecture is to connect touching the source code of the devices that control actuators
heterogeneous devices without modifying them or adapting and sensors. This system will just gather information from
the edge code source that is deployed and uploaded on these sensors that use such an application protocol and perform an
devices and allowing the developers to modify the business adaptation to send it to the actuators that could use different
logic of microservices without impacting the rest of the application protocols.
system. This work answers the following question: How can
use microservices to create an interoperable system? B. System stakeholder
III. THIS PROPOSED SYSTEM The Manufacturer: it is the company or the company that
manufactures this object. Its role is limited to providing the
It is a platform that allows the interoperability of pairs of metadata of the Manufactured product. He is not required to
objects that communicate with heterogeneous protocols at the change the content of his product so that it adapts or so that he
application level based on microservices (for example a sensor can communicate with other products. It is not necessary to
communicating in AMQP with an actuator communicating in change the protocol of the application layer (i.e.: MQTT[13],
MQTT). The principle is to build a weakly coupled system in REST[14], COAP[15], XMPP[16], STOMP[17],
order to meet interoperability requirements. This solution also AMQP[18]).
makes it possible not to modify or touch the content of
physical objects. Companies are not obliged to modify the The local user of the ecosystem: It is the user who sets the
protocols or contents of their objects to be able to solution and registers the objects and chooses the pairs of
communicate with other objects. The system will retrieve the objects that are intended to communicate. The system
information from an object that sends the information via a administrator: It is the user who manages authentication and
specific protocol and performs a transformation in order to authorization, and feeds the system reference data.
send it to other objects that communicate with a different C. Description of system components
protocol. The system stakeholders are as follows:
Manufacturer - User - System administrator. The offered solution ensures interoperability at the
application level based on microservices. The microservices
A. System purpose that make up the system are JWT authentication micro-service
This solution is intended for different users in different - object registration micro-service - Interoperability micro-
types of ecosystems. In each ecosystem, this solution can be service - Object connectivity monitoring micro-service -
used to ensure M2M behavior [12]. The requirements of an Adaptation micro-service - Agents launched by adaptation
interoperable system to constitute a weakly coupled system micro-service.
demand the adoption of a microservice ecosystem. These will

Figure 1: Diagram of components of InteroEvery.

321
2020 International Conference on Decision Aid Sciences and Application (DASA)

The system is also composed of a set of data sources: a belongs to a "Category" such as Temperature - Humidity - DC
data source of the registration microservice - an Motor - Ultrasonic Sensor.
interoperability microservice data source. The system uses a
universal Broker that links the interoperability microservice to 4) Interoperability Microservice
the different adaptation microservices based on choreography Database per service [21] as its principle indicates,
patterns. stipulates that each microservice has its database. This implies
that each microservice must keep its granularity. Required
1) Object information from the microservice B database, it is necessary
The physically connected objects are divided into two to develop a query command for µS A to interoperate
categories: Sensors and actuators. The sensor is used to microservice B and the latter provides the required
provide physical quantities. The actuators operate according information. This Database per service pattern is applied for
to the values perceived by the sensors forming an intelligent both Interoperability & Registry microservices. This
agent. The sensors have categories like (example: microservice allows the coupling of objects/agents by
Temperature - Humidity - Gas - Proximity sensor etc.) this combining objects. This microservice allows you to select an
categorization allows the system user to determine the types actuator and display the list of sensors that the actuator
of data that capture and expose as (celsius - degree - cm). The expects. This microservice retrieves the list of recorded data
actuators are also categorized (MotorDC - Bulb - Display) and sensors from the recording microservice using a Database per
determine the category of sensors whereby they communicate, service. The user selects for each actuator a sensor proposed
in other words, the actuators anticipate information provided by the system that corresponds to the type mentioned in the
by the sensors. These metadata will constitute the distributed metadata of the objects in the microservice database. The
data source model for the registry microservice. This Database per service application is demonstrated in the
information must be provided by the manufacturer as an following diagram:
effective actor in this system and inserted by the user
(Architect - Urban planner - Single user).
2) Authentication Microservice
This service authenticates system users. Authentication is
based on the JSON Web Token (JWT) [19]. The data source
for this Microservice is as follows:

Figure 2: Database Schema of A Microservice.

All interfaces are linked to the micro-service by


implementing the "Client-side UI composition" pattern. This
pattern [20] states that the front-end implements the part of the Figure 4: Communication between Registry Microservice &
screen for the service that is linked to. Interoperability Microservice.
3) Repository Microservice The selected couple is recorded in the database of this
This microservice allows the objects to be recorded, either microservice. Then, taking into account the couples of
by uploading the metadata files provided by the manufacturer protocols constituted, a REST request is sent to the
or by the user of the system who fills in a web form. This appropriate micro service. For example, if an object pair is
information is stored in the database whose scheme is created: actuator operating in MQTT, and a sensor operating
explained as indicated below: in REST, a request is sent to the MQTT/REST adaptation
micro-service. This microservice is the orchestrator of other
adaptation microservices. The scheme of the microservice
database is as follows:

Figure 3: Database Schema of Registry Microservice.

The information about registered things will be used by the


interoperability Microservices via a REST request. The
scheme of the microservice database of registry is as follows:
Thing" relation belongs to a type that determines whether Figure 5: Database Schema of Interoperability Microservice.
the object is a sensor or actuator. The "Thing" relationship

322
2020 International Conference on Decision Aid Sciences and Application (DASA)

The data source consists of a single table that provides microservice in order to interconnect them. This microservice
information on the connected sensor and actuator torque. This is run as a runtime script that retrieves the physical quantities
micro-service is accessible through a graphical interface. from the sensor and sends it to the actuator to make it work.
The Interoperability Micro-Service and the Adaptation Micro-
5) Adaptation Microservice Services form a choreography as shown in this figure below:
This microservice performs the creation of virtual objects
for the pairs of objects formed in the interoperability

Figure 6: Adaptation Microservices - Parts of choreography controlled by Interoperability Microservice.

As part of the choreography, this microservice is


subscribed to the MQTT topic that has been provided by the
system and listens to the publications of the interoperability
microservices. The Interoperability Microservice provides
the Adaptation Microservice with information on protocols,
URLs, and topics of the two objects that user wants to
combine. For example, for an object pair: actuator operating
in MQTT, and a sensor operating in REST, Adaptation
Microservice MQTT/REST creates a client that calls the
remaining URL of sensor, recovers the physical quantity, and
sends it to the MQTT topic to which the actuator is
subscribed. That actuator acts according to the values that are
Figure 7: Mounting Arduino Uno with DHT11.
gathered from the sensor.
IV. PROOF OF CONCEPT
As a proof of concept, in order to validate this approach a
tool is developed as a feasibility prototype.
The microservices of the architecture are developed using
Spring Boot, Rest, RabbitMQ as a broker, and Angular for the
frontEnd part. MySql Database Management System is used
to create the data sources for each microservice. Two objects
are used to validate this approach with the implemented
system: a DHT11 temperature sensor communicating in
REST. And a ServoMotor actuator communicating in MQTT.
These two objects are linked to an ARDUINO
microcontroller on which the temperature capture program Figure 8: Mounting Arduino Uno with ServoMotor.
and the program that runs the ServoMotor actuator are
respectively uploaded. It is the object manufacturer who is DHT11 sensor is supposed to connect to with the
supposed to program these Arduino cards. servoMotor actuator. DHT11 exposes a REST API that is
accessible through a URL and which returns as a response to
the temperature values.

323
2020 International Conference on Decision Aid Sciences and Application (DASA)

ServoMotor expects numerical temperature values The system provides a graphical user interface for the
received and sent by DHT11 so that it can rotate according to interoperability microservice as follows:
these values. The manufacturers of DHT11 and ServoMotor
have provided information about their products.
A. Registration of objects
First, user starts by entering information about the actuator
in the graphical user interface linked to the recording
microservice as follows:
Figure 11: Interoperability microservice screen.

Select the actuator you want to connect: Respecting the


database per service pattern stipulates that no microservice has
the right to access the data source of other microservices. If,
for example, microservice A requests information from the
data source of another microservice B, microservice A is
obliged to go through the query or invocation of the API of
microservice B and the latter returns the requested information
to microservice A. Following this pattern, the interoperability
microservice queries the recording microservice and asks it
for the list of sensors belonging to the category expected by
the selected actuator.

Figure 9: Recording screen for actuator.

In the actuator registration section, user registers the name


of the type it belongs to - in this case it is ServoMotor - and as
Figure 12: Interoperability microservice screen - Actuator
it works in this case in MQTT user mentions the broker URL
selection.
and the topic it is subscribed to. User also registers the type of
sensor from which this actuator expects the values to come
C. Launch of suitable adaptation microservice
from. After recording the information about the ServoMotor
actuator, user record the information about the sensor which By clicking on Connect, the sensor/actuator combination
exposes a REST API which returns the temperature values is registered in the interoperability database, then it calls up
that the actuator expects to operate. the appropriate matching microservice in this case it is the
MQTT/REST microservice and sends it the information about
the sensor and the actuator that user wants to connect.

Figure 13: Interoperability Microservice Display -


Figure 10: Recording screen for sensor. Sensor/Actuator Linkage Established.

The sensor name "DHT11", the sensor category This MQTT/REST adaptation microservice uses the
"Temperature", the protocol with "REST", the URL and the REST API of the sensor, retrieves the temperature values, and
port "localhost/9096" are stored. The information on the publishes them in the topic to which the "ServoMotor"
ServoMotor actuator and the DHT11 sensor is stored by the actuator is subscribed to run it. This can be seen in the
microservice registry in its own database "dbmetadata" in database :
accordance with the "database per service" principle:
B. Connecting objects
After the registration phase, the system redirects the user
to the interoperability microservice. This microservice is Clicking on disconnect interrupts the connection between
responsible for the construction of the couple of objects that the sensor and the actuator, as shown in the following figure:
user wants to connect in this case - the ServoMotor actuator
and the DHT11 sensor.

324
2020 International Conference on Decision Aid Sciences and Application (DASA)

V. CONCLUSION [8] M. Noura, M. Atiquzzaman, and M. Gaedke, “Interoperability in


Internet of Things: Taxonomies and Open Challenges,” Mob. Networks
In this paper, the need to link objects that are Appl., vol. 24, no. 3, pp. 796–809, Jun. 2019, doi: 10.1007/s11036-018-
heterogeneous at the application level is described. How can 1089-9.
micro-service be used to interconnect objects that [9] M. Noura, M. Atiquzzaman, and M. Gaedke, “Interoperability in
Internet of Things: Taxonomies and Open Challenges,” Mob. Networks
communicate with application layer protocols that differ from Appl., vol. 24, no. 3, pp. 796–809, Jun. 2019, doi: 10.1007/s11036-018-
each other? For this reason, the need for interoperability at the 1089-9.
application level is identified. This work started by defining [10] I. P. Zarko et al., “Towards an IoT framework for semantic and
the levels of interoperability. Each level of interoperability organizational interoperability,” Aug. 2017, doi:
10.1109/GIOTS.2017.8016253.
belongs to a layer of the Internet stack of objects. As the goal
[11] P. Desai, A. Sheth, and P. Anantharam, “Semantic Gateway as a
of this approach is to use micro-services, micro-services are Service Architecture for IoT Interoperability,” in Proceedings - 2015
defined, their objective, their architectural contribution, and IEEE 3rd International Conference on Mobile Services, MS 2015, Aug.
their intervention to create a weakly coupled system. Next, 2015, pp. 313–319, doi: 10.1109/MobServ.2015.51.
this proposal for an interoperable system based on [12] J. Latvakoski et al., “A survey on M2M service networks,” Computers,
vol. 3, no. 4. MDPI AG, pp. 130–173, Dec. 01, 2014, doi:
microservices is advocated. The components of this system, 10.3390/computers3040130.
microservices, data sources, and front-end components are [13] S. Appel, K. Sachs, and A. Buchmann, “Towards benchmarking of
highlighted. The patterns used in this system is described to AMQP,” in Proceedings of the 4th ACM International Conference on
Distributed Event-Based Systems, DEBS 2010, 2010, pp. 99–100, doi:
demonstrate the system's respect for the micro-service 10.1145/1827418.1827438.
paradigm. [14] V. Wang, F. Salim, P. Moskovits, V. Wang, F. Salim, and P.
Moskovits, “Using Messaging over WebSocket with STOMP,” in The
REFERENCES Definitive Guide to HTML5 WebSocket, Apress, 2013, pp. 85–108.
[1] Del Esposte ADM, Kon F, Costa FM, Lago N InterSCity: A Scalable [15] D. Schuster et al., “Creating Applications for Real-Time Collaboration
Microservice-based Open Source Platform for Smart Cities with XMPP and Android on Mobile Devices,” in Handbook of
[2] Krylovskiy A, Jahn M, Patti E (2015) Designing a Smart City Internet Research on Mobile Software Engineering, IGI Global, 2012, pp. 824–
of Things Platform with Microservice Architecture. In: Proceedings - 844.
2015 International Conference on Future Internet of Things and Cloud, [16] A. Alhaj Ali, “Constrained Application Protocol (CoAP) for theIoT
FiCloud 2015 and 2015 International Conference on Open and Big Safety Standards View project IoT Seminar View project Constrained
Data, OBD 2015. Institute of Electrical and Electronics Engineers Inc., Application Protocol (CoAP) for the IoT,” 2018, doi:
pp 25–30 10.13140/RG.2.2.33265.17766.
[3] Thramboulidis K, Vachtsevanou DC, Solanos A Cyber-Physical [17] F. Doglio and F. Doglio, “Architecting a REST API,” in Pro REST API
Microservices An IoT-based Framework for Manufacturing Systems Development with Node.js, Apress, 2015, pp. 65–78.
[4] Herrera-Quintero LF, Banse K, Vega-Alfonso J, Venegas-Sanchez A [18] M. V. Masdani and D. Darlis, “A comprehensive study on MQTT as a
(2016) Smart ITS sensor for the transportation planning using the IoT low power protocol for internet of things application,” in IOP
and Bigdata approaches to produce ITS cloud services. In: 2016 8th Conference Series: Materials Science and Engineering, Dec. 2018, vol.
Euro American Conference on Telematics and Information Systems, 434, no. 1, doi: 10.1088/1757-899X/434/1/012274.
EATIS 2016. Institute of Electrical and Electronics Engineers Inc. [19] K. Shingala, “JSON Web Token (JWT) based client authentication in
[5] BANICA L, STEFAN C, HAGIU A (2017) Leveraging The Message Queuing Telemetry Transport (MQTT),” Mar. 2019,
Microservice Architecture For Next-Generation Iot Applications. Sci Accessed: Aug. 21, 2020. [Online]. Available:
Bull - Econ Sci 16:26–32 http://arxiv.org/abs/1903.02895.
[6] Cherradi G, El Bouziri A, Boulmakoul A, Zeitouni K (2017) Real- [20] “Client-side UI composition pattern - Architectural Patterns [Book].”
Time HazMat Environmental Information System: A micro-service https://www.oreilly.com/library/view/architectural-
based architecture. In: Procedia Computer Science. Elsevier B.V., pp patterns/9781787287495/a47b6a3d-ae41-4232-939a-
982–987 61536e8844fa.xhtml (accessed Aug. 21, 2020).
[7] Jarwar MA, Kibria MG, Ali S, Chong I (2018) Microservices in web [21] “Database per service.”
objects enabled IoT environment for enhancing reusability. Sensors https://microservices.io/patterns/data/database-per-service.html
(Switzerland) 18:. https://doi.org/10.3390/s18020352 (accessed Aug. 21, 2020).

325

You might also like