Skip to content

Commit 0df43d6

Browse files
authored
docs: README and doc string fixes (#321)
*Issue #, if available:* #246 *Description of changes:* This PR fixes inconsistent and confusing terminology in the documentation for map() and parallel() operations, along with minor capitalization corrections. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Signed-off-by: Michael Gasch <15986659+embano1@users.noreply.github.com>
1 parent aadd7f5 commit 0df43d6

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "aws-durable-execution-sdk-js",
33
"version": "0.0.1",
4-
"description": "Lambda Durable Functions SDK, Testing SDK and fully functional examples",
4+
"description": "Lambda durable functions SDK, Testing SDK and fully functional examples",
55
"workspaces": [
66
"packages/*"
77
],

packages/aws-durable-execution-sdk-js-eslint-plugin/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @aws/durable-execution-sdk-js-eslint-plugin
22

3-
ESLint plugin for AWS Lambda Durable Functions best practices.
3+
ESLint plugin for AWS Lambda durable functions best practices.
44

55
## Installation
66

@@ -145,7 +145,7 @@ The plugin detects these durable operations:
145145

146146
### No Nested Durable Operations
147147

148-
Nesting durable operations with the same context object can cause runtime errors and unexpected behavior in AWS Lambda Durable Functions. This rule helps catch these issues at development time.
148+
Nesting durable operations with the same context object can cause runtime errors and unexpected behavior in AWS Lambda durable functions. This rule helps catch these issues at development time.
149149

150150
### No Closure in Durable Operations
151151

packages/aws-durable-execution-sdk-js-eslint-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@aws/durable-execution-sdk-js-eslint-plugin",
33
"version": "1.0.0",
4-
"description": "ESLint plugin for AWS Lambda Durable Functions best practices",
4+
"description": "ESLint plugin for AWS Lambda durable functions best practices",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"engines": {

packages/aws-durable-execution-sdk-js/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ const result = await context.waitForCallback(
182182

183183
### Map
184184

185-
Process arrays with concurrency control:
185+
Process arrays of items, applying durable operations to each with concurrency control:
186186

187187
```typescript
188188
const results = await context.map(
@@ -208,9 +208,11 @@ console.log(
208208
results.throwIfError(); // Throws if any failures
209209
```
210210

211+
**Note**: `map()` executes durable operations (steps, waits, etc.) within the same Lambda invocation using child contexts for isolation. It does not spawn separate Lambda functions.
212+
211213
### Parallel
212214

213-
Execute multiple functions in parallel:
215+
Execute multiple branches with durable operations in parallel:
214216

215217
```typescript
216218
const results = await context.parallel(
@@ -227,6 +229,8 @@ const results = await context.parallel(
227229
);
228230
```
229231

232+
**Note**: `parallel()` executes durable operations within the same Lambda invocation. Each branch runs in its own child context with isolated state tracking.
233+
230234
### Concurrent Execution
231235

232236
Fine-grained control over concurrent operations:

packages/aws-durable-execution-sdk-js/src/types/durable-context.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ export interface DurableContext<Logger extends DurableLogger = DurableLogger> {
401401
): DurablePromise<T>;
402402

403403
/**
404-
* Maps over an array of items with a function, executing in parallel with optional concurrency control
404+
* Processes an array of items, applying durable operations to each with optional concurrency control
405405
* @param name - Step name for tracking and debugging
406406
* @param items - Array of items to process
407407
* @param mapFunc - Function to apply to each item (context, item, index, array) =\> Promise\<TOutput\>
@@ -427,7 +427,7 @@ export interface DurableContext<Logger extends DurableLogger = DurableLogger> {
427427
): DurablePromise<BatchResult<TOutput>>;
428428

429429
/**
430-
* Maps over an array of items with a function, executing in parallel with optional concurrency control
430+
* Processes an array of items, applying durable operations to each with optional concurrency control
431431
* @param items - Array of items to process
432432
* @param mapFunc - Function to apply to each item (context, item, index, array) =\> Promise\<TOutput\>
433433
* @param config - Optional configuration for concurrency and completion behavior
@@ -446,7 +446,7 @@ export interface DurableContext<Logger extends DurableLogger = DurableLogger> {
446446
): DurablePromise<BatchResult<TOutput>>;
447447

448448
/**
449-
* Executes multiple functions in parallel with optional concurrency control
449+
* Executes multiple branches with durable operations in parallel with optional concurrency control
450450
* @param name - Step name for tracking and debugging
451451
* @param branches - Array of functions or named branches to execute in parallel (all must return same type)
452452
* @param config - Optional configuration for concurrency and completion behavior
@@ -469,7 +469,7 @@ export interface DurableContext<Logger extends DurableLogger = DurableLogger> {
469469
): DurablePromise<BatchResult<T>>;
470470

471471
/**
472-
* Executes multiple functions in parallel with optional concurrency control
472+
* Executes multiple branches with durable operations in parallel with optional concurrency control
473473
* @param branches - Array of functions or named branches to execute in parallel (all must return same type)
474474
* @param config - Optional configuration for concurrency and completion behavior
475475
* @example
@@ -487,7 +487,7 @@ export interface DurableContext<Logger extends DurableLogger = DurableLogger> {
487487
): DurablePromise<BatchResult<T>>;
488488

489489
/**
490-
* Executes multiple functions in parallel with optional concurrency control
490+
* Executes multiple branches with durable operations in parallel with optional concurrency control
491491
*
492492
* @remarks
493493
* This overload provides automatic type inference for heterogeneous return types.
@@ -528,7 +528,7 @@ export interface DurableContext<Logger extends DurableLogger = DurableLogger> {
528528
>;
529529

530530
/**
531-
* Executes multiple functions in parallel with optional concurrency control
531+
* Executes multiple branches with durable operations in parallel with optional concurrency control
532532
*
533533
* @remarks
534534
* This overload provides automatic type inference for heterogeneous return types.

0 commit comments

Comments
 (0)