This Azure Durable Function implements the algorithm of reversing a linked list in form of a Durable Orchestration written in TypeScript.
It does so solely for fun and demo purposes.
The sample linked list represents The Gigantic Turnip Russian folktale (which not only fits well into the context, but also promotes teamwork). That list constitutes the actual state of the Durable Orchestration.
Please, have Azure Functions Core Tools globally installed on your devbox.
- In the project's folder create a
local.settings.json
file, which should look like this:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "your-azure-storage-connection-string",
"FUNCTIONS_WORKER_RUNTIME": "node"
}
}
- Go to the project's folder with your command prompt and type the following:
npm install
npm start
- Navigate to http://localhost:7071/api/start-the-saga
This will create a new RepkaHub
Task Hub and start a new instance of the-saga-of-repka orchestration in it. Subsequent calls to that method will recreate the same instance, causing it to reverse its linked list backwards and forwards.
Once you started an Orchestration, you can monitor its state with Durable Functions Monitor. This sample also includes a custom status tab template for it, which visualizes the process in a beautiful and authentic way: https://twitter.com/tino_scale_tone/status/1350936310035472386.