-
Saga Client: A Web API implemented as an Azure Durable Functions with HTTP trigger binding that receives HTTP requests to start new transactions. For each request, it generates a random transaction ID, starts a new Saga orchestrator instance and provides the transaction ID as part of the HTTP response.
-
Saga Orchestrator: Long-running Durable Orchestrator that coordinates the transaction workflow by producing commands to Event Hubs and waiting for events from Saga participants.
-
Saga Orchestrator Activity: Activity function with Cosmos DB binding that persists the Saga state (Pending, Success and Failed) to Cosmos DB.
-
Command Producer Activity: Activity function with Event Hubs binding that produces commands created by the orchestration to Event Hubs.
-
Validator: Saga participant implemented as an Azure Function with Event Hubs trigger and Cosmos DB binding that simulates a set of bank accounts validation before proceeding to money transfer between accounts (e.g. checking if both accounts exist, if accounts have sufficient balance, etc.). The resulted event (e.g InvalidAccountEvent) is produced on
Saga Reply
Event Hubs and persisted on Cosmos DB. -
Transfer: Saga participant implemented as an Azure Functions with Event Hubs trigger and Cosmos DB binding that simulates credit and debit operations on bank accounts. The resulted state (e.g. TransferSucceededEvent) is produced as on
Saga Reply
Event Hubs and persisted on Cosmos DB. -
Receipt: Saga participant implemented as an Azure Function with Event Hubs trigger and Cosmos DB binding that generates a receipt ID for the issuer. The resulted state (e.g. ReceiptIssuedEvent) is produced on
Saga Reply
Event Hubs and persisted on Cosmos DB. -
Saga Event Processor: Azure Durable Functions with Cosmos DB binding and Event Hubs trigger that consumes all events produced by Saga participants, raises external events for orchestrator instances and persists the events on Cosmos DB.
-
Saga Status Checker: Azure Functions HTTP trigger that provides a schema as part of the HTTP response with the saga status (e.g. Pending, Finished and Failed) and the saga orchestrator runtime status (e.g. Running and Completed).
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.