Skip to content

Commit 0283c87

Browse files
committed
PR feedback
1 parent 785b151 commit 0283c87

8 files changed

+14
-34
lines changed

articles/azure-functions/durable/durable-functions-bindings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ module.exports = df.entity(function(context) {
500500
```
501501

502502
> [!NOTE]
503-
> Durable Entities are available in JavaScript starting with version **1.3.0** of the `durable-functions` npm package.
503+
> Durable entities are available in JavaScript starting with version **1.3.0** of the `durable-functions` npm package.
504504
505505
## Entity client
506506

@@ -633,7 +633,7 @@ module.exports = async function (context) {
633633
```
634634

635635
> [!NOTE]
636-
> Durable Entities are available in JavaScript starting with version **1.3.0** of the `durable-functions` npm package.
636+
> Durable entities are available in JavaScript starting with version **1.3.0** of the `durable-functions` npm package.
637637
638638
<a name="host-json"></a>
639639
## host.json settings

articles/azure-functions/durable/durable-functions-create-first-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The following steps use a template to create the durable function code in your p
7272
![Select durable template](./media/durable-functions-create-first-csharp/functions-vs-select-template.png)
7373

7474
> [!NOTE]
75-
> This template currently creates a Durable Function using an older 1.x version of the extension. See the [Durable Functions Versions](durable-functions-versions.md) article for information about how to upgrade to the newer 2.x versions of Durable Functions.
75+
> This template currently creates a durable function using an older 1.x version of the extension. See the [Durable Functions Versions](durable-functions-versions.md) article for information about how to upgrade to the newer 2.x versions of Durable Functions.
7676
7777
A new durable function is added to the app. Open the new .cs file to view the contents. This durable function is a simple function chaining example with the following methods:
7878

articles/azure-functions/durable/durable-functions-entities.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ For more information on the class-based syntax and how to use it, see [Defining
108108

109109
### Example: JavaScript entity
110110

111-
Durable Entities are available in JavaScript starting with version **1.3.0** of the `durable-functions` npm package. The following code is the *Counter* entity implemented as a durable function written in JavaScript.
111+
Durable entities are available in JavaScript starting with version **1.3.0** of the `durable-functions` npm package. The following code is the *Counter* entity implemented as a durable function written in JavaScript.
112112

113113
**function.json**
114114
```json
@@ -167,7 +167,6 @@ Below we show some examples that illustrate these various ways of accessing enti
167167

168168
To access entities from an ordinary Azure Function - also known as *client function* - use the [entity client output binding](durable-functions-bindings.md#entity-client). The following example shows a queue-triggered function *signaling* an entity using this binding.
169169

170-
**C#**
171170
```csharp
172171
[FunctionName("AddFromQueue")]
173172
public static Task Run(
@@ -181,7 +180,6 @@ public static Task Run(
181180
}
182181
```
183182

184-
**JavaScript**
185183
```javascript
186184
const df = require("durable-functions");
187185

@@ -198,7 +196,6 @@ The term *signal* means that the entity API invocation is one-way and asynchrono
198196

199197
Client functions can also query the state of an entity, as shown in the following example:
200198

201-
**C#**
202199
```csharp
203200
[FunctionName("QueryCounter")]
204201
public static async Task<HttpResponseMessage> Run(
@@ -211,7 +208,6 @@ public static async Task<HttpResponseMessage> Run(
211208
}
212209
```
213210

214-
**JavaScript**
215211
```javascript
216212
const df = require("durable-functions");
217213

@@ -228,7 +224,6 @@ Entity state queries are sent to the Durable tracking store and return the entit
228224

229225
Orchestrator functions can access entities using APIs on the [orchestration trigger binding](durable-functions-bindings.md#orchestration-trigger). The following example code shows an orchestrator function *calling* and *signaling* a *Counter* entity.
230226

231-
**C#**
232227
```csharp
233228
[FunctionName("CounterOrchestration")]
234229
public static async Task Run(
@@ -246,7 +241,6 @@ public static async Task Run(
246241
}
247242
```
248243

249-
**JavaScript**
250244
```javascript
251245
const df = require("durable-functions");
252246

@@ -272,7 +266,6 @@ Only orchestrations are capable of calling entities and getting a response, whic
272266
An entity function can send signals to other entities (or even itself!) while it executes an operation.
273267
For example, we can modify the counter entity example above so it sends a "milestone-reached" signal to some monitor entity when the counter reaches the value 100:
274268

275-
**C#**
276269
```csharp
277270
case "add":
278271
var currentValue = ctx.GetState<int>();
@@ -286,7 +279,6 @@ For example, we can modify the counter entity example above so it sends a "miles
286279
break;
287280
```
288281

289-
**JavaScript**
290282
```javascript
291283
case "add":
292284
const amount = context.df.getInput();

articles/azure-functions/durable/durable-functions-http-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ The responses for this API do not contain any content.
612612
Sends a one-way operation message to a [Durable Entity](durable-functions-types-features-overview.md#entity-functions). If the entity doesn't exist, it will be created automatically.
613613

614614
> [!NOTE]
615-
> Durable Entities are available starting in Durable Functions 2.0.
615+
> Durable entities are available starting in Durable Functions 2.0.
616616
617617
### Request
618618

articles/azure-functions/durable/durable-functions-instance-management.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ To remove all the data associated with an orchestration, you can purge the insta
595595

596596
This method has two overloads. The first overload purges history by the ID of the orchestration instance:
597597

598-
**C#**
599598
```csharp
600599
[FunctionName("PurgeInstanceHistory")]
601600
public static Task Run(
@@ -606,7 +605,6 @@ public static Task Run(
606605
}
607606
```
608607

609-
**JavaScript**
610608
```javascript
611609
const df = require("durable-functions");
612610

@@ -618,7 +616,6 @@ module.exports = async function(context, instanceId) {
618616

619617
The next example shows a timer-triggered function that purges the history for all orchestration instances that completed after the specified time interval. In this case, it removes data for all instances completed 30 or more days ago. It's scheduled to run once per day, at 12 AM:
620618

621-
**C#**
622619
```csharp
623620
[FunctionName("PurgeInstanceHistory")]
624621
public static Task Run(

articles/azure-functions/durable/durable-functions-orchestrations.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ Orchestrator functions aren't permitted to do I/O, as described in [orchestrator
214214

215215
To simplify this common pattern, orchestrator functions can use the `CallHttpAsync` method in .NET to invoke HTTP APIs directly. In addition to supporting basic request/response patterns, `CallHttpAsync` supports automatic handling of common async HTTP 202 polling patterns, and also supports authentication with external services using [Managed Identities](../../active-directory/managed-identities-azure-resources/overview.md).
216216

217-
**C#**
218217
```csharp
219218
[FunctionName("CheckSiteAvailable")]
220219
public static async Task CheckSiteAvailable(
@@ -233,7 +232,6 @@ public static async Task CheckSiteAvailable(
233232
}
234233
```
235234

236-
**JavaScript**
237235
```javascript
238236
const df = require("durable-functions");
239237

articles/azure-functions/durable/durable-functions-overview.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ To create the durable timer, call `context.CreateTimer` (.NET) or `context.df.cr
329329

330330
An external client can deliver the event notification to a waiting orchestrator function by using either the [built-in HTTP APIs](durable-functions-http-api.md#raise-event) or by using the `RaiseEventAsync` (.NET) or `raiseEvent` (JavaScript) method from another function:
331331

332-
**C#**
333332
```csharp
334333
[FunctionName("RaiseEventToOrchestration")]
335334
public static async Task Run(
@@ -341,7 +340,6 @@ public static async Task Run(
341340
}
342341
```
343342

344-
**JavaScript**
345343
```javascript
346344
const df = require("durable-functions");
347345

@@ -352,7 +350,6 @@ module.exports = async function (context) {
352350
};
353351
```
354352

355-
**cURL**
356353
```bash
357354
curl -d "true" http://localhost:7071/runtime/webhooks/durabletask/instances/{instanceId}/raiseEvent/ApprovalEvent -H "Content-Type: application/json"
358355
```
@@ -367,7 +364,6 @@ The tricky thing about trying to implement this pattern with normal, stateless f
367364

368365
You can use [Durable entities](durable-functions-entities.md) to easily implement this pattern as a single function.
369366

370-
**C#**
371367
```csharp
372368
[FunctionName("Counter")]
373369
public static void Counter([EntityTrigger] IDurableEntityContext ctx)
@@ -389,7 +385,6 @@ public static void Counter([EntityTrigger] IDurableEntityContext ctx)
389385
}
390386
```
391387

392-
**JavaScript**
393388
```javascript
394389
const df = require("durable-functions");
395390

@@ -410,7 +405,7 @@ module.exports = df.entity(function(context) {
410405
});
411406
```
412407

413-
Durable Entities can also be modeled as classes in .NET. This model can be useful if the list of operations is fixed and becomes large. The following example is an equivalent implementation of the `Counter` entity using .NET classes and methods.
408+
Durable entities can also be modeled as classes in .NET. This model can be useful if the list of operations is fixed and becomes large. The following example is an equivalent implementation of the `Counter` entity using .NET classes and methods.
414409

415410
```csharp
416411
public class Counter
@@ -432,7 +427,6 @@ public class Counter
432427

433428
Clients can enqueue *operations* for (also known as "signaling") an entity function using the [entity client binding](durable-functions-bindings.md#entity-client).
434429

435-
**C#**
436430
```csharp
437431
[FunctionName("EventHubTriggerCSharp")]
438432
public static async Task Run(
@@ -452,7 +446,6 @@ public static async Task Run(
452446
> Dynamically generated proxies are also available in .NET for signaling entities in a type-safe way. And in addition to signaling, clients can also query for the state of an entity function using [type-safe methods](durable-functions-bindings.md#entity-client-usage) on the orchestration client binding.
453447
454448

455-
**JavaScript**
456449
```javascript
457450
const df = require("durable-functions");
458451

articles/azure-functions/durable/durable-functions-perf-and-scale.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Activity, orchestrator, and entity function concurrency limits can be configured
178178
In the previous example, a maximum of 10 orchestrator or entity functions and 10 activity functions can run on a single VM concurrently. If not specified, the number of concurrent activity and orchestrator or entity function executions is capped at 10X the number of cores on the VM.
179179

180180
> [!NOTE]
181-
> These settings are useful to help manage memory and CPU usage on a single VM. However, when scaled out across multiple VMs, each VM will have its own set of limits. These settings cannot be used to control concurrency at a global level.
181+
> These settings are useful to help manage memory and CPU usage on a single VM. However, when scaled out across multiple VMs, each VM has its own set of limits. These settings can't be used to control concurrency at a global level.
182182
183183
## Extended sessions
184184

@@ -210,10 +210,10 @@ You can enable extended sessions by setting `durableTask/extendedSessionsEnabled
210210

211211
There are two potential downsides of this setting to be aware of:
212212

213-
1. There will be an overall increase in function app memory usage.
213+
1. There's an overall increase in function app memory usage.
214214
2. There can be an overall decrease in throughput if there are many concurrent, short-lived orchestrator or entity function executions.
215215

216-
As an example, if `durableTask/extendedSessionIdleTimeoutInSeconds` is set to 30 seconds, then a short-lived orchestrator or entity function episode that executes in less than 1 second will still occupy memory for 30 seconds. It will also count against the `durableTask/maxConcurrentOrchestratorFunctions` quota mentioned previously, potentially preventing other orchestrator or entity functions from running.
216+
As an example, if `durableTask/extendedSessionIdleTimeoutInSeconds` is set to 30 seconds, then a short-lived orchestrator or entity function episode that executes in less than 1 second still occupies memory for 30 seconds. It also counts against the `durableTask/maxConcurrentOrchestratorFunctions` quota mentioned previously, potentially preventing other orchestrator or entity functions from running.
217217

218218
The specific effects of extended sessions on orchestrator and entity functions are described in the next sections.
219219

@@ -223,10 +223,10 @@ As mentioned previously, orchestrator functions are replayed using the contents
223223

224224
The performance improvement of extended sessions is most often observed in the following situations:
225225

226-
* When there are a limited number of orchestration instances running concurrently
227-
* When orchestrations have large number of sequential actions (e.g. hundreds of activity function calls) that complete quickly
228-
* When orchestrations fan-out and fan-in a large number of actions that complete around the same time
229-
* When orchestrator functions need to process large messages or do any CPU-intensive data processing
226+
* When there are a limited number of orchestration instances running concurrently.
227+
* When orchestrations have large number of sequential actions (e.g. hundreds of activity function calls) that complete quickly.
228+
* When orchestrations fan-out and fan-in a large number of actions that complete around the same time.
229+
* When orchestrator functions need to process large messages or do any CPU-intensive data processing.
230230

231231
In all other situations, there is typically no observable performance improvement for orchestrator functions.
232232

@@ -235,7 +235,7 @@ In all other situations, there is typically no observable performance improvemen
235235
236236
### Entity function unloading
237237

238-
Entity functions will process up to 20 operations in a single batch. As soon as an entity finishes processing a batch of operations, it will persist its state and unload from memory. You can delay the unloading of entities from memory using the extended sessions setting. Entities will continue to persist their state changes as before, but will remain in memory for the configured period of time to reduce the number of loads from Azure Storage. This reduction of loads from Azure Storage can improve the overall throughput of frequently accessed entities.
238+
Entity functions process up to 20 operations in a single batch. As soon as an entity finishes processing a batch of operations, it persists its state and unloads from memory. You can delay the unloading of entities from memory using the extended sessions setting. Entities continue to persist their state changes as before, but remain in memory for the configured period of time to reduce the number of loads from Azure Storage. This reduction of loads from Azure Storage can improve the overall throughput of frequently accessed entities.
239239

240240
## Performance targets
241241

0 commit comments

Comments
 (0)