Solution
Using sagas, workflows can be implemented in a Microservice application. Sagas are state machines that model a workflow with steps to be executed. Sagas treat the various Microservices as implementations of workflow.
In a Microservice system, there is no central truth as the various Microservices each have a part of data stored in their database. Sagas can store the actual truth and each Microservice can get part of data it needs.
Saga maintains state in the form of object you define until saga finishes. A saga can coordinate message flow in the way you implement. You can instruct what message should be sent to a Microservice and what response should be expected from it and how the response should be used to send messages to other ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access