Azure / Azure/azure-functions-durable-js

Provide a way to register orchestrations/entities without requiring a durable client starter

Open
#419 0 comments 1 reaction 0 assignees View on GitHub
Enhancement post-GA programming model 🚀 v3
Dominant language
TypeScript
Stars
142
Forks
66
Avg merge
3d 19h
Merged PRs (30d)
4

Description

In any durable orchestration app, the three most fundamental components are:

1. An activity function
2. An orchestrator function
3. A client function

Similarly, the most fundamental component of an entity app are:

1. An entity function
2. A client function

Most of the business logic resides in the activities, orchestrations, and entity functions. Most of the time, the client function is a simple function that starts the orchestration/entity and returns HTTP endpoints to query the orchestration or perform management operations. Most of the time, it would simply follow the simple HTTP example provided in the samples:

```TS
const httpStart: HttpHandler = async (request: HttpRequest, context: InvocationContext) => {
const client = df.getClient(context, clientInput);
const instanceId = await client.startNew(request.params.orchestratorName, undefined, request.text());
context.log(`Started orchestration with ID = '${instanceId}'.`);
return client.createCheckStatusResponse(request, instanceId);
};

app.http('durableOrchestrationStart1', {
route: 'orchestrators/{orchestratorName}',
extraInputs: [clientInput],
handler: httpStart,
});
```

This issue is to explore the feasibility and cost-effectiveness of providing a convenience method to get rid of the client function boilerplate in the most mainstream use-cases. This could be done by, for example, providing an API that takes in an orchestration, and automatically creates and registers an HTTP client function for the user.

Contributor guide

Open the contributing guide

Research direction

Start with the TypeScript HTTP sample using df.getClient, client.startNew, createCheckStatusResponse, and app.http. Evaluate the feasibility and cost-effectiveness of registering orchestration or entity HTTP clients without the boilerplate. Done means a documented conclusion and agreed scope for the mainstream use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.