Continuously Managing Microservice Granularity: An Evidence-Based Industrial Approach
Resumo
Defining and managing appropriate service granularity remains a recurring challenge in the design and evolution of microservices-based systems, directly affecting modularity, maintenance, and operational efficiency. This paper presents early empirical evidence supporting Granulify, a continuous granularity-management approach that dynamically adjusts service boundaries throughout the system lifecycle. Although still preliminary, the results already point to tangible benefits in modularity, maintainability, and operational cost, underscoring the method’s industrial applicability. The proposal is being validated through the reengineering of a real-world investment management platform from a major financial institution in Brazil. The analysed platform manages over 40 million transactions monthly and supports more than 250K internal users across investment, compliance, and trading domains. Preliminary results indicate patterns of architectural fragmentation, productivity impacts, and signs of granularity saturation. We believe that continuous application of this approach will contribute to more informed architectural decisions, balancing modularity, maintenance effort, and operational costs. This ongoing research aims to consolidate Granulify as a practical solution to support teams in the evolutionary management of granularity in microservices architectures.
Referências
Mehdi Ait SAID, Abdellah EZZATI, Soukaina MIHI, and Lahcen BELOUADDANE. 2024. Microservices Adoption: An Industrial Inquiry into Factors Influencing Decisions and Implementation Strategies. International Journal of Computing and Digital Systems 15, 1 (March 2024), 1417–1432. DOI: 10.12785/ijcds/1501100
Alex Malmann Becker and Daniel Lucrédio. 2020. The Impact of Microservices on the Evolution of a Software Product Line. In Proceedings of the 14th Brazilian Symposium on Software Components, Architectures, and Reuse (SBCARS ’20). ACM. DOI: 10.1145/3425269.3425275
Shanay Behrad, David Espes, Philippe Bertin, and Cao-Thanh Phan. 2021. Impacts of Service Decomposition Models on Security Attributes: A Case Study with 5G Network Repository Function. In 2021 IEEE 7th International Conference on Network Softwarization (NetSoft). IEEE. DOI: 10.1109/netsoft51509.2021.9492620
Justus Bogner, Jonas Fritzsch, Stefan Wagner, and Alfred Zimmermann. 2021. Industry practices and challenges for the evolvability assurance of microservices: An interview study and systematic grey literature review. Empirical Software Engineering 26, 5 (July 2021). DOI: 10.1007/s10664-021-09999-9
Justus Bogner, Stefan Wagner, and Alfred Zimmermann. 2019. On the impact of service-oriented patterns on software evolvability: a controlled experiment and metric-based analysis. PeerJ Computer Science 5 (Aug. 2019), e213. DOI: 10.7717/peerj-cs.213
Thelma Colanzi, Aline Amaral, Wesley Assunção, Arthur Zavadski, Douglas Tanno, Alessandro Garcia, and Carlos Lucena. 2021. Are we speaking the industry language? The practice and literature of modernizing legacy systems with microservices. In 15th Brazilian Symposium on Software Components, Architectures, and Reuse (SBCARS ’21). ACM. DOI: 10.1145/3483899.3483904
Famke Driessen, Luís Ferreira Pires, João Luiz Rebelo Moreira, Paul Verhoeven, and Sander van den Bosch. 2024. A Quantitative Assessment Method for Microservices Granularity to Improve Maintainability. In Enterprise Design, Operations, and Computing. EDOC 2023 Workshops, Tiago Prince Sales, Sybren de Kinderen, Henderik A. Proper, Luise Pufahl, Dimka Karastoyanova, and Marten van Sinderen (Eds.). Springer Nature Switzerland, Cham, 211–226. DOI: 10.1007/978-3-031-54712-6_13
Thomas Erl. 2017. Service-oriented architecture (second edition ed.). Prentice Hall, Upper Saddle River, NJ. Includes index.
Neal Ford. 2021. Software architecture (first edition ed.). The MIT Press, Cambridge, Massachusetts. Made available through: Safari, an O’Reilly Media Company.
Neal Ford. 2023. Building evolutionary architectures (second edition ed.). O’Reilly, Beijing.
Jonas Fritzsch, Justus Bogner, Stefan Wagner, and Alfred Zimmermann. 2019. Microservices Migration in Industry: Intentions, Strategies, and Challenges. In 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE. DOI: 10.1109/icsme.2019.00081
Jonas Fritzsch, Justus Bogner, Alfred Zimmermann, and Stefan Wagner. 2019. From Monolith to Microservices: A Classification of Refactoring Approaches. Springer International Publishing, 128–141. DOI: 10.1007/978-3-030-06019-0_10
Sara Hassan, Rami Bahsoon, and Rajkumar Buyya. 2022. Systematic scalability analysis for microservices granularity adaptation design decisions. Software: Practice and Experience 52, 6 (Jan. 2022), 1378–1401. DOI: 10.1002/spe.3069
Sara Hassan, Rami Bahsoon, and Rick Kazman. 2020. Microservice transition and its granularity problem: A systematic mapping study. Software: Practice and Experience 50, 9 (June 2020), 1651–1681. DOI: 10.1002/spe.2869
Munezero Immaculée Josélyne, Doreen Tuheirwe-Mukasa, Benjamin Kanagwa, and Joseph Balikuddembe. 2018. Partitioning microservices: a domain engineering approach. In Proceedings of the 2018 International Conference on Software Engineering in Africa (ICSE ’18). ACM. DOI: 10.1145/3195528.3195535
Luís Nunes, Nuno Santos, and António Rito Silva. 2019. From a Monolith to a Microservices Architecture: An Approach Based on Transactional Contexts. Springer International Publishing, 37–52. DOI: 10.1007/978-3-030-29983-5_3
D. L. Parnas. 1972. On the criteria to be used in decomposing systems into modules. Commun. ACM 15, 12 (Dec. 1972), 1053–1058. DOI: 10.1145/361598.361623
Mark Richards. 2015. Microservices vs. service-oriented architecture. O’Reilly Media.
Sh. Salii, J. Ajdari, and Xh. Zenuni. 2023. Migrating to a microservice architecture: benefits and challenges. In 2023 46th MIPRO ICT and Electronics Convention (MIPRO). IEEE. DOI: 10.23919/mipro57284.2023.10159894
Mary Shaw and David Garlan. 1996. Software architecture. Prentice Hall, Upper Saddle River, NJ. Literaturverz. S. 227 - 237.
Davide Taibi and Valentina Lenarduzzi. 2018. On the Definition of Microservice Bad Smells. IEEE Software 35, 3 (May 2018), 56–62. DOI: 10.1109/ms.2018.2141031
Rafik Tighilt, Manel Abdellatif, Imen Trabelsi, Loïc Madern, Naouel Moha, and Yann-Gaël Guéhéneuc. 2023. On the maintenance support for microservicebased systems through the specification and the detection of microservice antipatterns. Journal of Systems and Software 204 (Oct. 2023), 111755. DOI: 10.1016/j.jss.2023.111755
Mathawee Tusjunt and Wiwat Vatanawood. 2018. Refactoring Orchestrated Web Services into Microservices Using Decomposition Pattern. In 2018 IEEE 4th International Conference on Computer and Communications (ICCC). IEEE. DOI: 10.1109/compcomm.2018.8781036
Victor Velepucha and Pamela Flores. 2023. A Survey on Microservices Architecture: Principles, Patterns and Migration Challenges. IEEE Access 11 (2023), 88339–88358. DOI: 10.1109/access.2023.3305687
Fredy H. Vera-Rivera, Carlos Gaona, and Hernán Astudillo. 2021. Defining and measuring microservice granularity—a literature overview. PeerJ Computer Science 7 (Sept. 2021), e695. DOI: 10.7717/peerj-cs.695
Hulya Vural and Murat Koyuncu. 2021. Does Domain-Driven Design Lead to Finding the Optimal Modularity of a Microservice? IEEE Access 9 (2021), 32721–32733. DOI: 10.1109/access.2021.3060895
Muhammad Waseem, Peng Liang, Mojtaba Shahin, Amleto Di Salle, and Gastón Márquez. 2021. Design, monitoring, and testing of microservices systems: The practitioners’ perspective. Journal of Systems and Software 182 (Dec. 2021), 111061. DOI: 10.1016/j.jss.2021.111061
Yang Zhao, Ran Mo, Yao Zhang, Siyuan Zhang, and Pu Xiong. 2022. Exploring and understanding cross-service code clones in microservice projects. In Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension (ICPC ’22). ACM. DOI: 10.1145/3524610.3527925
Xin Zhou, Shanshan Li, Lingli Cao, He Zhang, Zijia Jia, Chenxing Zhong, Zhihao Shan, and Muhammad Ali Babar. 2023. Revisiting the practices and pains of microservice architecture in reality: An industrial inquiry. Journal of Systems and Software 195 (Jan. 2023), 111521. DOI: 10.1016/j.jss.2022.111521
