The saga pattern in a reactive microservices environment

Status::
Links:: Saga Pattern

Metadata

Authors:: Štefanko, Martin; Chaloupka, Ondřej; Rossi, Bruno
Title:: The saga pattern in a reactive microservices environment
Date:: 2019
Publisher:: SCITEPRESS - Science and Technology Publications
URL:: http://www.scitepress.org/DigitalLibrary/Link.aspx?doi=10.5220/0007918704830490
DOI:: 10.5220/0007918704830490

Notes & Annotations

Color-coded highlighting system used for annotations

📑 Annotations (imported on 2024-01-26#10:48:15)

stefanko.etal.2019.sagapatternreactivemicroservicesenvironment (pg. 1)

The goal of this work is to detail the relation between traditional transaction processing models and the saga pattern in the distributed environment of reactive microservices. To understand the current support, we compare four Java-based application frameworks for microservices support (Axon, Eventuate Event Sourcing, Eventuate Tram, and MicroProfile Long Running Actions), in terms of implementation complexity, support for the saga pattern, and performance by using a common scenario.

stefanko.etal.2019.sagapatternreactivemicroservicesenvironment (pg. 2)

In contrast to the traditional transaction approach, the Saga pattern relaxes the ACID requirements to achieve availability and scalability with built-in failure management. As the saga commits each operation separately, updates of the not fully committed saga are immediately visible to other parallel operations (Gray, 1981) which directly breaks the isolation property.

stefanko.etal.2019.sagapatternreactivemicroservicesenvironment (pg. 7)

Every example has been tested in two modes 1000 order requests with 10 threads (scenario 1) and 10 000 order requests with 100 threads (scenario 2). The reason was that some of the frameworks are not able to handle the second test because of various problems discussed in the following sections.

stefanko.etal.2019.sagapatternreactivemicroservicesenvironment (pg. 7)

The Eventuate Tram project performed well in the scenario 1 which has been finished in 34 seconds with all completed orders. However, scenario 2 in some cases produced an exception in the Kafka service that timed out on the session.timeout.ms – a timeout that is used to detect consumer failures.

stefanko.etal.2019.sagapatternreactivemicroservicesenvironment (pg. 8)

Both Axon and Eventuate ES provide simplified definitions of the saga pattern, however, at the expense of the manual saga execution tracking and the mandatory CQRS pattern application. Conversely, Eventuate Tram and LRA are frameworks specifically designed for saga executions. Both frameworks provide easy integrations and transparent executions of sagas in enterprise Java applications.