Slide 1

Slide 1 text

DAPR FOR JAVA DEVELOPER! + https://www.diagrid.io/blog/dapr-for-java-developers

Slide 2

Slide 2 text

@salaboy Software Engineer at Diagrid 45% Discount Code: mtsoujava45

Slide 3

Slide 3 text

@mcruzdev1 Software Engineer at MercadoLibre ● Contributing with quarkiverse/quarkus-openapi-ge nerator Quarkus extension ● Contributing with quarkiverse/quarkus-dapr Quarkus extension ● Blog in matheuscruz.dev

Slide 4

Slide 4 text

Agenda - Introduction - Development challenges - Kubernetes & Containers - What are our applications doing 80% of the time? - What is Dapr? Why should I care? - Demo

Slide 5

Slide 5 text

The challenge to focus on what matters The developer has always been concerned about some things in his day-to-day life: 1. Environment runtime 2. Application configuration 3. Infrastructure 4. Libraries and dependencies 5. And more, and more non functional requirements All this to solve business problems!

Slide 6

Slide 6 text

Before ... - Security - Transaction management - Connection pools - Service discovery - Messaging - Load balancing - Standardization evicting vendor lock-in - Etc …

Slide 7

Slide 7 text

But … - Shared CPU, memory and File System - My application depends on the application server's libraries - ClassLoader issues - Difficulty in having a microservices architecture - Bad developer experience, some configurations

Slide 8

Slide 8 text

No need for an application server - Conventions over configuration - Simplicity - One JVM per application - A more favorable environment for microservices - A better development and runtime environment

Slide 9

Slide 9 text

But … I still need to worry about libraries/dependencies and some core services that were once provided by application servers.

Slide 10

Slide 10 text

After

Slide 11

Slide 11 text

After (Java)

Slide 12

Slide 12 text

But what are our applications doing 80% of the time? - How many of your applications are reading or storing data? - How many of your applications are consuming and emitting events? - How many of your applications are calling other services?

Slide 13

Slide 13 text

The challenge to focus on what matters The developer has always been concerned about some things in his day-to-day life: 1. Environment runtime 2. Application configuration 3. Infrastructure 4. Libraries and dependencies All this to solve business problems!

Slide 14

Slide 14 text

The challenge now is abstract infra and libs

Slide 15

Slide 15 text

https://dapr.io

Slide 16

Slide 16 text

What is Dapr? And why you should care? - Stands for: Distributed Application Runtime - Mostly, but not only, a Kubernetes Extension - A CNCF Project, this is important because it means that is supported by multiple companies and community users - Dapr gives developers application-level APIs to interact with other services and infrastructure

Slide 17

Slide 17 text

With Dapr

Slide 18

Slide 18 text

Dapr installation Demo - Let’s install Dapr in a Kubernetes Cluster - Let’s deploy a simple application to show Dapr in action

Slide 19

Slide 19 text

Diagrid’s Conductor

Slide 20

Slide 20 text

Ok, but.. This is way too much for developers! - To get this working we need: - A Kubernetes Cluster - Install Dapr - Configure infrastructure to be accessible using Components - Write a lot of YAML

Slide 21

Slide 21 text

Dapr for Spring Boot and Quarkus - Luckily we have integrations with Spring Boot and Quarkus - Java Developers can use the Dapr APIs without the need of a Kubernetes Cluster or even installing Dapr

Slide 22

Slide 22 text

Spring Boot Dependencies and Configs +

Slide 23

Slide 23 text

Quarkus Dependencies and Configs

Slide 24

Slide 24 text

Takeaways - Dapr decouples the application code from infrastructure - While promoting best practices and stable APIs - You can build complex development experiences using tools like Testcontainers

Slide 25

Slide 25 text

Questions?