Durable functions doc updates and first changefile for preview#2392
Conversation
3de245a to
8dbdaa5
Compare
b946cba to
dfa8d1e
Compare
|
|
||
| ### Your first durable function (managed runtime) | ||
|
|
||
| A complete order-processing workflow with two steps and a wait, deployed as a class library on a managed .NET runtime such as `dotnet8`. Register the serializer once with the `LambdaSerializer` assembly attribute and configure your handler as `MyAssembly::OrderProcessor.OrderProcessor::Handler`. `DurableFunction.WrapAsync` resolves the serializer from `ILambdaContext.Serializer`, which the managed runtime populates from the assembly attribute. |
There was a problem hiding this comment.
Use dotnet10 since it is the more current runtime
| @@ -0,0 +1,129 @@ | |||
| # AWS Lambda Durable Execution SDK for .NET | |||
|
|
|||
| > **Preview.** `Amazon.Lambda.DurableExecution` is in active development (0.x). Public APIs may change before 1.0. | |||
There was a problem hiding this comment.
Since we don't have the deployment of new Amazon.Lambda.RuntimeSupport with support for accessing the serializer you should call out only executable programming model is supported for now.
I would suggest making all of the examples be executable mode as well and later we can revise the README once the managed runtime is updated.
|
|
||
| ### Executable assembly variant (custom runtime) | ||
|
|
||
| If you target a custom runtime (`provided.al2023`) and deploy your function as an executable assembly, host it with `LambdaBootstrap` and pass the serializer in code instead of via an assembly attribute: |
There was a problem hiding this comment.
People use executable mode directly on the dotnet10 runtime. I would avoid talking about provided.al2023 and just discuss how the executable programming model works at a high level. The README for DurableExecution should be where you explain about custom runtimes or in depth executable programming model
| dotnet add package Amazon.Lambda.DurableExecution | ||
| ``` | ||
|
|
||
| ### Your first durable function (managed runtime) |
There was a problem hiding this comment.
Do you think it is worth expanding to give a high level about what you need to do to make callbacks work?
There was a problem hiding this comment.
There was a problem hiding this comment.
or do you mean how to invoke the callback from somewhere else
|
|
||
| ### Your first durable function | ||
|
|
||
| > **Programming model:** the preview only supports the **executable programming model** — your function is an executable assembly that hosts its own bootstrap loop and passes the serializer to the runtime in code. Class-library handlers on the managed runtime will be supported once `Amazon.Lambda.RuntimeSupport` ships the changes that let `DurableFunction.WrapAsync` resolve the serializer from `ILambdaContext.Serializer`. This README will be updated then. |
There was a problem hiding this comment.
Since you can argue we will have already shipped the changes for Amazon.Lambda.RuntimeSupport to NuGet for executable programming model I suggest changing this to:
Class-library handlers on the managed runtime will be supported once Amazon.Lambda.RuntimeSupport ships the changes that let DurableFunction.WrapAsync resolve the serializer from ILambdaContext.Serializer
to
Class-library handlers on the managed runtime will be supported once the changes made to Amazon.Lambda.RuntimeSupport to support durable functions has been deployed to the managed runtime.
Updated README to clarify programming model support and changes.
#2216
used java sdk docs as an example https://github.com/aws/aws-durable-execution-sdk-java