Structural Coupling for Microservices

Sebastiano Panichella,Mohammad Imranur Rahman,Davide Taibi
DOI: https://doi.org/10.48550/arXiv.2103.04674
2021-03-08
Abstract:Cloud-native Applications are 'distributed, elastic and horizontal-scalable systems composed of (micro)services which isolate states in a minimum of stateful components'. Hence, an important property is to ensure a low coupling and a high cohesion among the (micro)services composing the cloud-native application. Loosely coupled and highly cohesive services allow development teams to work in parallel, reducing the communication overhead between teams. However, despite both practitioners and researchers agree on the importance of this general property, there are no validated metrics to effectively measure or test the actual coupling level between services. In this work, we propose ways to compute and visualize the coupling between microservices, by extending and adapting the concepts behind the computation of the traditional structural coupling. We validate these measures with a case study involving 17 open-source projects and we provide an automatic approach to measure them. The results of this study highlight how these metrics provide to practitioners a quantitative and visual view of services compositions, which can be useful to conceive advanced systems to monitor the evolution of the service.
Software Engineering
What problem does this paper attempt to address?
The problem this paper attempts to address is the lack of effective metrics to measure or test the degree of coupling between services in a microservices architecture. Although it is widely recognized in both industry and academia that low coupling and high cohesion are crucial for microservices architecture, there are currently no validated metrics that can effectively measure the actual level of inter-service coupling. Specifically, the paper proposes a new metric method—Structural Coupling, and by extending and adapting the traditional concept of structural coupling, it provides a method to calculate and visualize the coupling between microservices. The research team validated these metrics through a case study involving 17 open-source projects and provided an automated measurement method. The research results indicate that these metrics can provide practitioners with a quantitative and visual view of service composition, which helps in designing advanced systems to monitor the evolution of services.