An Approach to Migrate a Monolith Database into Multi-Model Polyglot Persistence Based on Microservice Architecture: A Case Study for Mainframe Database
<p>The purpose of the proposed approach.</p> "> Figure 2
<p>The proposed migration approach.</p> "> Figure 3
<p>The data model development.</p> "> Figure 4
<p>An example of the function <span class="html-italic">GetCustomer</span> implementation within the microservice layers.</p> "> Figure 5
<p>The proposed data transformation process.</p> "> Figure 6
<p>An example of the simplified repository and model implementations.</p> "> Figure 7
<p>An example of simplified data model mapping.</p> "> Figure 8
<p>An example of the simplified record creation class.</p> "> Figure 9
<p>The test case execution.</p> "> Figure 10
<p>An example of the data records in the monolith database and multi-model polyglot persistence.</p> "> Figure 11
<p>Release and deployment execution.</p> "> Figure 12
<p>The simplified model of the SSI application.</p> "> Figure 13
<p>The simplified conceptual schema of the SSI application.</p> "> Figure 14
<p>The segmentation units are identified in the simplified conceptual database schema.</p> "> Figure 15
<p>The consistency unit identified in the simplified conceptual database schema.</p> "> Figure 16
<p>The target data model.</p> "> Figure 17
<p>The physical data model.</p> "> Figure 18
<p>The graphical representation of the physical data model.</p> "> Figure 19
<p>The simplified model of a new SSI application with multi-model polyglot persistence.</p> "> Figure 20
<p>The data transformation from the monolith database to multi-model polyglot persistence.</p> "> Figure 21
<p>The automatic data validation process.</p> "> Figure 22
<p>Microservice deployment into the cloud schema.</p> ">
Abstract
:1. Introduction
- A new approach on how to conduct database migration from a monolith architecture into a microservice architecture is proposed.
- A new approach on how to transform the monolith data model into multi-model polyglot persistence is proposed.
2. Background
2.1. SQL vs. NoSQL
2.2. Polyglot Persistence
2.3. Data Storage in Microservices
2.4. Summary
3. Related Work
4. Proposed Migration Approach and Its Evaluation
4.1. Migration Approach
4.1.1. Analysis of an Existing Monolith Application
4.1.2. Data Model Development
- Conceptual design—based on the gathered functional requirements to build a conceptual database schema as an entity–relationship model. A conceptual database schema is a foundation that will be used in the next sub-steps to develop a new data model.
- Segmentation design—divides the conceptual database schema into independent function units and defines borders between these units. The cut points defined on the existing data model during segmentation design will be used to split the current data model into different data models suitable for multi-model polyglot persistence.
- Target data model design—choose the best data structure for each identified segmentation unit from the different data structures supported by multi-model polyglot persistence.
- Physical design—implement the built target data model into a multi-model polyglot persistence database. As each database is different, the aim of this sub-step is to implement all technical peculiarities needed to support the developed target data model in the database.
4.1.3. Microservice Development
4.1.4. Data Transformation
4.1.5. Data Validation
4.1.6. Release and Deployment
4.2. Criteria
4.3. Multi-Model Polyglot Database Software
4.4. Tools
5. Result of Experiment
5.1. Analysis of an Existing Monolith Application with a Mainframe Database
5.2. Data Model Development
5.2.1. Conceptual Design
5.2.2. Segmentation Design
5.2.3. Consistency Design
5.2.4. Target Data Model Design
5.2.5. Physical Design
5.3. Microservice Development
5.4. Data Transformation
5.5. Data Validation
5.6. Release and Deployment
6. Evaluation of the Data Quality of the Proposed Microservice with Multi-Model Polyglot Persistence
- Consistency—a microservice with multi-model polyglot persistence provides strong data consistency and uses three methods to ensure consistency: eventual, immediate, and OneShard (highly available, fault-tolerant deployment mode with ACID semantics) while mainframe monolith data persistence only uses an immediate method to ensure consistency. In addition to database supported consistency methods, the business layer of microservice ensures that consumers operate only with consistent data models. Consumers, through REST API, can only manipulate data at the domain level as they are not aware of the database schema details and do not have access rights to access it directly.
- Understandability—a new data model with five collections instead of 35 tables that were used in the mainframe application is simpler and easier to understand. The relations between entities are represented as a graph, which is a great help in improving the readability. The AQL query language used to query polyglot persistence is considered as a human-readable query language and increases understandability compared to the SQL query language used in mainframe application.
- Availability—the biggest advantage of microservice with polyglot persistence in terms of availability is that it supports many resilient deployment modes to meet the different needs of a different project. Active failover deployment is used for smaller projects with fast asynchronous replication from the leading node to passive replicas. OneShard deployment is used for multi-node clusters with synchronous replication from the leading node it provides. A synchronously-replicating cluster technology allows it to scale elastically with the applications and all data models. The last but not least feature of multi-model polyglot persistence is the support for datacenter to datacenter replication.
- Portability—while the mainframe requires a very specific infrastructure to run an application, a microservice with multi-model polyglot persistence can be installed on all main operating systems (Linux, Windows and macOS) and can be deployed to a private or public cloud.
7. Discussions
8. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- International Data Corporation Web Site. Available online: https://www.idc.com/ (accessed on 30 October 2021).
- Newman, S. Monolith to Microservices. Evolutionary Patterns to Transform Your Monolith, 1st ed.; 1005 Gravenstein Highway North; O’Reilly Media: Sebastopol, CA, USA, 2019; pp. 1–272. [Google Scholar]
- Columbus, L. IDC Top 10 Predictions for Worldwide IT. 2019. Available online: https://www.forbes.com/sites/louiscolumbus/2018/11/04/idc-top-10-predictions-for-worldwide-it-2019/?sh=5e55583c7b96 (accessed on 30 October 2021).
- Francesco, P.D.; Lago, P.; Malavolta, I. Migrating towards microservice architectures: An industrial survey. In Proceedings of the International Conference on Software Architecture (IEEE), Seattle, WA, USA, 30 April–4 May 2018; pp. 29–2909. [Google Scholar] [CrossRef] [Green Version]
- Knoche, H.; Hasselbring, W. Using Microservices for Legacy Software Modernization. IEEE Softw. 2018, 35, 44–49. [Google Scholar] [CrossRef]
- Wang, Y.; Kadyala, H.; Rubin, J. Promises and Challenges of Microservices: An Exploratory Study. Empir. Softw. Eng. 2020, 26, 63. [Google Scholar] [CrossRef]
- Wolfart, D.; Assunção, W.; Silva, I.; Domingos, D.; Schmeing, E.; Villaca, G.; Paza, D. Modernizing Legacy Systems with Microservices: A Roadmap. EASE 2021, 2021, 149–159. [Google Scholar] [CrossRef]
- Beni, E.H.; Lagaisse, B.; Joosen, W. Infracomposer: Policy-driven adaptive and reflective middleware for the cloudification of simulation & optimization workflows. J. Syst. Archit. 2019, 95, 36–46. [Google Scholar] [CrossRef]
- Mohamed, D.; Mezouari, A.; Faci, N.; Benslimane, D.; Maamar, Z.; Fazziki, A. A multi-model based microservices identiftcation approach. J. Syst. Archit. 2021, 118, 102200. [Google Scholar] [CrossRef]
- Azevedo, L.G.; Ferreira, R.S.; Silva, V.T.; Bayser, M.; de Soares, E.F.S.; Thiago, R.M. Geological Data Access on a Polyglot Database Using a Service Architecture. In Proceedings of the XIII Brazilian Symposium on Software Components, Architectures, and Reuse, Salvador, Brazil, 23–27 September 2019; pp. 103–112. [Google Scholar] [CrossRef]
- Cruz, P.; Astudillo, H.; Hilliard, R.; Collado, M. Assessing Migration of a 20-Year-Old System to a Micro-Service Platform Using ATAM. In Proceedings of the 2019 IEEE International Conference on Software Architecture Companion (ICSA-C), Hamburg, Germany, 25–26 March 2019; pp. 174–181. [Google Scholar] [CrossRef]
- Gouigoux, J.P.; Tamzalit, D. From Monolith to Microservices: Lessons Learned on an Industrial Migration to a Web Oriented Architecture. In Proceedings of the 2017 IEEE International Conference on Software Architecture Workshops (ICSAW), Gothenburg, Sweden, 5–7 April 2017; pp. 62–65. [Google Scholar] [CrossRef]
- Hasselbring, W.; Steinacker, G. Microservice Architectures for Scalability, Agility and Reliability in E-Commerce. In Proceedings of the 2017 IEEE International Conference on Software Architecture Workshops (ICSAW), Gothenburg, Sweden, 5–7 April 2017; pp. 243–246. [Google Scholar] [CrossRef]
- Krylovskiy, A.; Jahn, M.; Patti, E. Designing a Smart City Internet of Things Platform with Microservice Architecture. In Proceedings of the 2015 3rd International Conference on Future Internet of Things and Cloud, Rome, Italy, 24–26 August 2015; pp. 25–30. [Google Scholar]
- Lotz, J.; Vogelsang, A.; Benderius, O.; Berger, C. Microservice Architectures for Advanced Driver Assistance Systems: A Case-Study. In Proceedings of the 2019 IEEE International Conference on Software Architecture Companion (ICSA-C), Hamburg, Germany, 25–26 March 2019; pp. 45–52. [Google Scholar] [CrossRef] [Green Version]
- Esposte, A.M.; Kon, F.; Costa, F.M.; Lago, N. InterSCity: A Scalable Microservice-Based Open Source Platform for Smart Cities. In Proceedings of the 6th International Conference on Smart Cities and Green ICT Systems, Porto, Portugal, 22–24 April 2017; pp. 35–46. [Google Scholar] [CrossRef]
- Mazzara, M.; Dragoni, N.; Bucchiarone, A.; Giaretta, A.; Larsen, S.T.; Dustdar, S. Microservices: Migration of a Mission Critical System. IEEE Trans. Serv. Comput. 2018, 14, 1464–1477. [Google Scholar] [CrossRef] [Green Version]
- Singhal, H.; Saxena, A.; Mittal, N.; Dabas, C.; Kaur, P. Polyglot Persistence for Microservices-Based Applications. Int. J. Inf. Technol. Syst. Approach 2021, 14, 17–32. [Google Scholar] [CrossRef]
- Carrasco, A.; Bladel, B.; Demeyer, S. Migrating towards microservices: Migration and architecture smells. In Proceedings of the 2nd International Workshop on Refactoring, Montpellier, France, 4 September 2018; pp. 1–6. [Google Scholar] [CrossRef]
- Carvalho, L.; Garcia, A.; Assunção, W.; Mello, R.; de Lima, M.J. Analysis of the criteria adopted in industry to extract microservices. In Proceedings of the 2019 IEEE/ACM Joint 7th International Workshop on Conducting Empirical Studies in Industry (CESI) and 6th International Workshop on Software Engineering Research and Industrial Practice (SER&IP), Montreal, QC, Canada, 28 May 2019; pp. 22–29. [Google Scholar] [CrossRef]
- Mazlami, G.; Cito, J.; Leitner, P. Extraction of Microservices from Monolithic Software Architectures. In Proceedings of the 2017 IEEE International Conference on Web Services (ICWS), Honolulu, HI, USA, 25–30 June 2017; pp. 524–531. [Google Scholar] [CrossRef]
- Fan, C.; Ma, S. Migrating Monolithic Mobile Application to Microservice Architecture: An Experiment Report. In Proceedings of the 2017 IEEE International Conference on AI & Mobile Services (AIMS), Honolulu, HI, USA, 25–30 June 2017; pp. 109–112. [Google Scholar] [CrossRef]
- Furda, A.; Fidge, C.; Zimmermann, O.; Kelly, W.; Barros, A. Migrating Enterprise Legacy Source Code to Microservices: On Multitenancy, Statefulness, and Data Consistency. IEEE Softw. 2018, 35, 63–72. [Google Scholar] [CrossRef]
- Mishra, M.; Kunde, S.; Nambiar, M. Cracking the Monolith: Challenges in Data Transitioning to Cloud Native Architectures. In Proceedings of the 12th European Conference on Software Architecture: Companion Proceedings, Madrid, Spain, 24–28 September 2018; pp. 1–4. [Google Scholar] [CrossRef]
- Laigner, R.; Zhou, Y.; Salles, M.A.V.; Liu, Y.; Kalinowski, M. Data Management in Microservices: State of the Practice, Challenges, and Research Directions. Proc. VLDB Endow. 2021, 14, 3348–3361. [Google Scholar] [CrossRef]
- Richter, D.; Konrad, M.; Utecht, K.; Polze, A. Highly-Available Applications on Unreliable Infrastructure: Microservice Architectures in Practice. In Proceedings of the 2017 IEEE International Conference on Software Quality, Reliability and Security Companion (QRS-C), Prague, Czech Republic, 25–29 July 2017; pp. 130–137. [Google Scholar] [CrossRef] [Green Version]
- Francesco, P.; Malavolta, I.; Lago, P. Research on Architecting Microservices: Trends, Focus, and Potential for Industrial Adoption. In Proceedings of the International Conference on Software Architecture, Gothenburg, Sweden, 3–7 April 2017; pp. 21–30. [Google Scholar] [CrossRef] [Green Version]
- Knoche, H.; Hasselbring, W. Drivers and Barriers for Microservice Adoption—A Survey among Profesionals in Germany. Enterp. Model. Inf. Syst. Archit. (EMISAJ) Int. J. Concept. Modeling 2019, 14, 1–35. [Google Scholar] [CrossRef]
- Luz, W.; Agilar, E.; Oliveira, M.S.; Melo, C.E.R.; Pinto, G.; Bonifácio, R. An Experience Report on the Adoption of Microservices in Three Brazilian Government Institutions. In Proceedings of the XXXII Brazilian Symposium on Software Engineering, Sao Carlos, Brazil, 17–21 September 2018; SBES ’18. ACM: New York, NY, USA, 2018; pp. 32–41. [Google Scholar] [CrossRef]
- Soldani, J.; Tamburri, D.A.; Van Den Heuvel, W.J. The pains and gains of microservices: A Systematic grey literature review. J. Syst. Softw. 2018, 146, 215–232. [Google Scholar] [CrossRef]
- Levcovitz, A.; Terra, R.; Valente, M.T. Towards a Technique for Extracting Microservices from Monolithic Enterprise Systems. In Proceedings of the 3rd Brazilian Workshop on Software Visualization, Evolution and Maintenance (VEM), Belo Horizonte, Brazil, 23 September 2015; pp. 97–104. [Google Scholar] [CrossRef]
- Tozzi, C. 9 Mainframe Statistics That May Surprise You. 2021. Available online: https://www.precisely.com/blog/mainframe/9-mainframe-statistics (accessed on 30 October 2021).
- Precisely Editor. Why The Mainframe Still Matters in 2021. 2021. Available online: https://www.precisely.com/blog/mainframe/mainframe-still-matters (accessed on 30 October 2021).
- Henry, A. Mainframe Batch to Microservice. 2018. Available online: https://aws.amazon.com/fr/blogs/apn/how-to-migrate-mainframe-batch-to-cloud-microservices-with-blu-age-and-aws/ (accessed on 30 October 2021).
- Kazanavičius, J.; Mažeika, D. Analysis of Legacy Monolithic Software Decomposition into Microservices. In Proceedings of the Baltic-DB&IS-Forum-DC 2020, Tallin, Estonia, 16–19 June 2020. [Google Scholar]
- Kazanavičius, J.; Mažeika, D. Migrating Legacy Software to Microservices Architecture. In Proceedings of the 2019 Open Conference of Electrical, Electronic and Information Sciences (eStream), Vilnius, Lithuania, 25 April 2019; pp. 1–5. [Google Scholar] [CrossRef]
- Brewer, E.A. Towards robust distributed systems. In Proceedings of the Symposium on Principles of Distributed Computing (PODC), Portland, OR, USA, 16–19 July 2000. [Google Scholar] [CrossRef]
- Khine, P.P.; Wang, Z. A Review of Polyglot Persistence in the Big Data World. Information 2019, 10, 141. [Google Scholar] [CrossRef] [Green Version]
- Meier, A.; Kaufmann, M. SQL & NoSQL Databases: Models, Languages, Consistency Options and Architectures for Big Data Management; Springer: Wiesbaden, Germany, 2019. [Google Scholar] [CrossRef]
- Shah, C.; Srivastava, K.; Shekokar, N.M. A novel polyglot data mapper for an E-Commerce business model. In Proceedings of the 2016 IEEE Conference on e-Learning, e-Management and e-Services (IC3e), Langkawi, Malaysia, 10–12 October 2016; pp. 40–45. [Google Scholar] [CrossRef]
- Davoudian, A.; Chen, L.; Liu, M. A Survey on NoSQL Stores. ACM Comput. Surv. (CSUR) 2018, 51, 1–43. [Google Scholar] [CrossRef]
- Krishnan, G. IBM Mainframe Database Overview and Evolution of DB2 as Web Enabled Scalable Server. Datenbank-Spektrum 2002, 3, 6–14. [Google Scholar]
- Sharma, V.; Dave, M. SQL and NoSQL Databases. Int. J. Adv. Res. Comput. Sci. Softw. Eng. 2012, 12, 467–471. [Google Scholar] [CrossRef]
- Nayak, A.; Poriya, A.; Poojary, D. Type of nosql databases and its comparison with relational databases. Int. J. Appl. Inf. Syst. 2013, 5, 16–19. [Google Scholar]
- DB-ENGINES. DB-Engines Ranking. 2021. Available online: https://db-engines.com/en/ranking (accessed on 30 October 2021).
- Zdepski, C.; Bini, T.A.; Matos, S.N. An Approach for Modeling Polyglot Persistence. In Proceedings of the International Conference on Information Systems (ICEIS), Funchal, Madeira, 21–24 March 2018. [Google Scholar] [CrossRef]
- Serra, J. What is Polyglot Persistence? 2015. Available online: https://www.jamesserra.com/archive/2015/07/what-is-polyglot-persistence/ (accessed on 30 October 2021).
- Wiese, L. Polyglot Database Architectures. In Proceedings of the LWA 2015 Workshops: KDML, FGWM, IR, and FGDB, Trier, Germany, 7–9 October 2015. [Google Scholar]
- Chawla, H.; Kathuria, H. Building Microservices Applications on Microsoft Azure; Apress: Berkeley, CA, USA, 2019. [Google Scholar]
- Brown, K.; Bobby, W. Implementation patterns for microservices architectures. In Proceedings of the Pattern Language of Programs Conference, Allerton Park, IL, USA, 24–26 November 2016; p. 35. [Google Scholar]
- Ntentos, E.; Zdun, U.; Plakidas, K.; Meixner, S.; Geiger, S. Assessing Architecture Conformance to Coupling-Related Patterns and Practices in Microservices. In European Conference on Software Architecture; Springer: Cham, Switzerland, 2020. [Google Scholar] [CrossRef]
- Messina, A.; Rizzo, R.; Storniolo, P.; Urso, A. A Simplified Database Pattern for the Microservice Architecture. In Proceedings of the Conference: DBKDA 2016, The Eighth International Conference on Advances in Databases, Knowledge, and Data Applications, Lisbon, Portugal, 26–30 June 2016; pp. 223–233. [Google Scholar] [CrossRef]
- Villaça, L.H.; Azevedo, L.G.; Siqueira, S.W. Microservice Architecture for Multistore Database Using Canonical Data Model. In Proceedings of the XVI Brazilian Symposium on Information Systems, São Bernardo do Campo, Brazil, 3–6 November 2020. [Google Scholar] [CrossRef]
- Viennot, N.; Lécuyer, M.; Bell, J.; Geambasu, R.; Nieh, J. Synapse: A microservices architecture for heterogeneous-database web applications. In Proceedings of the 10th European Conference on Computer Systems, Bordeaux, France, 21–24 April 2015. [Google Scholar] [CrossRef]
- Rodriguez, J.; Crasso, M.; Mateos, C.; Zunino, A.; Campo, M. Bottom-up and top-down COBOL system migration to Web Services: An experience report. IEEE Internet Comput. 2011, 17, 44–51. [Google Scholar] [CrossRef] [Green Version]
- ArangoDB. Available online: https://www.arangodb.com/ (accessed on 19 March 2022).
- C# Documentation. Available online: https://docs.microsoft.com/en-us/dotnet/csharp/ (accessed on 19 March 2022).
- Visual Studio. Available online: https://visualstudio.microsoft.com/ (accessed on 19 March 2022).
- NuGet. Available online: https://www.nuget.org/ (accessed on 19 March 2022).
- Docker. Available online: https://www.docker.com (accessed on 19 March 2022).
- OpenShift. Available online: https://www.redhat.com/en/technologies/cloud-computing/openshift (accessed on 19 March 2022).
- Kubernetes. Available online: https://kubernetes.io (accessed on 19 March 2022).
- AzureDevOps. Available online: https://azure.microsoft.com/en-us/services/devops (accessed on 19 March 2022).
- Dodge, Y.; Cox, D.; Commenges, D. The Oxford Dictionary of Statistical Terms; Oxford University Press: Oxford, UK, 2006. [Google Scholar]
Functional Requirements |
---|
|
|
|
|
|
|
|
|
|
Value | Description |
---|---|
1 | Lowest quality |
2 | Low quality |
3 | Average quality |
4 | High quality |
5 | Highest quality |
Quality Attribute | Monolith | Microservice |
---|---|---|
Accuracy | 5 | 5 |
Completeness | 5 | 5 |
Consistency | 3 | 5 |
Credibility | 5 | 5 |
Correctness | 4 | 4 |
Accessibility | 4 | 4 |
Compliance | 5 | 5 |
Confidentiality | 5 | 5 |
Efficiency | 4 | 4 |
Precision | 5 | 5 |
Traceability | 5 | 5 |
Understandability | 3 | 5 |
Availability | 2 | 4 |
Portability | 1 | 5 |
Recoverability | 4 | 4 |
Criteria | Authors | Alternative |
---|---|---|
1. Possible improvement of quality of consistency, understandability, availability, and portability | + | − |
2. Availability to used different data models for different data structures | + | − |
3. Database adaptation to microservice architecture | + | − |
4. Extensive business experts involvement into migration process | − | + |
5. Ability to divide database per microservice | − | + |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kazanavičius, J.; Mažeika, D.; Kalibatienė, D. An Approach to Migrate a Monolith Database into Multi-Model Polyglot Persistence Based on Microservice Architecture: A Case Study for Mainframe Database. Appl. Sci. 2022, 12, 6189. https://doi.org/10.3390/app12126189
Kazanavičius J, Mažeika D, Kalibatienė D. An Approach to Migrate a Monolith Database into Multi-Model Polyglot Persistence Based on Microservice Architecture: A Case Study for Mainframe Database. Applied Sciences. 2022; 12(12):6189. https://doi.org/10.3390/app12126189
Chicago/Turabian StyleKazanavičius, Justas, Dalius Mažeika, and Diana Kalibatienė. 2022. "An Approach to Migrate a Monolith Database into Multi-Model Polyglot Persistence Based on Microservice Architecture: A Case Study for Mainframe Database" Applied Sciences 12, no. 12: 6189. https://doi.org/10.3390/app12126189
APA StyleKazanavičius, J., Mažeika, D., & Kalibatienė, D. (2022). An Approach to Migrate a Monolith Database into Multi-Model Polyglot Persistence Based on Microservice Architecture: A Case Study for Mainframe Database. Applied Sciences, 12(12), 6189. https://doi.org/10.3390/app12126189