Slide 1

Slide 1 text

Azure Durable Functions vs Dapr Workflows, the fight begins 2023

Slide 2

Slide 2 text

#netcoreconf Sponsors

Slide 3

Slide 3 text

#netcoreconf @sparraguerra @saintwukong Nosotros

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Agenda #netcoreconf 01 Azure Durable Functions 02 DEMO 03 Dapr Workflows 04 DEMO Agenda 05 Resumen

Slide 6

Slide 6 text

01 https://dapr.io/ AZURE DURABLE FUNCTIONS #netcoreconf

Slide 7

Slide 7 text

#netcoreconf Introduction • Durable Functions is an extension of Azure Functions that lets you write stateful functions in a serverless compute environment. The extension lets you define stateful workflows by writing orchestrator functions and stateful entities by writing entity functions using the Azure Functions programming model. Behind the scenes, the extension manages state, checkpoints, and restarts for you, allowing you to focus on your business logic.

Slide 8

Slide 8 text

#netcoreconf Supported languages

Slide 9

Slide 9 text

#netcoreconf Patterns Chain Fan out fan in Async http Async http Human interaction Aggregator

Slide 10

Slide 10 text

#netcoreconf Underlaying technology • Behind the scenes, the Durable Functions extension is built on top of the Durable Task Framework, an open-source library on GitHub that's used to build workflows in code. Like Azure Functions is the serverless evolution of Azure WebJobs, Durable Functions is the serverless evolution of the Durable Task Framework. Microsoft and other organizations use the Durable Task Framework extensively to automate mission- critical processes. It's a natural fit for the serverless Azure Functions environment.

Slide 11

Slide 11 text

#netcoreconf Orchestrator function code constraints • Using deterministic APIs • Dates and times • GUIDs and UUIDs • Random numbers • Bindings • Static variables • Environment variables • Network and HTTP • Thread-blocking APIs • Async APIs • Async JavaScript functions • Python coroutines • .NET threading APIs Code Versioning • Take care of unfinished orchestrations

Slide 12

Slide 12 text

#netcoreconf Costs • Consumption plan • Premium plan

Slide 13

Slide 13 text

#netcoreconf Function types • Client functions • Orchestrator functions • Activity functions • Entity functions

Slide 14

Slide 14 text

#netcoreconf Orchestrations and Suborchestrations

Slide 15

Slide 15 text

02 #netcoreconf

Slide 16

Slide 16 text

03 https://dapr.io/ DAPR (Distributed Application Runtime) #netcoreconf

Slide 17

Slide 17 text

Distributed Application Runtime dapr.io

Slide 18

Slide 18 text

#netcoreconf Build connected distributed applications faster • APIs for building microservices easily • Resiliency built-in • Message and event broker integrations • Service discovery • mTLS encryption • Secrets • ..thanks to sidecar process

Slide 19

Slide 19 text

#netcoreconf APIs for solving microservices challenges

Slide 20

Slide 20 text

#netcoreconf Sidecar model My App Dapr API POST http://localhost:3500/v1.0/invoke/cart/method/neworder GET http://localhost:3500/v1.0/state/inventory/item67 POST http://localhost:3500/v1.0/publish/shipping/orders GET http://localhost:3500/v1.0/secrets/keyvault/password POST http://localhost:3500/v1.0-beta1/workflows/dapr/businessprocess/1234/start HTTP/gRPC Application Dapr sidecar

Slide 21

Slide 21 text

#netcoreconf HTTP API gRPC API Any cloud or edge infrastructure Application code Microservices written in Any code or framework… Hosting infrastructure On-Premises Azure Arc

Slide 22

Slide 22 text

#netcoreconf Dapr components

Slide 23

Slide 23 text

#netcoreconf Dapr Workflows

Slide 24

Slide 24 text

#netcoreconf Dapr Workflows Features • Workflows • Functions you write that define a series of tasks to be executed in a particular order. • Kinds of tasks: • Activities for executing custom logic • Durable timers for putting the workflow to sleep for arbitrary lengths of time. • Child workflows for breaking larger workflows into smaller pieces. • External event waiters for blocking workflows until they receive external event signals. • Workflow identity. Each workflow you define has a type name, and individual executions of a workflow require a unique instance ID. Only one workflow instance with a given ID can exist at any given time. • Workflow replay. Dapr Workflows maintain their execution state by using a technique known as event sourcing.

Slide 25

Slide 25 text

#netcoreconf Dapr Workflows Features • Workflows • Infinite loops and eternal workflows. Ensure your workflow doesn’t: • Use infinite loops in its implementation • Schedule thousands of tasks.

Slide 26

Slide 26 text

#netcoreconf Dapr Workflows Patterns Task Chaining

Slide 27

Slide 27 text

#netcoreconf Dapr Workflows Patterns Fan-out/fan-in

Slide 28

Slide 28 text

#netcoreconf Dapr Workflows Patterns Async HTTP APIs

Slide 29

Slide 29 text

#netcoreconf Dapr Workflows Patterns Monitor

Slide 30

Slide 30 text

#netcoreconf Dapr Workflows Patterns External system interaction

Slide 31

Slide 31 text

04 DEMO TIME! #netcoreconf

Slide 32

Slide 32 text

#netcoreconf Conclusiones

Slide 33

Slide 33 text

#netcoreconf Sponsors

Slide 34

Slide 34 text

More information: [email protected] @Netcoreconf Visit on: netcoreconf.com