|
1 |
| ---- |
2 |
| -title: Choosing your orchestration framework |
3 |
| -description: This article provides guidance to help developers pick an orchestration framework. |
4 |
| -ms.topic: conceptual |
5 |
| -ms.date: 04/29/2025 |
6 |
| ---- |
| 1 | +--- |
| 2 | +title: Choosing your orchestration framework |
| 3 | +description: This article provides guidance to help developers pick an orchestration framework. |
| 4 | +ms.topic: conceptual |
| 5 | +ms.date: 04/29/2025 |
| 6 | +--- |
7 | 7 |
|
8 |
| -# Choosing an orchestration framework |
| 8 | +# Choosing an orchestration framework |
| 9 | +The goal of this article is to provide information about two developer-oriented orchestration frameworks supported by Azure and considerations for when to choose which. The article also provides some context around scenarios that warrant the use of an orchestration framework. |
9 | 10 |
|
10 |
| -The goal of this article is to provide information about two developer-oriented orchestration frameworks supported by Azure and considerations for when to choose which. The article also provides some context around scenarios that warrant the use of an orchestration framework. |
| 11 | +## Scenarios requiring orchestration |
| 12 | +Developers often find themselves creating solutions that involve multi-step operations, some of which may be long-running. These multiple-step operations are referred to as *orchestrations* or *workflows*. For example, an e-commerce website would need an order processing workflow, which has steps that need to happen sequentially to: |
| 13 | +- Check the inventory |
| 14 | +- Send order confirmation |
| 15 | +- Process payment |
| 16 | +- Generate invoice |
11 | 17 |
|
12 |
| -## Scenarios requiring orchestration |
13 |
| -Developers often find themselves creating solutions that involve multi-step operations, some of which may be long-running. These multiple-step operations are referred to as *orchestrations* or *workflows*. For example, an e-commerce website would need an order processing workflow, which has steps (implemented as microservices) that need to happen sequentially to: |
14 |
| -- Check the inventory |
15 |
| -- Send order confirmation |
16 |
| -- Process payment |
17 |
| -- Generate invoice |
| 18 | +Another example would be an intelligent trip planner. The planner might suggest ideas based on user requirements, get preference confirmation, and then make required bookings. You can implement an agent for each task and orchestrate the steps for invoking these agents as a workflow. |
18 | 19 |
|
19 |
| -Another example would be an intelligent trip planner. The planner might suggest ideas based on user requirements, get preference confirmation, and then make required bookings. You can implement an agent for each task and orchestrate the steps for invoking these agents as a workflow. |
| 20 | +Since orchestrations involve multiple or long-running steps, it's important to ensure *durable execution* so that orchestrations can continue executing from the point of failure instead of restarting in the face of interruptions or temporary infrastructure failures. The frameworks described in the next section continuously checkpoints orchestration state to a persistence layer while the app runs, so that when interruptions occur, the app can rebuild its local state and continues execution without losing previous progress. The frameworks also take care of automatic retries, so you can author your orchestrations without the burden of architecting for fault tolerance. |
20 | 21 |
|
21 |
| -Since orchestrations involve multiple or long-running steps, it's important that the framework tracks the application state so that execution can continue from the point of failure rather than the beginning. One way to ensure this statefulness is to continuously checkpoint orchestration states to a persistence layer while it runs. The next section demonstrates how orchestration frameworks maintain statefulness while also taking care automatic retries while you orchestrate your workflows without the burden of architecting for fault tolerance. |
| 22 | +Other than *sequential chaining* of operations (the pattern used by the order processing and trip planner scenarios), there are other patterns that benefit from the statefulness of orchestration frameworks: |
| 23 | +- *Fan-out/fan-in*: For batch jobs, ETL (extract, transfer, and load), and any scenario that requires parallel processing |
| 24 | +- *Human interactions*: For two-factor authentication, workflows that require human approval |
| 25 | +- *Asynchronous HTTP APIs*: For any scenario where a client doesn't want to wait for long-running tasks to complete |
22 | 26 |
|
23 |
| -The two previous scenarios share a commonly used orchestration pattern, which is *sequential chaining* of operations. There are other patterns that benefit from the statefulness of an orchestration framework: |
24 |
| -- *Fan-out/fan-in*: For batch jobs, ETL (extract, transfer, and load), and any scenario that requires parallel processing |
25 |
| -- *Human interactions*: For two-factor authentication, workflows that require human approval |
26 |
| -- *Asynchronous HTTP APIs*: For any scenario where a client doesn't want to wait for long-running tasks to complete |
| 27 | +The next section provides an overview of the two orchestration frameworks supported by Azure, **Durable Functions** and **Durable Task SDKs (currently in public preview)**, and when to use them. |
27 | 28 |
|
28 |
| -The next section covers the two orchestration frameworks supported by Azure: **Durable Functions** and **Durable Task SDKs (currently in public preview)**. |
| 29 | +## Orchestration framework options |
| 30 | +Both orchestrations frameworks described in this section are designed for developers, so they're code-centric and are available in various popular programming languages. |
29 | 31 |
|
30 |
| -## Orchestration framework options |
31 |
| -Both orchestrations frameworks described in this section are designed for developers, so they're code-centric and are available in various popular programming languages. |
| 32 | +### Durable Functions |
| 33 | +As a feature of Azure Functions, [Durable Functions](../durable-functions-overview.md) inherits numerous assets, including but not limited to the following: |
32 | 34 |
|
33 |
| -### Durable Functions |
34 |
| -As a feature of Azure Functions, [Durable Functions](../durable-functions-overview.md) inherits numerous assets, such as: |
35 |
| -- Integrations with other Azure services through the Functions extensions |
36 |
| -- Local development experience |
37 |
| -- Serverless pricing model, and more. |
| 35 | +- Azure Functions extensions, which provide integrations with other Azure services through [triggers and bindings](../../functions-triggers-bindings.md) |
| 36 | +- Local development experience |
| 37 | +- Serverless pricing model |
| 38 | +- Hosting in App Service and Azure Container Apps |
38 | 39 |
|
39 |
| -Other than running on the Functions platform, Durable Functions apps can also be run on Azure App Service and Azure Container App just like a regular Function app. |
| 40 | +Durable Functions has a special feature called [Durable Entities](../durable-functions-entities.md), which are similar in concept to virtual actors or grains in the Orleans framework. Entities allow you to keep small pieces of states for objects in a distributed system. For example, you could use entities to model users of a microblogging app or the counter of an exercise app. |
40 | 41 |
|
41 |
| -Durable Functions has a special feature called [Durable Entities](../durable-functions-entities.md), which are similar in concept to virtual actors or grains in the Orleans framework. Entities allow you to keep small pieces of states for objects in a distributed system. For example, you could use entities to model users of a microblogging app or the counter of an exercise app. Learn more about Durable Entities. |
| 42 | +As mentioned earlier, orchestration frameworks need to persist state information. In the context of Durable Functions, states are persisted in something called a [storage backend](../durable-functions-storage-providers.md). Durable Functions supports two "bring-your-own" (BYO) backends - Azure Storage and Microsoft SQL - and an Azure managed backend called Durable Task Scheduler (more information about the scheduler in the next section). |
42 | 43 |
|
43 |
| -As mentioned earlier, orchestration frameworks need to persist state information. In the context of Durable Functions, states are persisted in something called a [storage backend](../durable-functions-storage-providers.md). Durable Functions supports two "bring-your-own" (BYO) backends - Azure Storage and Microsoft SQL - and an Azure managed backend called Durable Task Scheduler (more information about the scheduler in the next section). |
| 44 | +#### When to use Durable Functions |
| 45 | +If you need to build event-driven apps with workflows, consider Durable Functions. The Azure Functions extensions provide integrations with other Azure services, which makes building event-driven scenarios easy. For example, if you need to start an orchestration when a message comes into your Azure Service Bus or when a file is uploaded to Azure Blob Storage, you can easily implement that with the respective Azure Function triggers in your Durable Functions app. Or if you need an orchestration to start periodically or in reaction to an HTTP request, then you can build that with the Azure Function timer and HTTP trigger, respectively. |
44 | 46 |
|
45 |
| -#### When to use Durable Functions |
46 |
| -If you need to build event-driven apps with workflows, the recommendation would be to consider Durable Functions. The Azure Functions extensions that provide integrations with other Azure services makes building event-driven scenarios easy. For example, if you need to start a Durable Functions orchestration when a message comes into your Azure Service Bus or a file uploads to Azure Blob Storage, you can easily implement that with Durable Functions. Or if you need an orchestration to start periodically or in reaction to an HTTP request, then you can build that with the Azure Functions timer and HTTP trigger, respectively. |
| 47 | +Another scenario for choosing Durable Functions is when your solution benefits from using Durable Entities, since the Durable Task SDKs don't provide this feature. |
47 | 48 |
|
48 |
| -Another scenario for choosing Durable Functions would be when your solution benefits from using Durable Entities, since the Durable Task SDKs don't provide this feature. |
| 49 | +Lastly, if you already have Azure Function apps and realized that you need workflow, you probably would want to use Durable Functions as its programming model is similar to that of Azure Function's. You can accelerate your development in this case. |
49 | 50 |
|
50 |
| -Lastly, if you're already writing Azure Function apps and realized that you need workflow, you probably want to use Durable Functions. Its programming model is very similar to Functions. You can accelerate your developer in this case. |
| 51 | +**Quickstarts** |
| 52 | +- Create a Durable Functions app with Azure Storage backend |
| 53 | + - [.NET](../durable-functions-isolated-create-first-csharp.md) |
| 54 | + - [Python](../quickstart-python-vscode.md) |
| 55 | + - [JavaScript/TypeScript](../quickstart-js-vscode.md) |
| 56 | + - [Java](../quickstart-java.md) |
| 57 | + - [PowerShell](../quickstart-powershell-vscode.md) |
| 58 | +- [Configure a Durable Functions app with Durable Task Scheduler](./quickstart-durable-task-scheduler.md) |
| 59 | +- [Configure a Durable Functions app with MSSQL](../quickstart-mssql.md) |
51 | 60 |
|
52 |
| -**Quickstarts** |
53 |
| -- Create a durable functions app with Azure Storage backend |
54 |
| - - [.NET](../durable-functions-isolated-create-first-csharp.md) |
55 |
| - - [Python](../quickstart-python-vscode.md) |
56 |
| - - [JavaScript/TypeScript](../quickstart-js-vscode.md) |
57 |
| - - [Java](../quickstart-java.md) |
58 |
| - - [PowerShell](../quickstart-powershell-vscode.md) |
59 |
| -- [Configure a durable functions app with Durable Task Scheduler](./quickstart-durable-task-scheduler.md) |
60 |
| -- [Configure a durable functions app with MSSQL](../quickstart-mssql.md) |
| 61 | +**Scenario samples** |
| 62 | +- Order processing workflow - [.NET](/samples/azure-samples/durable-functions-order-processing/durable-func-order-processing/), [Python](/samples/azure-samples/durable-functions-order-processing-python/durable-func-order-processing-py/) |
| 63 | +- Intelligent PDF summarizer - [.NET](samples/azure-samples/intelligent-pdf-summarizer-dotnet/durable-func-pdf-summarizer-csharp/), [Python](samples/azure-samples/intelligent-pdf-summarizer/durable-func-pdf-summarizer/) |
61 | 64 |
|
62 |
| -**Scenario samples** |
63 |
| -- Order processing workflow - [.NET](/samples/azure-samples/durable-functions-order-processing/durable-func-order-processing/), [Python][TODO] |
64 |
| -- Intelligent PDF summarizer - [.NET][TODO], [Python][TODO] |
65 |
| - |
66 |
| -### Durable Task SDKs with Durable Task Scheduler (public preview) |
67 |
| -The Durable Task SDKs are client SDKs that allows the orchestrations you write to connect to the orchestration engine in Azure. Apps that use the Durable Task SDKs can be run on any compute platforms, including: |
68 |
| -- Azure Kubernetes Service |
69 |
| -- Azure Container Apps |
70 |
| -- Azure App Service |
71 |
| -- VMs on-premises |
72 |
| - |
73 |
| -The Durable Task SDKs must be used with the Durable Task Scheduler (currently in public preview), where the latter plays both the role of the orchestration engine and the storage backend for orchestration state persistence. As mentioned previously, the Azure-managed Durable Task Scheduler eliminates management overhead. The scheduler is also optimized to provide high orchestration throughput, offers an out-of-the-box dashboard for orchestrations monitoring and debugging, as well as a local emulator and more. Learn more about the [Durable Task Scheduler](./durable-task-scheduler.md). |
74 |
| - |
75 |
| -#### When to use Durable Task SDKs |
76 |
| -Use the Durable Task SDKs when your app needs only workflows. The Durable Task SDKs provide a lightweight and relatively un-opinionated programming model for authoring workflows. |
77 |
| - |
78 |
| -The other reason for using the Durable Task SDKs is when you need to run apps on Azure Kubernetes Services or VMs on-premises with official Microsoft support. While Durable Functions can be run on these platforms as well, there's no official support. |
79 |
| - |
80 |
| -<!-- uncomment in quickstart PR |
81 |
| -**Quickstarts** |
82 |
| -- [.NET][TODO] |
83 |
| -- [Python][TODO] |
84 |
| -- [Java][TODO] |
85 |
| ---> |
86 |
| - |
87 |
| -> [!NOTE] |
88 |
| -> The Durable Task Framework is an open-source .NET orchestration framework. Like the Durable Task SDKs, it can be used to build apps that run on platforms like the Azure Kubernetes Services. However, we don't recommend new customers to use Durable Task Framework because Microsoft doesn't officially support it. |
| 65 | +### Durable Task SDKs with Durable Task Scheduler (public preview) |
| 66 | +The Durable Task SDKs are client SDKs that allows the orchestrations you write to connect to the orchestration engine in Azure. Apps that use the Durable Task SDKs can be run on multiple compute platforms, including: |
| 67 | +- Azure Kubernetes Service |
| 68 | +- Azure Container Apps |
| 69 | +- Azure App Service |
| 70 | +- VMs on-premises |
89 | 71 |
|
| 72 | +The Durable Task SDKs must be used with the [Durable Task Scheduler](./durable-task-scheduler.md), where the latter plays both the role of the orchestration engine and the storage backend for orchestration state persistence. As mentioned previously, the Durable Task Scheduler is managed by Azure, eliminating the management overhead that comes with BYO backends. The scheduler is also optimized to provide high orchestration throughput, offers an out-of-the-box dashboard for orchestrations monitoring and debugging, an emulator for local development, and more. |
90 | 73 |
|
| 74 | +#### When to use Durable Task SDKs |
| 75 | +The Durable Task SDKs provide a lightweight and relatively un-opinionated programming model for authoring workflows. Use the Durable Task SDKs when your app needs only workflows and don't benefit from the triggers and bindings provided by Azure Functions. |
91 | 76 |
|
| 77 | +The other scenario for choosing the Durable Task SDKs is when you need to run apps on Azure Kubernetes Services or VMs on-premises with official Microsoft support. While Durable Functions can be run on these platforms as well, there's no official support. |
92 | 78 |
|
| 79 | +**Quickstarts** |
| 80 | +- [.NET](./quickstart-portable-durable-task-sdks.md) |
| 81 | +- [Python](./quickstart-portable-durable-task-sdks.md) |
| 82 | +- [Java](./quickstart-portable-durable-task-sdks.md) |
93 | 83 |
|
| 84 | +> [!NOTE] |
| 85 | +> The Durable Task Framework (DTFx) is an open-source .NET orchestration framework similar to the .NET Durable Task SDK and can be used to build apps that run on platforms like the Azure Kubernetes Services. However, we don't recommend new customers to use DTFx as Microsoft doesn't officially support it. |
0 commit comments