Abstract
The popularity of microservices has increased over the past decade due to their potential benefits for distributed enterprise applications. Developing and maintaining a microservices architecture (MSA) is challenging, amongst others because the size (granularity) of the microservices has an impact on most system properties, such as, e.g., maintainability, performance, and scalability. Currently, architects determine the granularity of the microservices by identifying bounded contexts or business capabilities, which is mainly based on their experience. This paper presents a quantitative assessment method to evaluate the granularity of the microservices for improved system maintainability. The method is based on a set of metrics that are relevant for maintainability, namely change coupling, structural coupling, weighted service interface count, lines of code, service interface data cohesion, and change frequency. By evaluating these metrics, focusing on coupling, cohesion, and size, the method can assess refactors of an architecture in which microservices are merged or decomposed. We validated our method with three open source microservice-based projects with different sizes and structures. Our method can substantiate the design decisions concerning the granularity of microservices, identifying services that are candidates for merging and decomposition towards maintainability evolution, with clear benefits particularly for enterprise applications.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Aboalkheir, A.: Ultimate list of Version Control Systems statistics, trends (2023). https://abdalslam.com/version-control-systems-statistics. Accessed 15 Aug 2023
Alshuqayran, N., Ali, N., Evans, R.: Towards micro service architecture recovery: an empirical study. In: 2018 IEEE International Conference on Software Architecture (ICSA), pp. 47–4709 (2018). https://doi.org/10.1109/ICSA.2018.00014
Apolinário, D.R., de França, B.B.: A method for monitoring the coupling evolution of microservice-based architectures. J. Braz. Comput. Soc. 27, 1–35 (2021). https://doi.org/10.1186/s13173-021-00120-y
Athanasopoulos, D., Zarras, A.V., Miskos, G., Issarny, V., Vassiliadis, P.: Cohesion-driven decomposition of service interfaces without access to source code. IEEE Trans. Serv. Comput. 8(4), 550–562 (2015). https://doi.org/10.1109/TSC.2014.2310195
Bogner, J., Schlinger, S., Wagner, S., Zimmermann, A.: A modular approach to calculate service-based maintainability metrics from runtime data of microservices. In: Franch, X., Männistö, T., Martínez-Fernández, S. (eds.) PROFES 2019. LNCS, vol. 11915, pp. 489–496. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-35333-9_34
Bogner, J., Wagner, S., Zimmermann, A.: Automatically measuring the maintainability of service- and microservice-based systems - a literature review. In: Proceedings of the 27th International Workshop on Software Measurement and 12th International Conference on Software Process and Product Measurement, IWSM-Mensura 2017, pp. 107–115. ACM (2017). https://doi.org/10.1145/3143434.3143443
Bogner, J., Wagner, S., Zimmermann, A.: Collecting service-based maintainability metrics from RESTful API descriptions: static analysis and threshold derivation. In: Muccini, H., et al. (eds.) ECSA 2020. CCIS, vol. 1269, pp. 215–227. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-59155-7_16
Cardarelli, M., Salle, A.D., Iovino, L., Malavolta, I., Francesco, P.D., Lago, P.: An extensible data-driven approach for evaluating the quality of microservice architectures. In: Proceedings of the 34th ACM/SIGAPP Symposium on Applied Computing, pp. 1225–1234. ACM (2019). https://doi.org/10.1145/3297280.3297400
Evans, E.: Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison-Wesley (2004)
Granchelli, G., Cardarelli, M., Di Francesco, P., Malavolta, I., Iovino, L., Di Salle, A.: MicroART: a software architecture recovery tool for maintaining microservice-based systems. In: 2017 IEEE International Conference on Software Architecture Workshops (ICSAW), pp. 298–302 (2017). https://doi.org/10.1109/ICSAW.2017.9
Granchelli, G., Cardarelli, M., Di Francesco, P., Malavolta, I., Iovino, L., Di Salle, A.: Towards recovering the software architecture of microservice-based systems. In: 2017 IEEE International Conference on Software Architecture Workshops (ICSAW), pp. 46–53 (2017). https://doi.org/10.1109/ICSAW.2017.48
Heitlager, I., Kuipers, T., Visser, J.: A practical model for measuring maintainability. In: Proceedings of the 6th International Conference on Quality of Information and Communications Technology, pp. 30–39 (2007)
Hirzalla, M., Cleland-Huang, J., Arsanjani, A.: A metrics suite for evaluating flexibility and complexity in service oriented architectures. In: Feuerlicht, G., Lamersdorf, W. (eds.) ICSOC 2008. LNCS, vol. 5472, pp. 41–52. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-01247-1_5
Homay, A., de Sousa, M., Zoitl, A., Wollschlaeger, M.: Service granularity in industrial automation and control systems. In: 25th IEEE International Conference on Emerging Technologies and Factory Automation, vol. 1, pp. 132–139 (2020)
IBM Market Development & Insights Team: Microservices in the enterprise, 2021: Real benefits, worth the challenges (2021). https://www.ibm.com/downloads/cas/OQG4AJAM
Li, Y., Wang, C.Z., Li, Y.C., Su, J., Chen, C.H.: Granularity decision of microservice splitting in view of maintainability and its innovation effect in government data sharing. Discrete Dynamics in Nature and Society 2020 (2020). https://doi.org/10.1155/2020/1057902
Oliva, G.A., Gerosa, M.A.: Chapter 11 - Change coupling between software artifacts: learning from past changes. In: Bird, C., Menzies, T., Zimmermann, T. (eds.) The Art and Science of Analyzing Software Data, pp. 285–323. Morgan Kaufmann, Boston (2015)
Panichella, S., Rahman, M.I., Taibi, D.: Structural coupling for microservices. In: Proceedings of the 11th International Conference on Cloud Computing and Services Science (CLOSER 2021), pp. 280–287. SCITEPRESS (2021). https://doi.org/10.5220/0010481902800287
Rahman, M.I., Panichella, S., Taibi, D.: A curated dataset of microservices-based systems. In: Joint Proceedings of the Summer School on Software Maintenance and Evolution. CEUR-WS 2520 (2019)
Tornhill, A.: Your Code as a Crime Scene. Pragmatic Bookshelf (2015)
Vera-Rivera, F.H., Gaona, C., Astudillo, H.: Defining and measuring microservice granularity-a literature overview. PeerJ Comput. Sci. 7, e695 (2021). https://doi.org/10.7717/peerj-cs.695
Zimmermann, O.: Microservices tenets: agile approach to service development and deployment. Comput. Sci. - Res. Dev. 32, 301–310 (2017). https://doi.org/10.1007/s00450-016-0337-0
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Driessen, F., Ferreira Pires, L., Moreira, J.L.R., Verhoeven, P., van den Bosch, S. (2024). A Quantitative Assessment Method for Microservices Granularity to Improve Maintainability. In: Sales, T.P., de Kinderen, S., Proper, H.A., Pufahl, L., Karastoyanova, D., van Sinderen, M. (eds) Enterprise Design, Operations, and Computing. EDOC 2023 Workshops . EDOC 2023. Lecture Notes in Business Information Processing, vol 498. Springer, Cham. https://doi.org/10.1007/978-3-031-54712-6_13
Download citation
DOI: https://doi.org/10.1007/978-3-031-54712-6_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-54711-9
Online ISBN: 978-3-031-54712-6
eBook Packages: Computer ScienceComputer Science (R0)