
Cohesion metrics for microservices
Author(s) -
C. Rojas-Perez Juan,
G. Fragoso-Diaz Olivia,
A. Sanchez-Gonzalez Guadalupe
Publication year - 2025
Publication title -
ieee access
Language(s) - English
Resource type - Magazines
SCImago Journal Rank - 0.587
H-Index - 127
eISSN - 2169-3536
DOI - 10.1109/access.2025.3589789
Subject(s) - aerospace , bioengineering , communication, networking and broadcast technologies , components, circuits, devices and systems , computing and processing , engineered materials, dielectrics and plasmas , engineering profession , fields, waves and electromagnetics , general topics for engineers , geoscience , nuclear engineering , photonics and electrooptics , power, energy and industry applications , robotics and control systems , signal processing and analysis , transportation
Software development requires new technologies, such as service-oriented architectures, that resolve quality problems such as maintenance and costs, which promote improvements in software development. In recent decades, software architectures have evolved from monolithic architectures to service-oriented architectures, services, and microservice architectures. In this evolutionary process, the mechanisms used to evaluate the quality of architectures require changes to be applied to microservices. Cohesion is an attribute worthy of consideration, analysis, and evaluation in the context of microservice development. This work describes three metrics: Nop to determine the number of operations used in a microservice, Nap to calculate the number of endpoints used in the defined microservices, and the average of the sum of Nap and Nop is used to calculate Cohesion . The metrics are the result of the analysis and tests of microservices from several microservices projects. The cohesion thresholds range from one to zero, where one represents a fully cohesive microservice and zero indicates that the microservice lacks cohesion. The metrics were tested in 41 microservices developed in Java, JavaScript, and C# contained in nine open-access repositories such as GitHub, Amazon, and Netflix. Results show that the proposed metrics provide cohesion values indicating whether the microservices code require restructuring due to unused operations and endpoints. Metrics can also be used as a complement to those already proposed in other works that address other objectives and scopes. Proposed metrics are expected to contribute to the analysis and development of quality microservices.
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom