./resources/model-8-types-of-sagas.resources/unknown_filename.31.png


./resources/model-8-types-of-sagas.resources/unknown_filename.png

what if we simplify each to binary: we get 8 permutations ./resources/model-8-types-of-sagas.resources/unknown_filename.32.png (1) epic saga (2) fantasy fiction saga (3) fairy tale saga (4) parallel saga (5) phone tag saga (6) horror story saga (7) time travel saga (8) anthology saga

./resources/model-8-types-of-sagas.resources/unknown_filename.2.png


transactional boundary ./resources/model-8-types-of-sagas.resources/unknown_filename.3.png


Article: 8 fallacies of distributed computing 9 10 compensating updates always work


(1) epic saga

first attempt at saga

./resources/model-8-types-of-sagas.resources/unknown_filename.4.png error: compensating updates ./resources/model-8-types-of-sagas.resources/unknown_filename.5.png ./resources/model-8-types-of-sagas.resources/unknown_filename.6.png consistency on the workflow level: read delta - 1 implementation detail

  • orchestrator implements “delta - 1”
  • services implement “delta - 1”

mimics non-distributed ./resources/model-8-types-of-sagas.resources/unknown_filename.7.png

anti-pattern atomic drives a lot of problem


(2) fantasy fiction saga

first attempt at fixing saga

./resources/model-8-types-of-sagas.resources/unknown_filename.8.png

errors: async compensating update ./resources/model-8-types-of-sagas.resources/unknown_filename.9.png faster: parallel compensating update still waiting for compensating update

./resources/model-8-types-of-sagas.resources/unknown_filename.10.png concurrency: deadlocks, race-conditions


(3) fairy tale saga

examplar from Chris Richardson's 2 types of saga's

./resources/model-8-types-of-sagas.resources/unknown_filename.11.png

error: eventually consistent compensating update ./resources/model-8-types-of-sagas.resources/unknown_filename.12.png ./resources/model-8-types-of-sagas.resources/unknown_filename.13.png reads can return “delta” instead of “delta - 1” ./resources/model-8-types-of-sagas.resources/unknown_filename.14.png


(4) parallel saga ./resources/model-8-types-of-sagas.resources/unknown_filename.15.png

error: fast feedback to initator ./resources/model-8-types-of-sagas.resources/unknown_filename.16.png ./resources/model-8-types-of-sagas.resources/unknown_filename.17.png concurrency: deadlocks, race-conditions


(5) phone tag saga with same returnpath ./resources/model-8-types-of-sagas.resources/unknown_filename.18.png or other return path ./resources/model-8-types-of-sagas.resources/unknown_filename.19.png all sync calls

error handling ./resources/model-8-types-of-sagas.resources/unknown_filename.20.png

./resources/model-8-types-of-sagas.resources/unknown_filename.21.png

uncommon: usually when doing choreography, ppl use async


(6) horror story saga

one has to be the worst

./resources/model-8-types-of-sagas.resources/unknown_filename.22.png very fast happy path

errors: wait with response until sure it was a happy path ./resources/model-8-types-of-sagas.resources/unknown_filename.23.png

./resources/model-8-types-of-sagas.resources/unknown_filename.24.png

we need async and choreography, and the business told us we need consistency

(7) time travel saga ./resources/model-8-types-of-sagas.resources/unknown_filename.25.png

error ./resources/model-8-types-of-sagas.resources/unknown_filename.26.png ./resources/model-8-types-of-sagas.resources/unknown_filename.27.png


(8) anthology saga

examplar from Chris Richardson's 2 types of saga's

./resources/model-8-types-of-sagas.resources/unknown_filename.28.png

fastest, most scaleable

error flow ./resources/model-8-types-of-sagas.resources/unknown_filename.29.png

./resources/model-8-types-of-sagas.resources/unknown_filename.30.png


./resources/model-8-types-of-sagas.resources/unknown_filename.1.png