title: Ð Ð°Ð·ÑÐ°Ð±Ð¾ÑÐºÐ° Ð¼Ð¾Ð´ÑÐ»Ñ ÑÐ¿ÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ ÑÐ°ÑÐ¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð½ÑÐ¼Ð¸ ÑÑÐ°Ð½Ð·Ð°ÐºÑÐ¸ÑÐ¼Ð¸ Ð² Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ½Ð¾Ð¹ Ð°ÑÑ Ð¸ÑÐµÐºÑÑÑÐµ
title: Ð²ÑÐ¿ÑÑÐºÐ½Ð°Ñ ÐºÐ²Ð°Ð»Ð¸ÑÐ¸ÐºÐ°ÑÐ¸Ð¾Ð½Ð½Ð°Ñ ÑÐ°Ð±Ð¾ÑÐ° Ð±Ð°ÐºÐ°Ð»Ð°Ð²ÑÐ°
titleType: Subtitle
title: Development of a distributed transaction management module in a microservice architecture
Creators: name: Ð§ÑÐ¿ÑÑÐ½Ð¸Ð½, ÐÐ»ÑÑ
Publisher: name: Ð¡Ð°Ð½ÐºÑ-ÐÐµÑÐµÑÐ±ÑÑÐ³ÑÐºÐ¸Ð¹ Ð¿Ð¾Ð»Ð¸ÑÐµÑÐ½Ð¸ÑÐµÑÐºÐ¸Ð¹ ÑÐ½Ð¸Ð²ÐµÑÑÐ¸ÑÐµÑ ÐÐµÑÑÐ° ÐÐµÐ»Ð¸ÐºÐ¾Ð³Ð¾
Year: 2024
Subjects: Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÑ
ÑÐ°ÑÐ¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð½ÑÐµ ÑÑÐ°Ð½Ð·Ð°ÐºÑÐ¸Ð¸
ÑÐ¾Ð³Ð»Ð°ÑÐ¾Ð²Ð°Ð½Ð½Ð¾ÑÑÑ Ð´Ð°Ð½Ð½ÑÑ
java
microservices
distributed transactions
data consistency

