Skip to content

Commit 87b9481

Browse files
committed
edit/freshness pass on portable sdk quickstart
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 9be451c commit 87b9481

File tree

4 files changed

+45
-32
lines changed

4 files changed

+45
-32
lines changed
Loading
Loading
Loading

articles/azure-functions/durable/durable-task-scheduler/quickstart-portable-durable-task-sdks.md

Lines changed: 45 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: "Quickstart: Set a portable Durable Task SDK in your application to use Azure Functions Durable Task Scheduler (preview)"
3-
description: Learn how to configure an existing app for the Azure Functions Durable Task Scheduler using the portable Durable Task SDKs.
2+
title: "Quickstart: Configure Durable Task SDKs for your app with Azure Functions Durable Task Scheduler (preview)"
3+
description: Learn how to configure an existing app for the Azure Functions Durable Task Scheduler using the Durable Task SDKs.
44
ms.topic: how-to
55
ms.date: 04/23/2025
66
zone_pivot_groups: df-languages
77
---
88

9-
# Quickstart: Set a portable Durable Task SDK in your application to use Azure Functions Durable Task Scheduler (preview)
9+
# Quickstart: Configure Durable Task SDKs for your app with Azure Functions Durable Task Scheduler (preview)
1010

11-
The Durable Task SDKs, or "portable SDKs", provide a lightweight client library for the Durable Task Scheduler. In this quickstart, you learn how to create orchestrations that leverage [the fan-out/fan-in application pattern](../durable/durable-functions-overview.md#fan-in-out) to perform parallel processing.
11+
The Durable Task SDKs provide a lightweight client library for the Durable Task Scheduler. In this quickstart, you learn how to create orchestrations that use [the fan-out/fan-in application pattern](../durable-functions-overview.md#fan-in-out) to perform parallel processing.
1212

1313
::: zone pivot="javascript"
1414

@@ -65,13 +65,13 @@ Before you begin:
6565

6666
## Set up the Durable Task Scheduler emulator
6767

68-
The code looks for a deployed scheduler and task hub. If none are found, the code falls back to the emulator. The emulator simulates a scheduler and taskhub in a Docker container, making it ideal for the local development required in this quickstart.
68+
The application code looks for a deployed scheduler and task hub resource. If none are found, the code falls back to the emulator. The emulator simulates a scheduler and task hub in a Docker container, making it ideal for the local development required in this quickstart.
6969

7070
::: zone-end
7171

7272
::: zone pivot="csharp"
7373

74-
1. From the `Azure-Samples/Durable-Task-Scheduler` root directory, navigate to the Python SDK sample dirctory.
74+
1. From the `Azure-Samples/Durable-Task-Scheduler` root directory, navigate to the .NET SDK sample directory.
7575

7676
```bash
7777
cd samples/portable-sdks/dotnet/FanOutFanIn
@@ -89,7 +89,7 @@ The code looks for a deployed scheduler and task hub. If none are found, the cod
8989
docker run --name dtsemulator -d -p 8080:8080 -p 8082:8082 mcr.microsoft.com/dts/dts-emulator:v0.0.6
9090
```
9191

92-
Since the example code automatically uses the default emulator settings, you don't need to set any environment variables.
92+
Since the example code automatically uses the default emulator settings, you don't need to set any environment variables. The default emulator settings for this quickstart are:
9393
- Endpoint: `http://localhost:8080`
9494
- Task hub: `default`
9595
@@ -98,7 +98,7 @@ Since the example code automatically uses the default emulator settings, you don
9898
9999
::: zone pivot="python"
100100
101-
1. From the `Azure-Samples/Durable-Task-Scheduler` root directory, navigate to the Python SDK sample dirctory.
101+
1. From the `Azure-Samples/Durable-Task-Scheduler` root directory, navigate to the Python SDK sample directory.
102102
103103
```bash
104104
cd samples/portable-sdks/python/fan-out-fan-in
@@ -116,15 +116,15 @@ Since the example code automatically uses the default emulator settings, you don
116116
docker run --name dtsemulator -d -p 8080:8080 -p 8082:8082 mcr.microsoft.com/dts/dts-emulator:v0.0.6
117117
```
118118
119-
Since the example code automatically uses the default emulator settings, you don't need to set any environment variables.
119+
Since the example code automatically uses the default emulator settings, you don't need to set any environment variables. The default emulator settings for this quickstart are:
120120
- Endpoint: `http://localhost:8080`
121121
- Task hub: `default`
122122

123123
::: zone-end
124124

125125
::: zone pivot="java"
126126

127-
1. From the `Azure-Samples/Durable-Task-Scheduler` root directory, navigate to the Java SDK sample dirctory.
127+
1. From the `Azure-Samples/Durable-Task-Scheduler` root directory, navigate to the Java SDK sample directory.
128128

129129
```bash
130130
cd samples/portable-sdks/java/fan-out-fan-in
@@ -142,7 +142,7 @@ Since the example code automatically uses the default emulator settings, you don
142142
docker run --name dtsemulator -d -p 8080:8080 -p 8082:8082 mcr.microsoft.com/dts/dts-emulator:v0.0.6
143143
```
144144

145-
Since the example code automatically uses the default emulator settings, you don't need to set any environment variables.
145+
Since the example code automatically uses the default emulator settings, you don't need to set any environment variables. The default emulator settings for this quickstart are:
146146
- Endpoint: `http://localhost:8080`
147147
- Task hub: `default`
148148
@@ -189,7 +189,7 @@ The worker output shows:
189189
190190
The client output shows:
191191
192-
- Starting the orchestration with a list of work items
192+
- The orchestration starting with a list of work items
193193
- The unique orchestration instance ID
194194
- The final aggregated results, showing each work item and its corresponding result
195195
- Total count of processed items
@@ -218,13 +218,13 @@ Total items processed: 5
218218
::: zone pivot="python"
219219
220220
221-
1. If you're using a Python virtual environment, activate it now.
221+
1. Activate a Python virtual environment.
222222
223223
# [Windows](#tab/windows)
224224
225225
```bash
226226
python -m venv venv
227-
source ./venv/bin/activate
227+
/venv/Scripts/activate
228228
```
229229
230230
# [Linux](#tab/linux)
@@ -250,7 +250,7 @@ Total items processed: 5
250250
251251
**Expected output**
252252
253-
You'll see output indicating that the worker has started and is waiting for work items.
253+
You can see output indicating that the worker started and is waiting for work items.
254254
255255
```
256256
Starting Fan Out/Fan In pattern worker...
@@ -260,12 +260,23 @@ Total items processed: 5
260260
Successfully connected to http://localhost:8080. Waiting for work items...
261261
```
262262
263-
1. In a new terminal (with the virtual environment activated, if applicable), start the virtual environment, and then run the client.
263+
1. In a new terminal, activate the virtual environment and run the client.
264264
265-
```bash
266-
source ./venv/bin/activate
267-
python client.py
268-
```
265+
# [Windows](#tab/windows)
266+
267+
```bash
268+
venv/Scripts/activate
269+
python client.py
270+
```
271+
272+
# [Linux](#tab/linux)
273+
274+
```bash
275+
source ./venv/bin/activate
276+
python client.py
277+
```
278+
279+
---
269280
270281
You can provide the number of work items as an argument. If no argument is provided, the example runs 10 items by default.
271282
@@ -290,12 +301,12 @@ The worker output shows:
290301

291302
The client output shows:
292303

293-
- Starting the orchestration with the specified number of work items.
304+
- The orchestration starting with the specified number of work items.
294305
- The unique orchestration instance ID.
295306
- The final aggregated result, which includes:
296-
- Total number of items processed
297-
- Sum of all results (each item result is the square of its value)
298-
- Average of all results
307+
- The total number of items processed
308+
- The sum of all results (each item result is the square of its value)
309+
- The average of all results
299310

300311
#### Example output
301312

@@ -365,14 +376,14 @@ Output: 60
365376

366377
::: zone pivot="csharp,python,java"
367378

368-
Now that you've run the project locally, you can also [deploy to Azure](#next-steps).
379+
Now that you ran the project locally, you can now learn how to [deploy to Azure hosted in Azure Container Apps](#next-steps).
369380

370381
## View orchestration status and history
371382

372383
You can view the orchestration status and history via the [Durable Task Scheduler dashboard](./durable-task-scheduler-dashboard.md). By default, the dashboard runs on port 8082.
373384

374385
1. Navigate to http://localhost:8082 in your web browser.
375-
1. Click the **default** task hub. The orchestration instance you just created is in the list.
386+
1. Click the **default** task hub. The orchestration instance you created is in the list.
376387
1. Click the orchestration instance ID to view the execution details, which include:
377388
- The parallel execution of multiple activity tasks
378389
- The fan-in aggregation step
@@ -383,19 +394,19 @@ You can view the orchestration status and history via the [Durable Task Schedule
383394

384395
::: zone pivot="csharp"
385396

386-
:::image type="content" source="media/quickstart-portable-durable-task-sdks/review-dashboard-dotnet.png" alt-text="Screenshot showing the orchestartion instance's details for the .NET sample.":::
397+
:::image type="content" source="media/quickstart-portable-durable-task-sdks/review-dashboard-dotnet.png" alt-text="Screenshot showing the orchestration instance's details for the .NET sample.":::
387398

388399
::: zone-end
389400

390401
::: zone pivot="python"
391402

392-
:::image type="content" source="media/quickstart-portable-durable-task-sdks/review-dashboard-python.png" alt-text="Screenshot showing the orchestartion instance's details for the Python sample.":::
403+
:::image type="content" source="media/quickstart-portable-durable-task-sdks/review-dashboard-python.png" alt-text="Screenshot showing the orchestration instance's details for the Python sample.":::
393404

394405
::: zone-end
395406

396407
::: zone pivot="java"
397408

398-
:::image type="content" source="media/quickstart-portable-durable-task-sdks/review-dashboard-java.png" alt-text="Screenshot showing the orchestartion instance's details for the Java sample.":::
409+
:::image type="content" source="media/quickstart-portable-durable-task-sdks/review-dashboard-java.png" alt-text="Screenshot showing the orchestration instance's details for the Java sample.":::
399410

400411
::: zone-end
401412

@@ -409,7 +420,7 @@ You can view the orchestration status and history via the [Durable Task Schedule
409420

410421
### The worker project
411422

412-
To demonstrate [the fan-out/fan-in pattern](../durable/durable-functions-overview.md#fan-in-out), the worker project orchestration creates parallel activity tasks and waits for all to complete. The orchestrator:
423+
To demonstrate [the fan-out/fan-in pattern](../durable-functions-overview.md#fan-in-out), the worker project orchestration creates parallel activity tasks and waits for all to complete. The orchestrator:
413424

414425
1. Takes a list of work items as input.
415426
1. Fans out by creating a separate task for each work item using `ProcessWorkItemActivity`.
@@ -524,7 +535,7 @@ var instance = await client.WaitForInstanceCompletionAsync(
524535

525536
### `worker.py`
526537

527-
To demonstrate [the fan-out/fan-in pattern](../durable/durable-functions-overview.md#fan-in-out), the worker project orchestration creates parallel activity tasks and waits for all to complete. The orchestrator:
538+
To demonstrate [the fan-out/fan-in pattern](../durable-functions-overview.md#fan-in-out), the worker project orchestration creates parallel activity tasks and waits for all to complete. The orchestrator:
528539

529540
1. Receives a list of work items as input.
530541
1. It "fans out" by creating parallel tasks for each work item (calling `process_work_item` for each one).
@@ -592,7 +603,7 @@ result = client.wait_for_orchestration_completion(
592603

593604
::: zone pivot="java"
594605

595-
To demonstrate [the fan-out/fan-in pattern](../durable/durable-functions-overview.md#fan-in-out), the `FanOutFanInPattern` project orchestration creates parallel activity tasks and waits for all to complete. The orchestrator:
606+
To demonstrate [the fan-out/fan-in pattern](../durable-functions-overview.md#fan-in-out), the `FanOutFanInPattern` project orchestration creates parallel activity tasks and waits for all to complete. The orchestrator:
596607

597608
1. Takes a list of work items as input.
598609
1. Fans out by creating a separate task for each work item using ``.
@@ -688,5 +699,7 @@ logger.info("Output: {}", completedInstance.readOutputAs(int.class));
688699

689700
## Next steps
690701

702+
Now that you've run the sample locally using the Durable Task Scheduler emulator, try creating a scheduler and task hub resource and deploying to Azure Container Apps.
703+
691704
> [!div class="nextstepaction"]
692705
> [Deploy to Azure](./develop-with-durable-task-scheduler.md)

0 commit comments

Comments
 (0)