Architecture for IoT applications based on reactive microservices: A performance evaluation

https://doi.org/10.1016/j.future.2023.03.026Get rights and content

Highlights

  • Impact of running the application using proposed architecture in single container.

  • IoT application performance varying deployment policies with limited CPU and memory.

  • Power impact on gateways when running IoT applications varying deployment policies.

  • Detecting overhead in terms of time execution, particularly during service failures.

  • Impact of increased IoT traffic on the availability of IoT applications.

Abstract

The Internet has evolved from a network interconnecting computers to a complex ecosystem integrating devices of the most varied types, and enabling the amalgamation of the physical and virtual worlds. Integrating these heterogeneous devices fosters novel services and applications that generate value-added information and actionable knowledge for the end-user. Several challenges are involved in the design and building of IoT ecosystems, which have fostered research in the field, in search of patterns, guidelines, methods and tools that support such activities. In terms of architectural patterns, the microservice architectural style has been increasingly adopted in the development of IoT applications and services. Its adoption promotes some essential properties in IoT, such as scalability and extensibility. As there are always tradeoffs involved in every architectural decision, it is important to analyze whether the benefits brought by the use of microservices do not come at the expense of some loss or degradation of application performance. Recent research has analyzed the performance interference of microservices based on edge computing applications. However, a comprehensive assessment of the performance impact of characteristics inherent to the use of reactive microservices on IoT applications is still missing in the literature. In this paper, we present an experimental evaluation of the performance of IoT applications that make use of an architecture based on reactive microservices. The architecture was proposed by our group in a previous work and was tailored for reliable IoT applications running at the edge of the network. The experiments presented in this paper analyze the application performance based on various benchmark scenarios. In addition, we performed load and scalability testing of an IoT application that adopts the architecture components in a hybrid scenario (real devices and emulated devices). The results obtained were promising. The architecture had a good response to the increase in the workload, not presenting errors, crashes or instabilities due to the increase in IoT data traffic. Moreover, analyzing the overhead generated by the architecture components, there was no performance reduction or service unavailability. Such results point to the fact that the adoption of microservices in the construction of IoT systems can bring effective benefits without jeopardizing their performance due to eventually generated overheads.

Introduction

The Internet of Things has changed the scope of the Internet, which has become a network connecting a myriad of devices of different types. The integration of these heterogeneous devices has the potential to leverage new services and applications, produce value-added information and actionable knowledge for the end-user. However, it brought with it several practical and research challenges.

The challenges are related to the IoT intrinsic features. IoT ecosystems have a high degree of heterogeneity and dynamism. Applications based on instrumented physical things can arise and services become available in an unplanned way, taking advantage of a shared infrastructure. Such applications involve distributed software components that need to interact in an opportunistic way to achieve high-level user goals [1]. The demand for and availability of the various types of services and resources vary over time and geographically. In addition, contemporary IoT systems can be distributed across the continuum from data-producing devices to the cloud, exploiting resources located at the edge of the network. Running components on the network edge reduces delay and communication on the network backbone, but in general, edge nodes are more resource-constrained devices compared to a cloud data center and need to work collaboratively. Such features call for flexible, scalable, and lightweight solutions for the IoT. Design approaches are needed that promote scalability, fault tolerance, and the loose coupling between components. The adoption of different design patterns and architectural approaches can help meet such requirements in the construction of IoT systems and applications.

In this context, the microservice architecture [2] has several appealing features, such as high scalability, fine granularity, loose coupling, continuous development, among others, which make it an ideal candidate for building IoT systems and applications. Microservices can be described as “... an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery” [3].

According to Zimmermann [4], Microservices have the potential to overcome deficiencies in previous approaches of SOA implementation, by employing modern software engineering paradigms such as fault management, which can help improving applications reliability in general and availability in particular. In previous works [5], [6], our research group claimed that a reactive systems approach brings additional benefits in the quest to build reliable IoT systems. Reactive Systems are those which react continuously to their environment at a rate determined by such environment [7]. Therefore, our proposal was to combine the architectural principles that guide the construction of applications based on Microservices with the reactive systems principles, aiming at promoting the reliability of IoT applications. In particular, we were interested in improving reliability from an availability perspective, since we understand this is a major requirement for several IoT application domains. The proposed architecture consisted of: (i) a set of software components, and (ii) a software platform that concretizes the architecture and aids, at runtime, to meet the QoS requirements of IoT applications (focusing on availability). The components of the architecture were built to be deployed on Smart Gateways. Smart Gateways are devices, located at the edge of the network, where the application logic and middleware level services are executed.

As it is often the case in software systems, meeting one nonfunctional requirement has the potential to harm another, usually requiring either to make a trade off or adjusting the project to the specific requirements of a given application. In the case of IoT ecosystems, built to support a wide range of applications, it is not suitable to adopt an application-specific design. Therefore, it is necessary to negotiate the various non-functional requirements in order to obtain the best balance among them.

