Recently, the Dapr community released Dapr into the wild, aiming to simplify cloud-native application development. Dapr lets you abstract your distributed architecture from the underlying infrastructure that powers it. Forget about Kafka, RabbitMQ or any cloud-specific product: you’re talking with a pub/sub broker. Let Dapr take care of how it works. Want to switch later? Sure, no problem!
So, is Dapr the new J2EE application server? How could it change the way we develop distributed solutions? Join me in this talk to find out if we’re looking at a dinosaur in a fancy suit, or a developer’s dream.
5. ...if only there were a
standardised API for that!
Maarten Mulders (@mthmulders)
#dapr
6. Here Be Dinosaurs?!
(Source: , December 2003,
retrieved September 2021)
“J2EE has emerged, since it was first
released in 1999, as an integrated
standard for implementing and
deploying portable, multi-tiered
enterprise applications
The All New J2EE 1.4 Platform
Maarten Mulders (@mthmulders)
#dapr
10. Ingredients
(or: Buzzword Bingo)
Open Source
Polyglot
Modular
Pluggable
Cloud-Native
warning: may contain traces of nuts, gluten and other allergens.
Maarten Mulders (@mthmulders)
#dapr
11. Building Block
Describe cross-cutting concerns for building distributed
systems, e.g.
“my application needs to store data as
key/value pairs
Maarten Mulders (@mthmulders)
#dapr
12. Building Block API
POST /v1.0/state/vehicles HTTP/1.1
Host: localhost:3500
Content-Type: application/json
[
{
"key": "YH-52-VD",
"value": "{"licenseNumber":"YH-52-VD",
"entryTimestamp":"2021-09-15T11:19:18.1781609"
}"
}
]
HTTP/1.1 204 No Content
Maarten Mulders (@mthmulders)
#dapr
13. Building Block API
GET /v1.0/state/vehicles/YH-52-VD HTTP/1.1
Host: localhost:3500
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
"{
"licenseNumber":"YH-52-VD",
"entryTimestamp":"2021-09-15T11:19:18.1781609"
}"
Maarten Mulders (@mthmulders)
#dapr
17. Service Mesh on Steroids
Service Mesh on Steroids
Service Mesh on Steroids
Service Mesh on Steroids
Service Mesh on Steroids
Maarten Mulders (@mthmulders)
#dapr
23. 1. State Store — key/value storage
2. Service Invocation — invoke remote methods
3. Pub/Sub — async message processing
4. Bindings — interfaces to/from external integrations
5. Secrets — various secret stores
6. Name resolution — name resolution for service invocation
7. Middleware — various filters on incoming Web requests
Over 27 implementations available!
Maarten Mulders (@mthmulders)
#dapr
32. Tracing
Inject custom headers (e.g. X-B3-TraceId and X-B3-SpanId) to
measure execution throughout a chain.
Zipkin collects those traces and provides visualisations.
Maarten Mulders (@mthmulders)
#dapr
34. Metrics
Application records metrics (numeric measurements)
Prometheus collects (scrapes) measurements → time series
Grafana hosts dashboards to visualise the time series
Maarten Mulders (@mthmulders)
#dapr
35. Metrics
Dapr exposes metrics about its own processes, such as:
resource usage
mTLS (certificate issuing)
sidecar operations
Maarten Mulders (@mthmulders)
#dapr
37. Tracing with Dapr sidecar
POST /v1.0/invoke/vehicleregistrationservice/method/vehicleinfo/YH-52-VD
Host: localhost:3500
Content-Type: application/json
X-DaprRequestId: b237d1da-beaa-42ef-b8c6-fcf38a900a21
... (omitted for brevity)
Maarten Mulders (@mthmulders)
#dapr
38. The Dapr SDK for Java
Using io.dapr:dapr-sdk and optionally io.dapr:dapr-sdk-
springboot
daprClient.invokeMethod(
"vehicleregistrationservice",
"vehicleinfo/" + licenseNumber,
null, // no request body
HttpExtension.GET,
VehicleInfo.class
);
Maarten Mulders (@mthmulders)
#dapr
41. Dapr — Take Aways
1. Building blocks for distributed application integration
patterns
2. The sidecar brings you to places you've never been before
3. Not a one-stop shop or Swiss army knife
DIY Workshop: https://bit.ly/dapr-workshop-
java
Maarten Mulders (@mthmulders)
#dapr
42. Image attributions
electronic circuit board -
infrastructure -
SPECS-speed camera in Utrecht, The Netherlands -
lego -
airplane cockpit -
https://pxhere.com/en/photo/941067
https://pxhere.com/en/photo/1534169
https://commons.wikimedia.org/wiki/File:Trajectcontrole.jpg
https://pxhere.com/en/photo/1121211
https://pxhere.com/en/photo/609377
Maarten Mulders (@mthmulders)
#dapr