The goal of this repo is to provide non trivial usage examples of the DTF Framework in an minimalist (but realistic) Net Core Application, allowing developers to easily interact and learn the framework.
The application uses DTF AzureStorage
as its backend/persistence mechanism and .Net DI
to manage IOC
.
Name | Description | Arguments - separated by ; |
---|---|---|
RetrieveFilmsOrchestration | Uses the StarWarsAPI to retrieve a list of films where the supplied Star Wars character appears, the results are saved in the file system | $CHARACTER_NAME;$FILE_NAME;$DELAY |
Clone the repo and build the solution using the CLI:
$ dotnet build
Use your favorite IDE.
The code base provides a server
(TaskWorker) and a client
.
An Azure Storage Account is required, create one via the Azure Portal and retrieve its connection string.
You can them either change the appsettings.json
or setup your IDE/terminal with environment variables.
$ export DOTNET_ENVIRONMENT=development
$ export DTF__StorageAccountConnectionString="CONNECTION_STRING"
Launch the server with the following command:
$ dotnet run server
Logs will be displayed by default.
Orchestrations can be scheduled using the syntax: client --orchestration $NAME --argument $ARGS
, for example:
$ dotnet run client --orchestration RetrieveFilmsOrchestration --argument "Luke;films-luke.json"
- Try running multiple instances of the
server
; - Kill the server during different occasions (while it is processing a task or the orchestration's control flow);
- Disconnect from the internet;
- Explore the code base;
- Use Azure Storage Explorer to view
- Create a new Orchestration;
- Keep hacking :)