Model: 8 types of sagas

July 27th, 2022

no description for image available

 


 

no description for image available

 

 

what if we simplify each to binary:

we get 8 permutations

no description for image available

(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

 

no description for image available

 


 

transactional boundary

no description for image available

 

Article: 8 fallacies of distributed computing

9

10 compensating updates always work

 


(1) epic saga

first attempt at saga

no description for image available

error: compensating updates

no description for image availableno description for image available

consistency on the workflow level: read delta - 1

implementation detail

  • orchestrator implements "delta - 1"

  • services implement "delta - 1"

mimics non-distributed

no description for image available

 

anti-pattern

atomic drives a lot of problem

 


(2) fantasy fiction saga

first attempt at fixing saga

no description for image available

 

errors: async compensating update

no description for image available

faster: parallel compensating update

still waiting for compensating update

 

no description for image available

concurrency: deadlocks, race-conditions

 


(3) fairy tale saga

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

no description for image available

 

error: eventually consistent compensating update

no description for image availableno description for image available

reads can return "delta" instead of "delta - 1"

no description for image available

 

 


(4) parallel saga

no description for image available

 

error: fast feedback to initator

no description for image availableno description for image available

concurrency: deadlocks, race-conditions

 


(5) phone tag saga

with same returnpath

no description for image available

or

other return path

no description for image available

all sync calls

 

error handling

no description for image available

 

no description for image available

 

uncommon: usually when doing choreography, ppl use async

 

 


(6) horror story saga

one has to be the worst

no description for image available

very fast happy path

 

errors: wait with response until sure it was a happy path

no description for image available

 

no description for image available

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

 

 


(7) time travel saga

no description for image available

 

error

no description for image availableno description for image available

 


(8) anthology saga

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

 

no description for image available

fastest, most scaleable

 

error flow

no description for image available

 

no description for image available

 


 

no description for image available