description: ÐÐ°Ð½Ð½Ð°Ñ ÑÐ°Ð±Ð¾ÑÐ° Ð¿Ð¾ÑÐ²ÑÑÐµÐ½Ð° Ð¸Ð·ÑÑÐµÐ½Ð¸Ñ Ð¿ÑÐ¾Ð±Ð»ÐµÐ¼Ñ Ð¾Ð±ÐµÑÐ¿ÐµÑÐµÐ½Ð¸Ñ ÑÑÐ°Ð½Ð·Ð°ÐºÑÐ¸Ð¾Ð½Ð½Ð¾ÑÑÐ¸ Ð² Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ½Ð¾Ð¹ Ð°ÑÑÐ¸ÑÐµÐºÑÑÑÐµ, Ð° ÑÐ°ÐºÐ¶Ðµ ÑÐ°Ð·ÑÐ°Ð±Ð¾ÑÐºÐµ Ð¼Ð¾Ð´ÑÐ»Ñ, ÐºÐ¾ÑÐ¾ÑÑÐ¹ Ð±ÑÐ´ÐµÑ ÑÐµÑÐ°ÑÑ Ð´Ð°Ð½Ð½ÑÑ Ð¿ÑÐ¾Ð±Ð»ÐµÐ¼Ñ. ÐÐ°Ð´Ð°ÑÐ¸, ÐºÐ¾ÑÐ¾ÑÑÐµ ÑÐµÑÐ°Ð»Ð¸ÑÑ Ð² ÑÐ¾Ð´Ðµ ÑÐ°Ð±Ð¾ÑÑ: Ð¸Ð·ÑÑÐµÐ½Ð¸Ðµ ÑÑÑÐµÑÑÐ²ÑÑÑÐ¸Ñ Ð¿Ð¾Ð´ÑÐ¾Ð´Ð¾Ð² Ð¸ Ð¸Ñ Ð°Ð½Ð°Ð»Ð¸Ð·; Ð¾Ð¿Ð¸ÑÐ°Ð½Ð¸Ðµ Ð¿ÑÐ¸Ð½ÑÐ¸Ð¿Ð° ÑÐ°Ð±Ð¾ÑÑ Ð¸ Ð¾ÑÐ½Ð¾Ð²Ð½ÑÑ Ð¾ÑÐ¾Ð±ÐµÐ½Ð½Ð¾ÑÑÐµÐ¹ Ð¿ÑÐµÐ´Ð»Ð°Ð³Ð°ÐµÐ¼Ð¾Ð³Ð¾ Ð¿Ð¾Ð´ÑÐ¾Ð´Ð°; ÑÐµÐ°Ð»Ð¸Ð·Ð°ÑÐ¸Ñ Ð¿ÑÐ¾Ð³ÑÐ°Ð¼Ð¼Ð½ÑÑ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½ÑÐ¾Ð²; Ð¿ÑÐ¾Ð²ÐµÐ´ÐµÐ½Ð¸Ðµ ÑÐµÑÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑÐ¸ÑÑÐµÐ¼Ñ. Â  Â  Ð ÑÐ°Ð±Ð¾ÑÐµ Ð¿ÑÐ¸Ð²ÐµÐ´ÐµÐ½Ñ Ð¾Ð±Ð·Ð¾Ñ Ð¸ Ð°Ð½Ð°Ð»Ð¸Ð· ÑÑÑÐµÑÑÐ²ÑÑÑÐ¸Ñ Ð¿Ð¾Ð´ÑÐ¾Ð´Ð¾Ð², ÑÐµÑÐ°ÑÑÐ¸Ñ Ð¿ÑÐ¾Ð±Ð»ÐµÐ¼Ñ ÑÐ¾Ð³Ð»Ð°ÑÐ¾Ð²Ð°Ð½Ð½Ð¾ÑÑÐ¸ Ð´Ð°Ð½Ð½ÑÑ, Ð´ÐµÐ»Ð°ÐµÑÑÑ Ð²ÑÐ±Ð¾Ñ Ð² Ð¿Ð¾Ð»ÑÐ·Ñ ÑÐ°Ð±Ð»Ð¾Ð½Ð° Ð¿ÑÐ¾ÐµÐºÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ Â«SAGAÂ» Ñ Ð¾ÑÐµÐºÑÑÑÐ°ÑÐ¸ÐµÐ¹. ÐÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ÑÑÑ Ð¾Ð±Ð·Ð¾Ñ Ð³Ð¾ÑÐ¾Ð²ÑÑ ÑÐµÑÐµÐ½Ð¸Ð¹ Ð¸ Ð¾Ð±Ð¾ÑÐ½Ð¾Ð²ÑÐ²Ð°ÐµÑÑÑ Ð¿Ð¾ÑÑÐµÐ±Ð½Ð¾ÑÑÑ Ð½Ð°Ð¿Ð¸ÑÐ°Ð½Ð¸Ñ ÑÐ²Ð¾ÐµÐ³Ð¾ Saga Ð¾ÑÐºÐµÑÑÑÐ°ÑÐ¾ÑÐ°. Â  Â  Ð ÑÐµÐ·ÑÐ»ÑÑÐ°ÑÐµ ÑÐ°Ð±Ð¾ÑÑ Ð±ÑÐ»Ð¸ ÑÐ°Ð·ÑÐ°Ð±Ð¾ÑÐ°Ð½Ñ Ð¿ÑÐ¾Ð³ÑÐ°Ð¼Ð¼Ð½ÑÐµ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½ÑÑ, ÐºÐ¾ÑÐ¾ÑÑÐµ Ð¾ÑÐ²ÐµÑÐ°ÑÑ Ð¿Ð¾ÑÑÐ°Ð²Ð»ÐµÐ½Ð½ÑÐ¼ ÑÑÐµÐ±Ð¾Ð²Ð°Ð½Ð¸ÑÐ¼. Ð Ð°Ð±Ð¾ÑÐ¾ÑÐ¿Ð¾ÑÐ¾Ð±Ð½Ð¾ÑÑÑ ÑÐ°Ð·ÑÐ°Ð±Ð¾ÑÐ°Ð½Ð½Ð¾Ð³Ð¾ Ð¼Ð¾Ð´ÑÐ»Ñ Ð±ÑÐ»Ð° Ð¿ÑÐ¾Ð²ÐµÑÐµÐ½Ð° Ð¼Ð¾Ð´ÑÐ»ÑÐ½ÑÐ¼Ð¸ Ð¸ Ð½Ð°Ð³ÑÑÐ·Ð¾ÑÐ½ÑÐ¼Ð¸ ÑÐµÑÑÐ°Ð¼Ð¸. ÐÐ°Ð³ÑÑÐ·Ð¾ÑÐ½Ð¾Ðµ ÑÐµÑÑÐ¸ÑÐ¾Ð²Ð°Ð½Ð¸Ðµ Ð¿Ð¾ÐºÐ°Ð·Ð°Ð»Ð¾ ÑÑÐ¾ Ð¿ÑÐ¸ ÑÐºÐ°Ð·Ð°Ð½Ð½ÑÑ Ð² Ð³Ð»Ð°Ð²Ðµ 6 ÐºÐ¾Ð½ÑÐ¸Ð³ÑÑÐ°ÑÐ¸ÑÑ ÑÐµÑÑÐ¾Ð²Ð¾Ð³Ð¾ ÑÑÐµÐ½Ð´Ð° ÑÐ¸ÑÑÐµÐ¼Ð° Ð¾Ð±ÑÐ°Ð±Ð°ÑÑÐ²Ð°ÐµÑ 805.73 Ð·Ð°Ð¿ÑÐ¾ÑÐ° Ð² ÑÐµÐºÑÐ½Ð´Ñ. ÐÐ°ÐºÑÐ¸Ð¼Ð°Ð»ÑÐ½Ð¾Ðµ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ðµ Ð¾ÐºÐ¾Ð½ÑÐ°Ð½Ð¸Ñ ÑÑÐ°Ð½Ð·Ð°ÐºÑÐ¸Ð¸, Ð±ÐµÐ· ÑÐ±Ð¾ÐµÐ², ÑÐ¾ÑÑÐ°Ð²Ð»ÑÐµÑ 92.86 Ð¼Ð¸Ð»Ð¸ÑÐµÐºÑÐ½Ð´Ñ.
description: This work is devoted to the study of the problem of ensuring transactionality in microservice architecture, as well as the development of a module that will solve this problem. The tasks that were solved during the work: the study of existing approaches and their analysis; description of the principle of operation and the main features of the proposed approach; implementation of software components; testing of the system. Â  Â  The paper provides an overview and analysis of existing approaches that solve the problem of data consistency, and a choice is made in favor of the "SAGA" design pattern with orectration. A review of ready-made solutions is made and the need to write your own Saga orchestrator is justified. Â  Â  As a result of the work, software components have been developed that meet the set requirements. The performance of the developed module has been verified by modular and load tests. Load testing showed that with the test bench configurations specified in section 6, the system processes 805.73 requests per second, the maximum waiting time for the transaction to end, without failures, is 92.86 milliseconds.