Slide 1

Slide 1 text

Mauricio Salatino Diagrid’s Webinar June 25th, 2024 Dapr and Spring Boot Solving the Challenges of Distributed Systems @salaboy

Slide 2

Slide 2 text

diagrid.io • Software Engineer and CNCF Ambassador. • Author of “Platform Engineering on Kubernetes” (Manning). • GitHub.com/salaboy/platforms-on-k8s • @DaprDev @KnativeProject @KeptnProject @Crossplane_io Mauricio Salatino salaboy.com @salaboy

Slide 3

Slide 3 text

diagrid.io • 45% Discount Code
 salatino2diagrid Mauricio Salatino

Slide 4

Slide 4 text

Challenges That you will phase Distributed Systems are complex Developer Productivity Su ff ers writing YAML Raise teams expertise to a whole new level @salaboy https://www.diagrid.io/blog/dapr-for-spring-boot

Slide 5

Slide 5 text

Let’s Start with a Demo Based on https://github.com/dockersamples/example-voting-app @salaboy

Slide 6

Slide 6 text

Demo @salaboy https://diagrid.ws/vote-webinar

Slide 7

Slide 7 text

Where is the application deployed? What is a Cloud-Native Runtime? @salaboy @vitalethomas

Slide 8

Slide 8 text

Where is the application deployed? Is it Kubernetes? @salaboy @vitalethomas ?

Slide 9

Slide 9 text

Where is the application deployed? Or Cloud Services? @salaboy @vitalethomas ? ?

Slide 10

Slide 10 text

Most likely you are using containers @salaboy

Slide 11

Slide 11 text

Containers save time @salaboy

Slide 12

Slide 12 text

Shoutout to Testcontainers @salaboy

Slide 13

Slide 13 text

If you look deeper @salaboy

Slide 14

Slide 14 text

In a cloud native runtime @salaboy @vitalethomas

Slide 15

Slide 15 text

In a cloud native runtime @salaboy

Slide 16

Slide 16 text

To make it more complicated… @salaboy

Slide 17

Slide 17 text

Dapr, can we delegate more responsibility to our cloud native runtime? @salaboy

Slide 18

Slide 18 text

Dapr - Distributed Application Runtime @salaboy

Slide 19

Slide 19 text

Dapr - Building Blocks @salaboy

Slide 20

Slide 20 text

How does it works? @salaboy @vitalethomas

Slide 21

Slide 21 text

How does it works? @salaboy

Slide 22

Slide 22 text

How does it works? @salaboy

Slide 23

Slide 23 text

How does it works? @salaboy @vitalethomas

Slide 24

Slide 24 text

But if you can do that.. you can also do this @salaboy

Slide 25

Slide 25 text

But if you can do that.. you can also do this @salaboy

Slide 26

Slide 26 text

How does it works? @salaboy

Slide 27

Slide 27 text

How does it works? @salaboy @vitalethomas

Slide 28

Slide 28 text

How does it works? @salaboy

Slide 29

Slide 29 text

What about local development? I don’t want to deploy to Kubernetes… @salaboy

Slide 30

Slide 30 text

Without Kubernetes (with Testcontainers) @salaboy

Slide 31

Slide 31 text

Let’s do some live coding… @salaboy

Slide 32

Slide 32 text

This is good … But can we make it more Bootiful? @salaboy

Slide 33

Slide 33 text

How do we do this in Spring? Spring Data -> https://github.com/spring-projects/spring-data-keyvalue @salaboy

Slide 34

Slide 34 text

How do we do this in Spring? Spring Data -> https://github.com/spring-projects/spring-data-keyvalue @salaboy

Slide 35

Slide 35 text

How do we do this in Spring? Spring Kafka -> https://github.com/spring-projects/spring-kafka @salaboy

Slide 36

Slide 36 text

How do we do this in Spring? Spring Pulsar -> https://github.com/spring-projects/spring-pulsar @salaboy

Slide 37

Slide 37 text

How do we do this in Spring? Spring AMQP (RabbitMQ) @salaboy

Slide 38

Slide 38 text

To provide a better integration we did the same for Dapr @salaboy

Slide 39

Slide 39 text

But there is more @salaboy

Slide 40

Slide 40 text

Outbox Pattern https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-outbox/ * Produce an event every time we store some data * Do it transactionally * If for some reason storing data fails, 
 the event shouldn’t be produced @salaboy

Slide 41

Slide 41 text

Durable Exections / Workflows https://docs.dapr.io/developing-applications/building-blocks/work fl ow/ * Sometimes we need more than just calling X services in a sequence * We want to make sure that: * If things fail we have a backup plan like: custom retries, circuit breakers and domain-speci fi c logic hooks * Support for long running and stateful interactions, for example waiting for a human input that might be on holidays * That we have compensation logic to undo operations @salaboy

Slide 42

Slide 42 text

Let’s raffle some books! @salaboy

Slide 43

Slide 43 text

Deployment @salaboy

Slide 44

Slide 44 text

What about Deployments? The platform team takes care of wiring up the available infrastructure @salaboy

Slide 45

Slide 45 text

Diagrid’s Conductor https://diagrid.ws/get-conductor

Slide 46

Slide 46 text

Thanks @salaboy @salaboy https://www.diagrid.io/blog/dapr-for-spring-boot