Skip to main content
Log in

Extracting microservices from monolithic systems using deep reinforcement learning

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

The Microservice Architecture emerged as a solution to problems encountered when developing and maintaining a Monolithic system. For this reason, multiple companies migrated their large monolithic applications to a microservices-based system. However, previous migration efforts have shown that this process can be very costly and very difficult to execute citing the decomposition phase of this process as the most significant challenge. Approaches that can automate and guide the developers through this phase can alleviate the issues of the migration process. However, the number of potential microservices and their compositions rises exponentially with the scale of the monolith. Navigating the space of potential decompositions can be difficult due to the ambiguity of the desired qualities of the new architecture. For this reason, we propose a novel Deep Reinforcement Learning based approach, RLDec, that is able to generate recommendations for the new microservices. In this research, we formulate the microservices recommendation task as a Markov Decision Process and we train a Deep Neural Networks model using the quality of the generated microservices as a reward function. These quality metrics are based mainly on the structural and semantic analysis of the monolithic system. We evaluate the performance of our proposed approach using distinct metrics and different experimental settings including a comparison of different variations of RLDec, a comparison with state-of-the-art decomposition approaches and qualitative analysis of a decomposition example. We include an artifact package for the detailed results.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

Data Availability Statements

The data used to generate the tables and figures presented in this paper is available in detail in this repository (Sellami and Saied 2024). The source code of RLDec’s implementation can be found in the following repository (https://github.com/khaledsellami/decomp-rldec).

Notes

  1. https://github.com/spring-petclinic/spring-framework-petclinic

  2. https://github.com/spring-petclinic/spring-petclinic-microservices

  3. https://github.com/WASdev/sample.plantsbywebsphere

  4. https://github.com/acmeair/acmeair

  5. https://github.com/WASdev/sample.daytrader7

  6. https://github.com/rafaelsteil/jforum2

  7. https://github.com/socialsoftware/edition/tree/modular-monolith

  8. https://github.com/apache/roller

  9. https://github.com/mybatis/jpetstore-6

  10. https://github.com/microsoft/PartsUnlimitedMRP

  11. https://github.com/7ep/demo

  12. https://github.com/eventuate-examples/es-kanban-board

  13. https://github.com/chaokunyang/microservices-event-sourcing

  14. Excluding the classes that were not matched with any microservice/module

  15. https://github.com/socialsoftware/edition/tree/microservices

References

Download references

Acknowledgements

This research has been funded by the Natural Sciences and Engineering Research Council of Canada (NSERC) RGPIN-2020-06411.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Khaled Sellami.

Ethics declarations

Competing Interest

No author associated with this paper has disclosed any potential or pertinent conflicts which may be perceived to have impending conflict with this work.

Additional information

Communicated by: Xin Peng.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sellami, K., Saied, M.A. Extracting microservices from monolithic systems using deep reinforcement learning. Empir Software Eng 30, 1 (2025). https://doi.org/10.1007/s10664-024-10547-4

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10664-024-10547-4

Keywords