Saga pattern technologies: a criteria-based evaluation
Status:: 🟨
Links:: Saga Pattern
Metadata
Authors:: Dürr, Karolin; Lichtenthäler, Robin; Wirtz, Guido
Title:: Saga pattern technologies: a criteria-based evaluation
Date:: 2022
Publisher:: SCITEPRESS - Science and Technology Publications
URL:: https://www.scitepress.org/DigitalLibrary/Link.aspx?doi=10.5220/0010999400003200
DOI:: 10.5220/0010999400003200
Dürr, K., Lichtenthäler, R., & Wirtz, G. (2022). Saga pattern technologies: A criteria-based evaluation. Proceedings of the 12th International Conference on Cloud Computing and Services Science, 141–148. https://doi.org/10.5220/0010999400003200
One challenge in Microservices Architectures is coordinating business workflows between services, for which the Saga pattern is frequently mentioned as a solution in the literature. This work presents a criteria catalog based on which existing technological solutions that help with Saga implementations can be qualitatively evaluated to enable an informed decision between them. It considers criteria relevant for the Saga pattern, microservices characteristics, and for operating a system in production. We use it to evaluate four technological solutions by implementing an exemplary use case. Due to their different origins, the technologies come with varying strengths and weaknesses and as a result no solution is superior. The results can help developers decide which technology to use and provide insights into what to consider when implementing the Saga pattern.
Notes & Annotations
Color-coded highlighting system used for annotations
📑 Annotations (imported on 2024-01-25#10:29:09)
Nevertheless, the Saga pattern involves complexity, because such independent local transactions need to be coordinated and compensation must be possible to take into account different failure scenarios. Therefore, framework support can be helpful and suitable technologies have emerged.
This work investigates different existing solutions by comparing their capabilities based on a well–defined criteria catalog. We acknowledge that the Saga pattern is not suitable for every use case, but this work does not provide an evaluation of when it fits and when it does not. Instead, we make the assumption that the Saga pattern has already been identified as suitable for a use case at hand and a technological solution for supporting the implementation needs to be chosen.
Some previous studies have also assessed existing technologies with regards to the Saga pattern. The study by (Štefanko et al., 2019) analyzed four different Java–based application frameworks: Axon, Eventuate Event Sourcing and, like us, Eventuate Tram and MicroProfile Long–Running Actions (LRA), but based on the Narayana implementation. Their evaluation focused on assessing the frameworks’ support for the Saga pattern, its implementation complexity, and a performance analysis investigating the system’s behavior under large load (Štefanko et al., 2019). However, they do not specify their used quality criteria in detail.
Štefanko, M., Chaloupka, O., and Rossi, B. (2019). The Saga Pattern in a Reactive Microservices Environment. In Proceedings of the 14th International Conference on Software Technologies (ICSOFT), pages 483–490. SciTePress.
📑 Annotations (imported on 2024-01-25#10:37:55)
Using distributed transactions, for example with the 2–Phase Commit (2PC) protocol, would be a classical approach (Al-Houmailya and Samaras, 2009; Newman, 2019) in this regard. But with 2PC, the overall availability and scalability of a system is affected (Newman, 2015; Richardson, 2019; Helland, 2016), due to the strict locking requirements (Thomson et al., 2012) combined with the comparatively slow and unreliable network–based communication.
The Saga pattern is therefore mentioned frequently (Richardson, 2019; Newman, 2019; Štefanko et al., 2019; Garcia-Molina and Salem, 1987) as a solution. It divides a transaction into multiple local transactions so that locks for included resources do not have to be held until full completion.