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 Microservices. A saga can persist its state in a durable storage which makes the sagas resistant to failures:

Sagas (Solution)

Although sagas can be implemented through several mechanisms, NHibernate provides an easy to use interface to build workflows and persist state in Azure storage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.182.110