Chapter 8: Implementing Long-Running Workflows
In the previous chapters, we looked at handling commands and queries within the context of a single aggregate. All the scenarios we have looked at thus far have been limited to a single interaction. However, not all capabilities can be implemented in the form of a simple request-response interaction, requiring coordination across multiple external systems or human-centric operations, or both. In other cases, there may be a need to react to triggers that are non-deterministic (occur conditionally or not at all) and/or are time-bound (based on a deadline). This may require managing business transactions across multiple bounded contexts that may run over a long duration of time while continuing to maintain consistency (saga).
There are at least two common patterns to implement the saga pattern:
- Explicit...