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 arc...
Saved in:
| Main Authors: | , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
IEEE
2025-01-01
|
| Series: | IEEE Access |
| Subjects: | |
| Online Access: | https://ieeexplore.ieee.org/document/11082143/ |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1849245937004707840 |
|---|---|
| author | C. Rojas-Perez Juan G. Fragoso-Diaz Olivia A. Sanchez-Gonzalez Guadalupe |
| author_facet | C. Rojas-Perez Juan G. Fragoso-Diaz Olivia A. Sanchez-Gonzalez Guadalupe |
| author_sort | C. Rojas-Perez Juan |
| collection | DOAJ |
| description | 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. |
| format | Article |
| id | doaj-art-330952d67ea64467beb202f211a0ad3b |
| institution | Kabale University |
| issn | 2169-3536 |
| language | English |
| publishDate | 2025-01-01 |
| publisher | IEEE |
| record_format | Article |
| series | IEEE Access |
| spelling | doaj-art-330952d67ea64467beb202f211a0ad3b2025-08-20T03:58:40ZengIEEEIEEE Access2169-35362025-01-011312853212854010.1109/ACCESS.2025.358978911082143Cohesion Metrics for MicroservicesC. Rojas-Perez Juan0https://orcid.org/0000-0002-0189-8532G. Fragoso-Diaz Olivia1https://orcid.org/0000-0001-8512-1941A. Sanchez-Gonzalez Guadalupe2Departamento de Ciencias Computacionales, TecNM/Centro Nacional de Investigación y Desarrollo Tecnológico, Cuernavaca, Morelos, MexicoDepartamento de Ciencias Computacionales, TecNM/Centro Nacional de Investigación y Desarrollo Tecnológico, Cuernavaca, Morelos, MexicoDepartamento de Ciencias Computacionales, TecNM/Centro Nacional de Investigación y Desarrollo Tecnológico, Cuernavaca, Morelos, MexicoSoftware 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.https://ieeexplore.ieee.org/document/11082143/Microservicesmonolithic cohesion metricsmicroservice cohesion metricsservice-oriented metricsmicroservice repositoriesquality metrics |
| spellingShingle | C. Rojas-Perez Juan G. Fragoso-Diaz Olivia A. Sanchez-Gonzalez Guadalupe Cohesion Metrics for Microservices IEEE Access Microservices monolithic cohesion metrics microservice cohesion metrics service-oriented metrics microservice repositories quality metrics |
| title | Cohesion Metrics for Microservices |
| title_full | Cohesion Metrics for Microservices |
| title_fullStr | Cohesion Metrics for Microservices |
| title_full_unstemmed | Cohesion Metrics for Microservices |
| title_short | Cohesion Metrics for Microservices |
| title_sort | cohesion metrics for microservices |
| topic | Microservices monolithic cohesion metrics microservice cohesion metrics service-oriented metrics microservice repositories quality metrics |
| url | https://ieeexplore.ieee.org/document/11082143/ |
| work_keys_str_mv | AT crojasperezjuan cohesionmetricsformicroservices AT gfragosodiazolivia cohesionmetricsformicroservices AT asanchezgonzalezguadalupe cohesionmetricsformicroservices |