Would you please review my description of Saga?
Process Manager [EIP] / Orchestrator [FSA]
<pic>
Process Manager is a kind of Facade that translates a high-level task into a sequence of lower-level steps. This subtype of an Orchestrator receives a client request, stores its state, runs pre-programmed request processing steps and returns a response. Each of the steps is similar to an API Composer in that it generates a set of parallel requests to internal services and waits and stores the results for future use in following steps or in the final response.
A Process Manager may be implemented in a general-purpose programming language, a declarative description for a 3rd party tool, or a mixture thereof.
A Process Manager is usually a part of an API Gateway, Event Mediator or Enterprise Service Bus.
Example: [FSA] provides several examples.
Saga [MP] / Coordinator [POSA3]
<pic>
Saga is a subtype of Process Manager which is specialized in distributed transactions. It is built as a pre-programmed sequence of {“do”, “undo”} pairs. When a Saga is run, it iterates through the “do” sequence till it either completes (meaning the transaction succeeded) or fails. A failed Saga iterates through its “undo” sequence to roll back the changes that were already made.
A Saga is often programmed declaratively in a 3rd party Saga Framework which can be integrated into any service that needs to run a distributed transaction. However, it is quite likely that such a service is an Integration Service as it seems to manage other services.
A Saga plays the role of both a Facade by translating a single transaction request into a series of calls to services’ APIs and of a Mediator by keeping the states of the services consistent (the transaction succeeds or fails as a whole). Sometimes a Saga may include requests to an external service (not part of the system you are developing).
Example: [MP] has a detailed description.