SP2Mic: A tool for generating microservices code from stored procedures
Abstract
Business rules implemented in stored procedures are often found in legacy systems. Many companies are migrating their systems to a microservice architecture style to achieve more flexible and scalable systems. This migration has been explored and addressed in various ways, but few approaches deal with systems whose business rules are implemented in database artifacts, particularly stored procedures (SPs). The need to migrate these rules to a more modern system encounters technological barriers and is highly dependent on human intervention. Therefore, this paper presents the tool SP2Mic, which semi-automatically generates microservices code by loading and processing stored procedures and interacting with system expert users responsible for SP’s rule interpretation. The tool has three main modules: loading and processing of stored procedures, analysis of stored procedures, and generation of microservices code. The tool was used in a large real-world system, with 1,517 SPs, was rated as good in the usability evaluation conducted by 15 users responding to the System Usability Scale and received excellent feedback from system experts through reports and interviews.
References
Luciano Baresi, Martin Garriga, and Alan De Renzis. 2017. Microservices identification through interface analysis. In Service-Oriented and Cloud Computing: 6th IFIP WG 2.14 European Conference, ESOCC 2017, Oslo, Norway, September 27-29, 2017, Proceedings 6. Springer, 19–33.
Antonio Bucchiarone, Nicola Dragoni, Schahram Dustdar, Stephan T Larsen, and Manuel Mazzara. 2018. From monolithic to microservices: An experience report from the banking domain. IEEE Software 35, 3 (2018), 50–55.
Luiz Carvalho, Alessandro Garcia, Thelma Elita Colanzi, Wesley KG Assunção, Juliana Alves Pereira, Baldoino Fonseca, Márcio Ribeiro, Maria Julia de Lima, and Carlos Lucena. 2020. On the performance and adoption of search-based microservice identification with tomicroservices. In 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, 569–580.
Luiz Carvalho, Alessandro F. Garcia, Thelma Elita Colanzi, Wesley Klewerton Guez Assunção, Maria Julia de Lima, Baldoino Fonseca dos Santos Neto, Márcio Ribeiro, and Carlos J. P. Lucena. 2020. Search-based many-criteria identification of microservices from legacy systems. Proceedings of the 2020 Genetic and Evolutionary Computation Conference Companion (2020).
Hossein Chegini and Aniket Mahanti. 2019. A Framework of Automation on Context-Aware Internet of Things (IoT) Systems. In Proceedings of the 12th IEEE/ACM International Conference on Utility and Cloud Computing Companion (Auckland, New Zealand) (UCC ’19 Companion). Association for Computing Machinery, New York, NY, USA, 157–162. DOI: 10.1145/3368235.3368848
Paolo Di Francesco, Ivano Malavolta, and Patricia Lago. 2017. Research on architecting microservices: Trends, focus, and potential for industrial adoption. In 2017 IEEE International Conference on Software Architecture (ICSA). IEEE, 21–30.
Andrei Furda, Colin Fidge, Olaf Zimmermann, Wayne Kelly, and Alistair Barros. 2018. Migrating Enterprise Legacy Source Code to Microservices: On Multitenancy, Statefulness, and Data Consistency. IEEE Software 35, 3 (2018), 63–72. DOI: 10.1109/MS.2017.440134612
Marx Haron Gomes Barbosa and Paulo Henrique M. Maia. 2020. Towards Identifying Microservice Candidates from Business Rules Implemented in Stored Procedures. In 2020 IEEE International Conference on Software Architecture Companion (ICSA-C). 41–48. DOI: 10.1109/ICSA-C50368.2020.00015
Anup K Kalia, Jin Xiao, Chen Lin, Saurabh Sinha, John Rofrano, Maja Vukovic, and Debasish Banerjee. 2020. Mono2micro: an ai-based toolchain for evolving monolithic enterprise applications to a microservice architecture. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 1606–1610.
Alex Kaplunovich. 2019. ToLambda: Automatic Path to Serverless Architectures. In Proceedings of the 3rd InternationalWorkshop on Refactoring (Montreal, Quebec, Canada) (IWOR ’19). IEEE Press, 1–8. DOI: 10.1109/IWoR.2019.00008
Ravi Khadka, Belfrit V Batlajery, AmirMSaeidi, Slinger Jansen, and Jurriaan Hage. 2014. How do professionals perceive legacy systems and software modernization?. In Proceedings of the 36th International Conference on Software Engineering. 36–47.
Holger Knoche and Wilhelm Hasselbring. 2018. Using microservices for legacy software modernization. IEEE Software 35, 3 (2018), 44–49. DOI: 10.1109/MS.2018.2141035
Alessandra Levcovitz, Ricardo Terra, and Marco Tulio Valente. 2016. Towards a technique for extracting microservices from monolithic enterprise systems. arXiv preprint arXiv:1605.03175 (2016).
Bo Liu, Jingliu Xiong, Qiurong Ren, Shmuel Tyszberowicz, and Zheng Yang. 2022. Log2MS: a framework for automated refactoring monolith into microservices using execution logs. In 2022 IEEE International Conference onWeb Services (ICWS). 391–396. DOI: 10.1109/ICWS55610.2022.00065
Sam Newman. 2021. Building microservices. O’Reilly Media, Inc.
Khaled Sellami, Mohamed Aymen Saied, and Ali Ouni. 2022. A Hierarchical DBSCAN Method for Extracting Microservices from Monolithic Applications. In Proceedings of the 26th International Conference on Evaluation and Assessment in Software Engineering (Gothenburg, Sweden) (EASE ’22). Association for Computing Machinery, New York, NY, USA, 201–210. DOI: 10.1145/3530019.3530040
Daniele Wolfart, Wesley K. G. AssunÇão, Ivonei F. da Silva, Diogo C. P. Domingos, Ederson Schmeing, Guilherme L. Donin Villaca, and Diogo do N. Paza. 2021. Modernizing Legacy Systems with Microservices: A Roadmap. In Evaluation and Assessment in Software Engineering (Trondheim, Norway) (EASE 2021). Association for Computing Machinery, New York, NY, USA, 149–159. DOI: 10.1145/3463274.3463334
