Cohesion Metrics for Microservices

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. Recently, software architectures have evolved from monolithic architectures to service-oriented architectures, and microservice architectures. In this process, the mechanisms used to evaluate the quality of architectures require changes to be applied to microservices. Cohesion is a quality attribute worthy of consideration. This work describes three metrics for microservices evaluation: Nop to determine the number of used operations, Nap to calculate the number of used endpoints, 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 1 to 0, where one represents a fully cohesive microservice and 0 indicates that the microservice lacks cohesion. The metrics were tested in 41 microservices contained in 9 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. 12 microservices had a Cohesion value of 1. In the remaining microservices, no pattern of behavior was found. It was observed that programming languages did not influence cohesion results; this is due to poor design or changes in the architecture of the finished and operational system. The metrics should be used as a complement to those already proposed in other works that address other objectives and scopes.

Authors

Institutions

Publication Details

Journal
SHILAP Revista de lepidopterología
Published
2025-01-01
DOI
https://doi.org/10.1109/access.2025.3589789
Primary Topic
Software System Performance and Reliability
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Cohesion Metrics for Microservices

Juan Carlos Rojas-Pérez, Olivia Graciela Fragoso Díaz, A. Sánchez-González Guadalupe
SHILAP Revista de lepidopterología
Software System Performance and Reliability
article

Cohesion Metrics for Microservices

Juan Carlos Rojas-Pérez, Olivia Graciela Fragoso Díaz, A. Sánchez-González Guadalupe
article en

Abstract

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. Recently, software architectures have evolved from monolithic architectures to service-oriented architectures, and microservice architectures. In this process, the mechanisms used to evaluate the quality of architectures require changes to be applied to microservices. Cohesion is a quality attribute worthy of consideration. This work describes three metrics for microservices evaluation: Nop to determine the number of used operations, Nap to calculate the number of used endpoints, 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 1 to 0, where one represents a fully cohesive microservice and 0 indicates that the microservice lacks cohesion. The metrics were tested in 41 microservices contained in 9 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. 12 microservices had a Cohesion value of 1. In the remaining microservices, no pattern of behavior was found. It was observed that programming languages did not influence cohesion results; this is due to poor design or changes in the architecture of the finished and operational system. The metrics should be used as a complement to those already proposed in other works that address other objectives and scopes.

SHILAP Revista de lepidopterología
Centro Nacional de Investigación y Desarrollo Tecnológico (MX)
Openalex Percentile: Top 79%
Software System Performance and Reliability
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.