DefinePK

DefinePK hosts the largest index of Pakistani journals, research articles, news headlines, and videos. It also offers chapter-level book search.

Breaking Down Monoliths: A Graph Based Approach to Microservices Migration


Article Information

Title: Breaking Down Monoliths: A Graph Based Approach to Microservices Migration

Authors: Azaz Ahmad Kayani, Zain Ul Islam Adil, Yasir Hafeez, Javed Iqbal, Fahad Burhan Ahmed

Journal: International Journal of Innovations in Science & Technology

HEC Recognition History
Category From To
Y 2024-10-01 2025-12-31
Y 2023-07-01 2024-09-30
Y 2021-07-01 2022-06-30

Publisher: 50SEA JOURNALS (SMC-PRIVATE) LIMITED

Country: Pakistan

Year: 2024

Volume: 6

Issue: 3

Language: English

Keywords: MicroservicesMonolithicClustering AlgorithmMicroservices DecompositionMicroservices Identification

Categories

Abstract

Introduction: The software industry has increasingly transitioned from Monolithic Architecture (MA) to Microservices Architecture (MSA) due to the significant advantages offered by MSA. A crucial first step in this migration process is the identification of suitable microservices.
Novelty Statement: This work aims to introduce an automated method for more effectively identifying potential microservices within monolithic applications.
Materials and Methods: Our approach leverages the source code to construct a frequency-based class dependency graph through graph analysis techniques. A clustering algorithm is then applied to this graph to identify optimal candidate microservices.
Results and Discussion: We evaluate the effectiveness of the proposed approach using several metrics, including the number of microservices, Newman-Girvan Modularity (NGM), and F1-Score. The results demonstrate that the approach accurately identifies candidate microservices, achieving an average F1 score of 0.88 and an average NGM score of 0.526.
Concluding Remarks: The proposed approach proves to be an effective tool for assisting developers in migrating from MA to MSA, facilitating a more streamlined transition process.


Research Objective

To introduce an automated method for more effectively identifying potential microservices within monolithic applications by constructing a frequency-based class dependency graph and applying a clustering algorithm.


Methodology

The approach involves two stages:
1. Constructing a frequency-based class dependency network from the source code by extracting classes and methods, and then creating a weighted graph where edge weights represent the frequency of method calls.
2. Applying an iterative refinement clustering technique based on modularity optimization to group methods into potential microservices.

Methodology Flowchart
                        graph TD
    A[Start: Monolithic Source Code] --> B[Extract Classes and Methods];
    B --> C[Construct Frequency-Based Class Dependency Graph];
    C --> D[Initialize Communities];
    D --> E[Iteratively Refine Communities based on Modularity];
    E --> F[Optimize Modularity Gain];
    F --> G[Handle Singleton Nodes and Disconnected Subgraphs];
    G --> H[Convergence Achieved?];
    H -- No --> E;
    H -- Yes --> I[Identify Potential Microservices];
    I --> J[End];                    

Discussion

The proposed graph-based clustering approach effectively balances internal cohesion and external separation of microservices. It innovates by using a frequency-based weighted graph and iterative modularity optimization, leading to better cohesion, coupling, and optimal microservice detection performance. The method also addresses issues of disconnected subgraphs and singleton nodes within communities.


Key Findings

The proposed approach achieved an average F1 score of 0.88 and an average Newman-Girvan Modularity (NGM) score of 0.526, demonstrating its effectiveness in accurately identifying candidate microservices and facilitating migration from Monolithic Architecture (MA) to Microservices Architecture (MSA).


Conclusion

The developed automated method provides an effective tool for assisting developers in migrating from Monolithic Architecture to Microservices Architecture by accurately identifying potential microservices through a frequency-based class dependency graph and a modularity-based clustering algorithm.


Fact Check

- The paper reports an average F1 score of 0.88 for the proposed approach.
- The paper reports an average NGM score of 0.526 for the proposed approach.
- The paper was published in July 2024.


Mind Map

Loading PDF...

Loading Statistics...