Hybrid graph learning improves splitting of monolithic software into microservices

TripleBound: Triplet-Guided Heterogeneous Graph Learning for Microservice Decomposition

Software Engineering

Summary

Breaking a big software program into smaller microservices is hard because the parts are often tightly connected or unclear. The authors developed a method called TripleBound that uses a combination of software structure and naming rules to better identify these parts by representing them as a graph with multiple types of connections. TripleBound uses special constraints during learning to combine these signals in one model. Tests on several example software programs show TripleBound often outperforms other methods, though results vary depending on how success is measured.

What this means in practice

  • For software architects: Automatically identify better microservice boundaries when migrating large monolithic applications to improve maintainability and scalability.
  • For devops engineers: Assist in planning microservice deployments by combining structural and semantic clues from existing code to suggest service groupings.

Authors

Mineth Weerasinghe, Himindu Kularathne, Methmini Madhushika, Danuka Lakshan, Nisansa de Silva, Adeesha Wijayasiri, Srinath Perera

Abstract

Cloud computing and DevOps have made microservices a common architecture for scalable, maintainable software systems. However, migrating monoliths to microservices remains challenging due to tight coupling and unclear service boundaries. Existing decomposition approaches typically rely on either structural dependencies or semantic similarity signals, but rarely integrate both within a unified representation learning objective. This paper proposes TripleBound, a hybrid framework for automated monolith-to-microservices decomposition that augments a heterogeneous graph neural network with weakly supervised triplet constraints derived from parser-inferred service groups based on package structure, naming conventions, and code location. TripleBound injects triplet-based constraints directly into the shared structural latent space, enabling both signals to be jointly optimized during representation learning. Structural dependencies are captured using CHGNN, which models the monolith as a heterogeneous graph with program nodes, resource nodes, CALL edges, and CRUD edges. Semantic relationships are incorporated through triplet constraints generated from parser-inferred service groups. Evaluation on AcmeAir, DayTrader, PlantsByWebSphere, and JPetStore shows that TripleBound achieves the highest composite decomposition score under the selected weighting on AcmeAir, DayTrader, and JPetStore compared to CHGNN and MonoEmbed, while CHGNN remains stronger on PlantsByWebSphere. Per-metric analysis reveals trade-offs: gains in structural modularity and inter-partition coupling are accompanied by higher entity distribution imbalance on some datasets. Alternative composite weightings preserve TripleBound's first-place ranking on AcmeAir and DayTrader but not on JPetStore, showing that the aggregate ranking is metric-dependent.