Resumo:
Due to the significant growth of IoT, it is estimated a high demand for devices and
systems that integrate this environment, aiming to optimize industrial processes, improve
the quality of life of users, among other applications. With so many devices connected,
communication is a crucial factor in ensuring the efficiency of IoT systems. MQTT is an
application protocol that has emerged with the objective of solving specific problems of
this sector, such as networks with high latency and packet loss rate, as well as the low
power of storage and processing of the devices. Among the known tools that implement
MQTT, it was not found during the development of this work one that adopts mechanisms
of detection and verification of failures and their responsible ones. Due to this, this work
aims to develop a method for reactive monitoring of communication between devices in
IoT systems that use the MQTT protocol. The method is based on the modeling of the
communication protocol of the IoT system by means of a temporal calculation of processes
called TPi, according to the operational behavior of the MQTT with QoS level equal to
zero. From the model obtained, a conversion method is applied to represent it in the
form of a multi-party contract. Next, a reactive monitoring algorithm is executed on the
contract that allows the detection of contractual violations, as well as the identification of
the parties responsible for the violation. In this sense, this work proposes a real case study
on a fire detection and suppression system. With the application of the proposed method,
it was possible to apply the reactive monitoring on the system, as well as to perform the
identification of the person responsible for the contractual fault that was simulated. In
this way, the objective of the work was achieved. While the TPi model allowed a simple
and abstracted modeling of the system, the multi-party contract model ensured a higher
level of detail of the properties, essential for the application of the reactive monitoring
algorithm. However, some properties for representation of the model in a multi-party
contract were inserted manually, as a way to represent them through the TPi model was
not found. Thus, as future work, it is suggested to determine means to represent the
pending properties, to adapt the conversion method to more complex cases, to extend
the proposed method to the QoS levels 1 and 2 of the MQTT protocol and to develop an
implementation of the MQTT that apply reactive monitoring between connected devices.