In this work, we aim to extensively analyze the performance of IoT applications built with the architecture proposed by Santana et al. [5]. The purpose of such an analysis is to verify whether the benefits brought by the use of reactive microservices do not harm the performance in terms of the consumption of computational resources, such as CPU, IO, network, and memory. In addition, considering the possible implementation in energy-constrained environments, we also analyzed the energy cost of the solution.

When working with microservices and their implementation on lightweight platforms such as containers, there are several decisions regarding their configuration and implementation that can impact the performance of the application. Containers provide application isolation and allow to perform upgrades and to escalate applications. In addition, they provide isolation and ensure consistent, portable application execution. Compared to virtual machines, containers consume fewer resources and produce lower overhead [8].

Motivated by the observations obtained in previous research [9], [10], [11], in this work we have defined a set of research questions to be answered, in order to support our analysis:

RQ1: What is the impact of running the application using all the components of the proposed architecture in a single container running on the Smart Gateway? Deploying the application using all the architecture components in a single container can be useful in scenarios where there is a limitation of computational resources.

RQ2: What is the behavior in terms of performance of an IoT application that adopts the proposed architecture with different deployment policies when there is a limit on memory and CPU usage?

RQ3: What is the impact in terms of power consumption on smart gateways when running an IoT application that adopts the proposed architecture through different deployment policies? The purpose of this question is to enquire whether energy consumption reduces or increases when deploying the IoT application through different deployment policies.

RQ4: What is the impact on the availability of IoT application that increasing the number of smart devices and, consequently, increasing the IoT traffic has on an IoT application that adopts the proposed architecture?

RQ5: What is the overhead in terms of time execution caused by components of the proposed architecture, particularly in situations where service failures occur? The purpose of this research question is to analyze whether the IoT Availability, Negotiation and Service Discovery components may include some bottleneck in services in the failures scenarios.

Therefore, the main contribution of this work is to investigate the performance of reactive microservices deployed through different deployment strategies in edge computing.

While there have been a number of research efforts in recent years that address different aspects of building a microservices based architecture, from efficient microservices implementation, architecture scalability analysis, load balancing issues, orchestration, and other system-level services, authors such as Alanezi and Mishra [9] point out that there is a lack of works reporting evaluations of a microservices-based architecture based on a real prototype implementation and including performance measurement according to various metrics. This paper contributes to filling this gap. By presenting a comprehensive performance evaluation of an IoT application based on reactive microservices running at the edge, we believe that the results of our work can effectively leverage the widespread adoption of microservices in IoT and guide system developers’ design decisions. In particular, the results of our evaluation confirmed that, from an architectural point of view, the components introduced following the microservices pattern, in order to promote the availability of the IoT system, did not degrade the performance under other performance metrics.

Section snippets

Related work

In recent years, some proposals were presented for analyzing the performance of the architecture of microservice adopted in IoT applications. In this section, we discuss related work to highlight the novel aspects of our proposal. In our discussion, we consider the following characteristics: (i) proposal goal: the main objective of the related work; approach: architectural/technological approach adopted in the solution; application domain: denotes either the specific target application domain

Overview of a reactive microservices-based architecture for IoT applications

This section provides an overview of an architecture based on reactive microservices for developing reliable IoT applications. The architecture is fully described in a previous work of our research group [5], along with a software platform that materializes part of the architecture and aims to help, at runtime, meeting the reliability requirement of IoT applications.

In our work, we consider an IoT system composed of two types of physical components: Smart Devices and Smart Gateways. Smart

Performance evaluation

In this section, we describe the evaluation performed to achieve the goals of this work. Such evaluation was carried out from three perspectives. The first perspective concerns the evaluation of an IoT application that adopts the proposed architecture through different deployment policies. The goal of such a perspective is showing how the components of the application architecture impact the use of computational resources such as CPU, Memory, IO, Network, and Power Consumption. The second

Conclusion

The Internet of Things (IoT) is creating new opportunities for the development of innovative applications and driving a whole new market and research opportunities. In recent years, a variety of IoT applications in a multitude of domains have been developed and deployed, both in cloud environments and at the edge of the network. Despite great advances, the development of IoT applications is still a complex and challenging activity, because such systems involve a wide range of hardware and

CRediT authorship contribution statement

Cleber Lira: Conceptualization, Software, Validation, Investigation, Writing – original draft. Ernando Batista: Software, Validation, Writing – original draft. Flávia C. Delicato: Conceptualization, Investigation, Resources, Writing – review & editing, Supervision, Funding acquisition. Cássio Prazeres: Conceptualization, Investigation, Resources, Writing – review & editing, Supervision, Funding acquisition.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgment

The authors would like to thank: CAPES, CNPq, and FAPESB organizations for supporting the Graduate Program in Computer Science at the Federal University of Bahia and the Federal Institute of Bahia. Prof Flávia Delicato is a CNPq Fellow.

