Webinar #3 - Implementing Distributed Processes
Distributed processes with an event-driven approach embrace the impossibility of the two-phase commit in distributed transactions. Instead of trying to make a big transaction across modules and databases, it does a sequence of microtransactions.
Each operation is handled by the module that’s the source of truth and can make autonomous decisions. The distributed process is triggered by the event registered and published in the system, e.g. shopping cart confirmed.
Then another module can subscribe to it and take it from there. It knows what should be the next operation, e.g. initiating the order process. It sends a handled command, and business logic creates another event. This event is the trigger for the next step of the workflow. Such lasagne of event/command/event/command continues until the process is finished (with success or failure).
We modelled a simple but representative distributed process during the webinar: a guest group checkout. We started with Miro and modelling and then discussed the implementation.
See the reference implementation in:
Read also more in:
- Saga and Process Manager - distributed processes in practice,
- Event-driven distributed processes by example.
#2 - Keep your streams short! Or how to model Event-Sourced systems efficiently
#3 - Implementing Distributed Processes
#6 - Alexey Zimarev - You don't need an Event Sourcing framework. Or do you?
#7 - Design and test Event-Driven projections and read models
#9 - Radek Maziarka - Modularization with Event Storming Process Level