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.















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
Excluding the classes that were not matched with any microservice/module
References
Al-Debagy O, Martinek P (2021) Scalable Computing 22:39. https://doi.org/10.12694:/scpe.v22i1.1836. https://www.scpe.org/index.php/scpe/article/view/1836
Alexis YH, Ridene (2020) Migrating to Microservices (Springer International Publishing). https://doi.org/10.1007/978-3-030-31646-4_3
Alon U, Zilberstein M, Levy O, Yahav E (2018) arXiv:1803.09473
Athanasopoulos D, Zarras AV, Miskos G, Issarny V, Vassiliadis P (2015) IEEE Trans Serv Comput 8(4):550. https://doi.org/10.1109/TSC.2014.2310195
Bellman R (1957) Indiana Univ Math J 6:679
Bittencourt RA, Guerrero DDS (2009), pp 251–254. https://doi.org/10.1109/CSMR.2009.28. https://www.semanticscholar.org/paper/Comparison-of-Graph-Clustering-Algorithms-for-Views-Bittencourt-Guerrero/dfdf7de3eca279b30053174372470703015e297d
Brito M, Cunha J (2021). J Saraiva. https://doi.org/10.1145/3412841.3442016
Calçado P (2014) Building products at soundcloud - part i: dealing with the monolith. https://developers.soundcloud.com/blog/building-products-at-soundcloud-part-1-dealing-with-the-monolith
Candela I, Bavota G, Russo B, Oliveto R (2016) ACM Trans Softw Eng Methodology 25. https://doi.org/10.1145/2928268
Dehghani MH, Kolahdouz-Rahimi S, Tisi M, Tamzalit D (2022) Software and Systems Modeling 21:1115. https://doi.org/10.1007/s10270-022-00977-3. https://link.springer.com/article/10.1007/s10270-022-00977-3
Desai U, Bandyopadhyay S, Tamilselvam S (2021) arXiv:2102.03827
Faustino D, Gonçalves N, Portela M, Silva AR (2022) Stepwise migration of a monolith to a microservices architecture: performance and migration effort evaluation
Ferreira F, Silva LL, Valente MT (2020) (ACM), pp 447–456. https://doi.org/10.1145/3422392.3422433
Francesco PD, Lago P, Malavolta I (2018)(Institute of Electrical and Electronics Engineers Inc.), pp 29–38. https://doi.org/10.1109/ICSA.2018.00012. https://ieeexplore.ieee.org/document/8417114
Fritzsch J, Bogner J, Wagner S, Zimmermann A (2019) (Institute of Electrical and Electronics Engineers Inc.), pp 481–490. https://doi.org/10.1109/ICSME.2019.00081
Glen A (2018) Microservices priorities and trends [dzone research]. https://dzone.com/articles/dzone-research-microservices-priorities-and-trends, (2018)
Goldberg Y (2014) Scaling gilt: from monolithic ruby application to distributed scala micro-services architecture. https://www.infoq.com/presentations/scale-gilt/
Gysel M, Kölbener L, Giersche W, Zimmermann O (2016) vol 9846 LNCS. https://doi.org/10.1007/978-3-319-44482-6_12
Hessel M, Modayil J, van Hasselt H, Schaul T, Ostrovski G, Dabney W, Horgan D, Piot B, Azar M, Silver D (2017) Rainbow: combining improvements in deep reinforcement learning
Ihde S (2015) From a monolith to microservices + rest: the evolution of linkedin’s service architecture. https://www.infoq.com/presentations/linkedin-microservices-urn/
Jin W, Liu T, Cai Y, Kazman R, Mo R, Zheng Q (2021) IEEE Trans Softw Eng 47:987. https://doi.org/10.1109/TSE.2019.2910531. https://ieeexplore.ieee.org/document/8686152
Kalia AK, Xiao J, Krishna R, Sinha S, Vukovic M, Banerjee D (2021) (Association for Computing Machinery, Inc), pp 1214–1224. https://doi.org/10.1145/3468264.3473915
Kalske M, Mäkitalo N, Mikkonen T (2018) (Springer Verlag), vol 10544 LNCS, pp 32–47. https://doi.org/10.1007/978-3-319-74433-9_3
Kamimura M, Yano K, Hatano T, Matsuo A (2018) (IEEE Computer Society, vol 2018-December, pp 571–580. https://doi.org/10.1109/APSEC.2018.00072
Knoche H, Hasselbring W (2019) (German Informatics Society (GI)), vol 14, p 1–35. https://doi.org/10.18417/emisa.14.1
Lapan M (2020) Deep Reinforcement Learning Hands-On: Apply modern RL methods to practical problems of chatbots, robotics, discrete optimization, web automation, and more (Packt Publishing Ltd)
Majid AY, Saaybi S, Francois-Lavet V, Prasad RV, Verhoeven C (2023) IEEE Trans Neural Netw Learn Syst:1–19. https://doi.org/10.1109/TNNLS.2023.3264540
Mathai A, Bandyopadhyay S, Desai U, Tamilselvam S (2022). arxiv:2112.01317. https://www.ijcai.org/proceedings/2022/542
Mauro T (2015) Adopting microservices at netflix: lessons for architectural design. http://nginx.com/blog/microservices-at-netflix-architectural-bestpractices/
Mazlami G, Cito J, Leitner P (2017) (Institute of Electrical and Electronics Engineers Inc.), pp 524–531. https://doi.org/10.1109/ICWS.2017.61. https://ieeexplore.ieee.org/document/8029803
Mazzara M, Dragoni N, Bucchiarone A, Giaretta A, Larsen ST, Dustdar S (2021) IEEE Transactions on Services Computing 14:1464. https://doi.org/10.1109/TSC.2018.2889087. https://ieeexplore.ieee.org/document/8585089
Mnih V, Kavukcuoglu K, Silver D, Graves A, Antonoglou I, Wierstra D, Riedmiller M (2013) Playing atari with deep reinforcement learning
Newman S (2021) Building Microservices: Designing Fine-Grained Systems, 2nd edn. (O’Reilly Media)
Rosati P, Fowley F, Pahl C, Taibi D, Lynn T (2019) (Springer Verlag), vol 1073, pp 190–214. https://doi.org/10.1007/978-3-030-29193-8_10
Saidani I, Ouni A, Mkaouer, MW, Saied A (2019) Towards automated microservices extraction using muti-objective evolutionary search. In: Yangui S, Bouassida Rodriguez I, Drira K, Tari Z (eds) Service-oriented computing. Springer International Publishing, Cham, pp 58–63
Schaul T, Quan J, Antonoglou I, Silver D (2016) Prioritized experience replay
Sellami K, Saied MA, Ouni A, Abdalkareem R (2022a) Combining static and dynamic analysis to decompose monolithic application into microservices. In: Troya J, Medjahed B, Piattini M, Yao L, Fernández P and Ruiz-Cortés A (eds) Service-oriented computing. Springer Nature Switzerland, pp 203–218
Sellami K, Saied MA, Ouni A (2022b) (Association for Computing Machinery), pp 201–210. https://doi.org/10.1145/3530019.3530040
Sellami K, Ouni A, Saied MA, Bouktif S, Mkaouer MW (2022c) Inf Softw Technol 151:106996. https://doi.org/10.1016/j.infsof.2022.106996. https://www.sciencedirect.com/science/article/pii/S0950584922001264
Sellami K, Saied MA (2024). https://doi.org/10.6084/m9.figshare.24939159. https://figshare.com/articles/software/RLDec_Artifacts_Package/24939159
Silver D, Huang A, Maddison CJ, Guez A, Sifre L, van den Driessche G, Schrittwieser J, Antonoglou I, Panneershelvam V, Lanctot M, Dieleman S, Grewe D, Nham J, Kalchbrenner N, Sutskever I, Lillicrap TP, Leach M, Kavukcuoglu K, Graepel T, Hassabis D (2016) Nature 529:484. https://api.semanticscholar.org/CorpusID:515925
Thierens D (1999) Evol Comput 7(4):331. https://doi.org/10.1162/evco.1999.7.4.331
van Hasselt H, Guez A, Silver D (2015) Deep reinforcement learning with double q-learning
Varshneya K (2022) Decoding software architecture of spotify: how microservices empowers spotify. https://www.techaheadcorp.com/blog/decoding-software-architecture-of-spotify-how-microservices-empowers-spotify/
Wang Z, Schaul T, Hessel M, van Hasselt H, Lanctot M, de Freitas N (2016) Dueling network architectures for deep reinforcement learning
Wolfart D, Assunção WKG, da Silva IF, Domingos DCP, Schmeing E, Villaca GLD, Paza DdN (2021) In: Evaluation and assessment in software engineering (Association for Computing Machinery, New York, USA), EASE 2021, pp 149–159. https://doi.org/10.1145/3463274.3463334
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
Corresponding author
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.
About this article
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
Accepted:
Published:
DOI: https://doi.org/10.1007/s10664-024-10547-4