Development of a methodology for the implementation of transactions in distributed systems with microservice architectura

A.M. Glybovets, M.M. Glybovets, T.A. Chernova

Abstract


The paper describes the analysis of the problems of using microservice architecture in distributed systems. Emphasis is placed on flexibility in the choice of technologies, scalability and organization of teams working on given microservices, technical and domain problems of transaction implementation in comparison with a monolithic system. The main focus is on transactions, as they ensure atomicity, consistency, isolation, and persistence across multiple services. In the process of analyzing modern approaches and solutions for working with transactions in distributed systems, it was found that one of the effective solutions is the use of the Transactional Outbox pattern. Its implementation in the form of Spring starter is presented. The latter is added to the system, configured and facilitates the use of transactions and the publication of events that are part of a transaction in a microservice architecture. The developed methodology for implementing distributed transactions based on message queues, using the above-mentioned starter, is described in detail. The basic configurations and settings of message queues for the correct operation of transactions in distributed systems are defined

Problems in programming 2024; 1: 64-76


Keywords


distributed system; distributed transactions; microservice architecture; Transactional Outbox pattern; asynchronous communication; Kafka; Debeziu

References


Maarten van Steen, Andrew S. Tanenbaum. "A brief introduction to distributed systems." Web. 2016. https://www.distributed-systems.net/my-data/papers/2016.computing.pdf

Fowler M. Microservices [Електронний ресурс] / M. Fowler, J. Lewis. – 2014. – Режим доступу до ресурсу: https://martinfowler.com/articles/microservices.html

Яшина О.М., Кравчук О.А. Дослідження мікросервісної архітектури, архітектурний стиль REST та їх сучасна реалізація на Java. Вісник ХНУ: технічні науки, Номер: №5, 2020, с. 106-114.

Trzaska, Mariusz. "Technical challenges of creating an IT system in microservices architectural style using cloud services" Web. 2022 https://users.pja.edu.pl/~mtrzaska/Files/PraceMagisterskie/220217-Grabowski.pdf

Newman S. Monolith To Microservices / Sam Newman., 2019. – 301 с. – (2).

Fowler, Martin. "How to break a Monolith into Microservices" Web. 2018 https://martinfowler.com/articles/break-monolith-into-microservices.html

Richardson C. Microservices Patterns With examples in Java / Chris Richardson., 2018. – 520 с.

Fowler, Martin "Two Phase Commit" Web. https://martinfowler.com/articles/patterns-of-distributed-systems/two-phase-commit.html

Transactional Outbox Pattern https://www.linkedin.com/pulse/transactional-outbox-pattern-distributed-pratik-pandey (дата звернення 08.07.23)

Chola, Abhinal "Understanding Write Ahead Logging: 4 Comprehensive Aspects" Web. https://hevodata.com/learn/write-ahead-logging/

Spring Blog. "Case Study: Change Data Capture (CDC) Analysis with CDC Debezium source and Analytics sink in Real-Time" Web.

https://spring.io/blog/2020/12/14/case-study-change-data-capture-cdc-analysis-with-cdc-debezium-source-and-analytics-sink-in-real-time

Debezium Documentation. Web. https://debezium.io/documentation/reference/stable/index.html

Hevodata. "3 Easy Steps to Decode CDC Using Debezium Spring Boot" Web. https://hevodata.com/learn/debezium-spring-boot/

Spring Boot Starters documentation. Web https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using.build-systems.starters

Rajabi M. How to Avoid Coupling in Microservices Design [Електронний ресурс] / Mariam Rajabi. – 2020. – URL: https://www.capitalone.com/tech/softwareengineering/how-to-avoid-loose-coupled-microservices/.

Walpita P. Coupling and Cohesion in Microservices [Електронний ресурс] / Priyal Walpita. – 2020. – URL: https://priyalwalpita.medium.com/coupling-and-cohesion-inmicroservices-235ed9203843.

Baeldung Blog "Implementing Retry in Kafka Consumer" Web. https://www.baeldung.com/spring-retry-kafka-consumer

Medium. "Dead Letter Queue (DLQ) in Kafka" Web. https://towardsdatascience.com/dead-letter-queue-dlq-in-kafka-29418e0ec6cf

Richardson, Chris. "Pattern: Idempotent Consumer" Web. https://microservices.io/patterns/communication-style/idempotent-consumer.html


Refbacks

  • There are currently no refbacks.