Table of Contents
Fetching ...

MONO2REST: Identifying and Exposing Microservices: a Reusable RESTification Approach

Matthéo Lecrivain, Hanifa Barry, Dalila Tamzalit, Houari Sahraoui

TL;DR

The paper tackles the challenge of migrating legacy monoliths to microservices by proposing a non-invasive path: wrap the monolith as REST-exposed microservices without full migration. It introduces a reusable two-phase framework that first identifies microservices at the method level using a multi-objective NSGA-III optimization that blends structural dependencies with semantic similarity, and then RESTifies these services by ML-driven HTTP-method classification and semantically informed URI generation. Key contributions include method-level decomposition guided by $Coupling$, $Cohesion$, and $SemSim$, the integration of semantic analysis with optimization, and automated REST API exposure that aligns with reference microservices in a Spring PetClinic case study. The evaluation demonstrates high semantic alignment between identified clusters and ground-truth microservices and coherent REST interfaces, suggesting a practical intermediate step toward gradual migration and feasibility testing. The approach offers a low-risk, intermediate route for organizations to evaluate microservice suitability while preserving a functioning monolith under RESTful exposure.

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.

MONO2REST: Identifying and Exposing Microservices: a Reusable RESTification Approach

TL;DR

The paper tackles the challenge of migrating legacy monoliths to microservices by proposing a non-invasive path: wrap the monolith as REST-exposed microservices without full migration. It introduces a reusable two-phase framework that first identifies microservices at the method level using a multi-objective NSGA-III optimization that blends structural dependencies with semantic similarity, and then RESTifies these services by ML-driven HTTP-method classification and semantically informed URI generation. Key contributions include method-level decomposition guided by , , and , the integration of semantic analysis with optimization, and automated REST API exposure that aligns with reference microservices in a Spring PetClinic case study. The evaluation demonstrates high semantic alignment between identified clusters and ground-truth microservices and coherent REST interfaces, suggesting a practical intermediate step toward gradual migration and feasibility testing. The approach offers a low-risk, intermediate route for organizations to evaluate microservice suitability while preserving a functioning monolith under RESTful exposure.

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.

Paper Structure

This paper contains 14 sections, 11 figures, 4 tables.

Figures (11)

  • Figure 1: Service identification process.
  • Figure 2: Preparation of data linked to method calls.
  • Figure 3: Call graph for the Spring PetClinic application.
  • Figure 4: Example of a directed dependency graph organized in clusters.
  • Figure 5: Crossover and mutation operators.
  • ...and 6 more figures