Engineering and Technology
| Open Access | Systematic Service Boundary Identification and Evolutionary Refactoring of Legacy Monoliths into Resilient Microservice Architectures: A Domain-Driven and Machine Learning-Assisted Approach
Dr. Matthias Schneider , Department of Computer Science, Technical University of Munich, GermanyAbstract
Background: The migration from monolithic systems to microservice architectures represents one of the most significant paradigm shifts in contemporary software engineering. While microservices promise scalability, resilience, and organizational alignment, the transformation of legacy monoliths remains complex, risk-laden, and methodologically fragmented. Foundational works on domain-driven design, refactoring, legacy code management, service decomposition, and evolutionary migration provide partial guidance, yet an integrated, systematic framework for service boundary identification and transformation remains underdeveloped.
Objective: This study proposes a comprehensive, publication-ready framework that integrates domain-driven design principles, systematic service decomposition methods, workload-based clustering, topic modeling, architectural meta-modeling, evolutionary refactoring strategies, and machine learning-assisted service boundary detection. The objective is to synthesize established theoretical foundations into a coherent transformation methodology suitable for industrial adoption.
Methods: Drawing strictly from established literature, the research develops a multi-phase transformation framework. The approach incorporates domain analysis, bounded context identification, service cutter decomposition, workload-based clustering, topic modeling of source code artifacts, architectural meta-modeling for granularity control, evolutionary migration patterns, resilience-oriented refactoring, and machine learning-assisted modularization. The framework is conceptually validated through theoretical alignment with prior empirical findings and architectural principles.
Results: The proposed framework demonstrates theoretical improvements in service cohesion, reduced coupling, granularity optimization, resilience enhancement, and legacy risk mitigation. By combining human-driven domain modeling with data-driven boundary detection, the approach balances conceptual rigor and empirical grounding. Evolutionary migration strategies reduce transformation risk, while refactoring and legacy isolation techniques enhance maintainability.
Conclusion: The study contributes a unified transformation methodology that bridges foundational architectural theory and contemporary machine learning techniques. It offers a structured pathway for organizations transitioning from monoliths to resilient microservice ecosystems while minimizing technical debt and architectural erosion.
Keywords
Microservices migration, Service boundary detection, Domain-driven design
References
Bogner, J.; Zimmermann, A.; Wagner, S. Analyzing the Relevance of SOA Patterns for Microservice-Based Systems. 2018.
Brito, M.; Cunha, J.; Saraiva, J. Identification of microservices from monolithic applications through topic modelling. Proceedings of the 36th Annual ACM Symposium on Applied Computing, 2021, 1409–1418.
Di Francesco, P.; et al. Research on Architecting Microservices: Trends, Focus, and Potential for Industrial Adoption. Proceedings of the 2017 IEEE International Conference on Software Architecture, 2017, 21–30.
Evans, E. J. Domain-Driven Design: Tackling Complexity in the Heart of Software. Addison Wesley, 2003.
Feathers, M. Working Effectively with Legacy Code. Prentice Hall, 2004.
Fowler, M. Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional, 1999.
Fowler, M. LocalDTO. 2004.
Freitas, F. Refactoring Java Monoliths into Executable Microservice-Based Applications. Master’s thesis, University of Minho, 2022.
Freitas, F.; Ferreira, A.; Cunha, J. Refactoring Java Monoliths into Executable Microservice-Based Applications. 25th Brazilian Symposium on Programming Languages, 2021, 100–107.
Gorton, I. Essential Software Architecture. 2nd ed., Springer, 2011.
Gysel, M.; et al. Service Cutter: A Systematic Approach to Service Decomposition. Lecture Notes in Computer Science, 2016, 185–200.
Hassan, S.; et al. Microservice Ambients: An Architectural Meta-Modelling Approach for Microservice Granularity. Proceedings of the 2017 IEEE International Conference on Software Architecture, 2017, 1–10.
K. S. Hebbar, “MACHINE LEARNING-ASSISTED SERVICE BOUNDARY DETECTION FOR MODULARIZING LEGACY SYSTEMS,” International Journal of Applied Engineering & Technology, vol. 04,no.02, pp. 401-414, Sep. 2022, https://romanpub.com/resources/ijaet-v4-2-2022-48.pdf
Klock, S.; et al. Workload-Based Clustering of Coherent Feature Sets in Microservice Architectures. Proceedings of the 2017 IEEE International Conference on Software Architecture, 2017, 11–20.
Kitchenham, B.; Charters, S. Performing Systematic Literature Reviews in Software Engineering. 2007.
Newman, S. Monolith to Microservices: Evolutionary Patterns to Transform Your Monolith. O’Reilly Media, 2019.
Silva, M. Improving the Resilience of Microservices-Based Applications. Master’s thesis, University of Minho, 2021.
Wolff, E. Microservices: Flexible Software Architecture. Addison-Wesley Professional, 2016.
Download and View Statistics
Copyright License
Copyright (c) 2023 Dr. Matthias Schneider

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors retain the copyright of their manuscripts, and all Open Access articles are disseminated under the terms of the Creative Commons Attribution License 4.0 (CC-BY), which licenses unrestricted use, distribution, and reproduction in any medium, provided that the original work is appropriately cited. The use of general descriptive names, trade names, trademarks, and so forth in this publication, even if not specifically identified, does not imply that these names are not protected by the relevant laws and regulations.