Dr. Cleber Lira has been a Professor of Computer Science at the Federal Institute of Bahia (IFBA) since 2013, where he develops research and innovation projects, teaches technical, undergraduate, and graduate courses, and advises students of the master’s, technological, and technician. Lira is the coordinator of research, innovation, and graduate studies and permanent professor of the graduate program in Systems and Product Engineering at IFBA. He obtained a doctorate in Computer Science from

References (26)

  • QuQ. et al.

    An experimental study on microservices based edge computing platforms

  • AmaralM. et al.

    Performance evaluation of microservices architectures using containers

  • MorabitoR.

    Virtualization on internet of things edge devices with container technologies: A performance evaluation

    IEEE Access

    (2017)
  • Dr. Cleber Lira has been a Professor of Computer Science at the Federal Institute of Bahia (IFBA) since 2013, where he develops research and innovation projects, teaches technical, undergraduate, and graduate courses, and advises students of the master’s, technological, and technician. Lira is the coordinator of research, innovation, and graduate studies and permanent professor of the graduate program in Systems and Product Engineering at IFBA. He obtained a doctorate in Computer Science from the Federal University of Bahia. Lira is a member of the CNPQ research groups: NIPMEMTD (Interdisciplinary Center for Research in Mathematics, Mathematics Education and Digital Technologies - IFBA) and WISER (Web, Internet, and Intelligent Systems Research Group - UFBA), where she develops research in the areas of Oriented Architecture. to Services, Internet of Things and Education. Lira is a member of the IEEE Communications Society and the Brazilian Computer Society (SBC). He is interested in researching the following topics: Internet of Things, Microservices, Fog Computing, Artificial Intelligence, and Education.

    Ernando Batista is a Ph.D. student at Federal University of Bahia (UFBA), and received M.Sc. (2017) in Computer Science at Federal University of Bahia (UFBA) and Degree in Computer Engineering at Federal University of Recôncavo da Bahia. Batista is a researcher of the Web, Internet and Intelligent Systems Research Group (WISER) and professor at Federal Institute of Bahia (IFBA).

    Flavia C. Delicato is an associate professor at the Fluminense Federal University, Brazil. IC-UFF. Her main research interests are Internet of Things, Edge/Fog Computing, network and sensor virtualization and adaptive middleware. She has 2 books and over 200 published articles. She coordinates and participates in R&D projects funded by companies such as EMC, Dell and Petrobras. In addition, her research has received funding from Brazilian and international funding agencies, including CNPq, RNP, FAPESP, FAPERJ, CENPES, MCT, Fundacion Carolina and The Australian Agency for International Development (AusAID). She has served as General and Program Chair at several national and international conferences. She is a CNPq Level 1D Research Fellowship, and a Scientist of Our State from FAPERJ. She is currently a member of the Editorial Board of several international journals such as Ad hoc Networks, ACM Computer Surveys, IEEE Transactions on Service Computing, IEEE Open Journal of the Communications Society and ITU Journal on Future and Evolving Technologies. She is one of the chairs of the IEEE Hyper-Intelligence Technical Committee (HITC - https://ieee-hyperintelligence.org/member). Since 2017 she has been a member of the IEEE Technical Committee on Smart World (Technical Committee on Smart World-SWTC-https://cis.ieee.org/technical-committees/smart-world-technical-committee/smart-world-members).

    Dr. Prazeres has been an assistant professor in the Web/Internet area at the Federal University of Bahia (UFBA) since 2010, where he leads research activities and projects, teaches undergraduate and postgraduate courses, and is an advisor for Ph.D., M.Sc., and B.Sc. students. Also, at UFBA, Prazeres is a co-founder and leader of a laboratory and CNPq research group (WISER: Web, Internet, and Intelligent Systems Research Group). He holds a Ph.D. degree in Computer Science from the University of Sao Paulo (USP). He has several publications in international conferences and journals. Prazeres is an IEEE Senior Member and member of: the Brazilian Computer Society (SBC); IEEE Communications Society; IEEE Computer Society Technical Committee on Services Computing; IEEE Smart Cities Technical Community; IEEE Internet of Things Technical Community; ACM SIGWEB (Special Interest Group on Hypertext the Web); W3C Web of Things Community Group. He is interested in research involving topics of Internet of Things, Web of Things, Web Services, Semantic Web, Microservices, Fog Computing, Fog of Things, Web of Data, and Linked Data. Prazeres has coordinated projects in the Internet/Web of Things themes in the last years and has participated in other related projects such as Digital TV, crowdsourcing, and e-learning projects. Recently, Dr. Prazeres had a sabbatical year as a Visiting Researcher at Insight Centre for Data Analytics (former DERI) at the National University of Ireland, Galway (NUIG).

    1

    Productivity in Research Scholarship (PQ-CNPq).

    2

    IEEE Senior Member.

    View full text