Architecture: The Hard Parts - sagas: distributed transaction in microservices

July 21st, 2022

 

 

what if we simplify each to binary:

we get 8 permutations

(1) Sagas

  • dimensions of change

(2) sharding

  • example: concert tickets

  • example: sysops experts

 

 

 


(1) Sagas

 

dimensions of change

no description for image available

 

Any change to any of these 3 forces, changes everything...

 

no description for image available

 


 

treat as binary for simplicity

 

then we get:

Model: 8 types of sagas

  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

orchestration + atomic => drives complexity

 


 

hybrid sagas

epic saga with async compensating updates

no description for image available

 


 

(2) sharding

 

example: concert tickets

no description for image available

 

no description for image available

 

create a microservice that owns a region

 

How to see available seats?

no description for image available

cache for available seeds

 

example: sysops experts

no description for image availableno description for image available

shard per experts?