🤖 AI Summary
Migrating monolithic systems to microservices faces a critical challenge: the lack of systematic, code-level guidance for identifying and decoupling inter-component dependencies—existing research predominantly addresses architectural concerns while neglecting actionable, refactor-driven practices. To bridge this gap, we propose a code-level refactoring methodology tailored for microservice migration. Our approach introduces the first comprehensive refactoring catalog for migration, comprising seven empirically grounded patterns that address key scenarios—including service boundary identification, cross-service call extraction, and data decoupling. Integrating literature analysis with industrial practice, the method leverages dependency graph analysis, semantics-aware refactoring, and a hierarchical classification strategy to enable standardized and automatable migration. Experimental evaluation demonstrates that our approach significantly reduces refactoring decision complexity, improves service extraction accuracy and long-term maintainability, and delivers the first production-ready, extensible code-level migration framework for microservice evolution.
📝 Abstract
As organizations increasingly transition from monolithic systems to microservices, they aim to achieve higher availability, automatic scaling, simplified infrastructure management, enhanced collaboration, and streamlined deployments. However, this migration process remains largely manual and labour-intensive. While existing literature offers various strategies for decomposing monoliths, these approaches primarily focus on architecture-level guidance, often overlooking the code-level challenges and dependencies that developers must address during the migration. This article introduces a catalogue of seven refactorings specifically designed to support the transition to a microservices architecture with a focus on handling dependencies. The catalogue provides developers with a systematic guide that consolidates refactorings identified in the literature and addresses the critical gap in systematizing the process at the code level. By offering a structured, step-by-step approach, this work simplifies the migration process and lays the groundwork for its potential automation, empowering developers to implement these changes efficiently and effectively.