Architecture: The Hard Parts - workflow choreography vs orchestration

July 21st, 2022

orchestration: conductor at musical orchestra

choreography: dancers

 


 

Orchestration

no description for image available

single point of failure

services depend on orchestrator

lots of communication

 

order placement needs to be highly available

  • orchestrator needs to be highly available

  • order placements needs to be highly available

 

no description for image availableno description for image available

smaller orchestrator (vs Enterprise Service Bus)

eg. Order Placement Orchestrator, Order Cancellation Orchestrator

 

logic shifts to the orchestrator

 

error handling becomes a design decision

  • in the orchestrator?

  • in the service?

-> no new lines, so not architecture, but design

 


 

Choreography

no description for image available

 

highly available, only the starting service

no description for image available

 

event-driven architecture is typically choreographed

 

error handling

no description for image available

what if payment says: "oh, but they removed that credit card"

 

"where is my order?"

-> there is no state owner

no description for image available

either:

  • make order placement state owner

  • new customer facing service for state ownership

 


 

Hybrid

no description for image available

async or sync

 


 

no description for image available