Event Choreography for Loosely Coupled Business Processes

preview_player
Показать описание
What's Event Choreography? Let's back up a bit to answer that. Event Driven Architecture is a way to make your system more extensible and loosely coupled. Using events as a way to communicate between service boundaries. But how do you handle long-running business processes and workflows that involve multiple services? Using RPC is going back to tight coupling, which we're trying to avoid with Event Driven Architecture. So what's a solution? Event Choreography

🔗 Solace

💥 Join this channel to get access to source code & demos!

🔥 Don't have the JOIN button? Support me on Patreon!

0:00 Intro
0:42 Tight Coupling
2:21 Synchronous Orchestration
3:40 Publish/Subscribe
4:31 Event Choreography

Orchestration

#softwaredesign #softwaredesign #eventdrivenarchitecture

Choreography icons created by Flat Icons - Flaticon
Рекомендации по теме
Комментарии
Автор

If you are using MassTransit, It has a built in state machine that could be utilized by an Orchestrator service to handle events according to state, and emit commands. In that way you eliminate "physical" coupling - no service knows about another service or its contracts. The logic for handling their interactions is now separate. But this pattern is of course not for every service. But if the worklow can be centralized that is great. Like handling the events of an Order to signal Warehouse, Billing, and Shipping etc.

marna_li
Автор

Sorry for this being off topic, but does the vertical slice architecture work good for monoliths or only microservices? I am working at a startup and currently the only person maintaining a crud ecommerce api. I have restructured it to be vertical slice but it seems to be mostly what you call transaction scripts. There is very little domain logic/aggregates and I am not sure if I am doing things correctly. Keep making the awesome videos!

gavinc
Автор

Sorry for noob's question, but lets say you have A-Order, B-Shipping, C-Billing. In case of orchestration if service C is down - orchestrate can revert A and B. In case of events how do you know to revert A and B if C haven't posted any event?

ogionwiz
Автор

Is not this workflow, that you described, a SAGA process?

thedacian
Автор

Does the broker in your example know which services consumes which event? I'm usually a bit worried about the governance of the events in case your application grows.

florianfanderl
Автор

Hi Derek. Thanks for the video as always. I was watching your video about Event Orchestrator with nservicebus. I was wondering if you could showcase an event orchestrator integrated with cap instead so it is available for many message brokers. Thanks again

acegame
Автор

Ok so I’m working with a client that needs to be able to customize that workflow with BPMN (basically visual notation similar to your graphic). The code for services stays the same, but is called at different times depending on the model the client wants. One day it might be ABC, the second day it might be BDC. How would you go about implementing that without a process orchestrator? Also the process orchestrator in this case is using kafka to publish commands and not making synchronous requests. How does choreography improve on that?

essamal-mansouri