đ€ AI Summary
To address the high risk, substantial cost, and low feasibility associated with migrating legacy monolithic systems, this paper proposes a novel âexpose-without-migratingâ microservice adoption paradigm: legacy monoliths are directly exposed as REST-compliant microservices without code refactoring, via a two-stage automated approach. In Stage I, a multi-objective genetic algorithmâintegrating word embeddings and semantic similarity analysisâis applied to method-level static code analysis to identify semantically and structurally aware service boundaries. In Stage II, a random forest classifier automatically generates RESTful APIs from the identified boundaries. Evaluated on the Spring Boot PetClinic benchmark, our method achieves an F1-score of 0.92 for service boundary identification and 89% accuracy in API generation. By relying solely on static analysis and eliminating the need for manual restructuring, the approach significantly reduces migration risks and engineering overhead.
đ Abstract
The microservices architectural style has become the de facto standard for large-scale cloud applications, offering numerous benefits in scalability, maintainability, and deployment flexibility. Many organizations are pursuing the migration of legacy monolithic systems to a microservices architecture. However, this process is challenging, risky, time-intensive, and prone-to-failure while several organizations lack necessary financial resources, time, or expertise to set up this migration process. So, rather than trying to migrate a legacy system where migration is risky or not feasible, we suggest exposing it as a microservice application without without having to migrate it. In this paper, we present a reusable, automated, two-phase approach that combines evolutionary algorithms with machine learning techniques. In the first phase, we identify microservices at the method level using a multi-objective genetic algorithm that considers both structural and semantic dependencies between methods. In the second phase, we generate REST APIs for each identified microservice using a classification algorithm to assign HTTP methods and endpoints. We evaluated our approach with a case study on the Spring PetClinic application, which has both monolithic and microservices implementations that serve as ground truth for comparison. Results demonstrate that our approach successfully aligns identified microservices with those in the reference microservices implementation, highlighting its effectiveness in service identification and API generation.