DATA CONSISTENCY MODELS IN APPLICATIONS WITH MICROSERVICE ARCHITECTURE
DOI: 10.31673/2412-4338.2023.012941
Abstract
Individual database transactions can easily meet ACID requirements and ensure strong consistency, but distributed transactions have a number of limitations to address.
Hard transactions are are found to be fully ACID compliant, while using flexible transactions isolation is not fully guaranteed. In practice, the isolation requirement is waived to some extent to ensure high throughput and system performance.
Flexible transactions generally adhere to the Basic Availability, Flexible State, Eventually Consistency (BASE) theory.
The BASE theorem is an extension of the CAP theorem. This is the balance between consistency and availability in CAP. According to the BASE theory, we cannot achieve strong consistency, however, each program can achieve ultimate consistency by using an appropriate method according to its own characteristics.
CAP shows that a distributed system cannot achieve consistency, availability, and distribution resilience at the same time. It is worth to pay attention at the stage of system design. It was found that hard transactions are strive for persistent consistency, and so they sacrifice high availability. Flexible transactions sacrifice consistency in exchange for high system availability.
Keywords: microservice architecture, data consistency, distributed systems, database, monoliths, transactions.
References:
1. Nadareishvili I. Microservice Architecture: Aligning Principles, Practices, and Culture / I. Nadareishvili, R. Mitra, M. McLarty, M. Amundsen – O’Reilly Media, 2016 – 146 p.
2. Saga distributed transactions pattern [Електронний ресурс] //- Режим доступу:https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/saga/saga
3. Compensating Transaction pattern [Електронний ресурс]//-Режим доступу: https://docs.microsoft.com/en-us/azure/architecture/patterns/compensating-transaction
4. Christian PostaThe hardest part about microservices: your data [Електронний ресурс]//- Режим доступу: https://blog.christianposta.com/microservices/the-hardest-part-about-microservices-data/
5. A Guide to Transactions Across Microservices [Електронний ресурс] //- Режим доступу:https://www.baeldung.com/transactions-across-microservices
6. Stephen WattsACID explained: Atomic, Consistent, Isolated & Durable [Електроннийресурс]//-Режим доступу: https://www.bmc.com/blogs/acid-atomic-consistent-isolated-durable/
7. Vincent Bushong, Amr S. Abdelfattah, Abdullah A. Maruf (2011). On Microservice Analysis and Architecture Evolution: A Systematic Mapping Study. https://www.mdpi.com/2076-3417/11/17/7856
8. Miloš Milić, Dragana Makajić-Nikolić (2022). Development of a Quality-Based Model for Software Architecture Optimization: A Case Study of Monolith and Microservice Architectures. https://www.mdpi.com/2073-8994/14/9/1824
9. Eman Daraghmi, Cheng-Pu Zhang, Shyan-Ming Yuan (2022). Enhancing Saga Pattern for Distributed Transactions within a Microservices Architecture. https://www.mdpi.com/2076-3417/12/12/6242
10. Michael J. Donahoo, Michal Trnka, Tomas Cerny (2018). Contextual Understanding of Microservice Architecture: Current and Future Directions. https://www.researchgate.net/publication/322842819_Contextual_understanding_of_microservice_architecture_current_and_future_directions
11. Isak Shabani, Endrit Mëziu, Blend Berisha (2021). Design of Modern Distributed Systems based on Microservices Architecture. https://thesai.org/Publications/ViewPaper?Volume=12&Issue=2&Code=IJACSA&SerialNo=20
12. Aleksandra Stoykov, Zeliko Stojanov (2021). Review of methods for migtating software systems to microservices architecture. https://pdfs.semanticscholar.org/3303/14b9a3e729f1f496a3424654bae46ff81b42.pdf?_ga=2.178782564.1728312785.1671746531-553667512.1671746531
13. Mehmet Söylemez ,Bedir Tekinerdogan, Ayça Kolukısa Tarhan (2022). Feature-Driven Characterization of Microservice Architectures: A Survey of the State of the Practice. https://www.mdpi.com/2076-3417/12/9/4424
14. Freddy Tapia, Miguel Ángel Mora, Walter Fuertes (2020). From Monolithic Systems to Microservices: A Comparative Study of Performance. https://www.mdpi.com/2076-3417/10/17/5797