Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dapr: Dinosaur or Developer's Dream? (JBCNConf)

Dapr: Dinosaur or Developer's Dream? (JBCNConf)

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.

Maarten Mulders

July 19, 2022
Tweet

More Decks by Maarten Mulders

Other Decks in Technology

Transcript

  1. COMPLEXITY.... COMPLEXITY.... COMPLEXITY.... COMPLEXITY.... COMPLEXITY.... ESSENTIAL ESSENTIAL ESSENTIAL ESSENTIAL ESSENTIAL

    ACCIDENTAL ACCIDENTAL ACCIDENTAL ACCIDENTAL ACCIDENTAL #dapr Maarten Mulders (@mthmulders)
  2. “ “ “ “ “ Architecture is about making choices.

    But not Architecture is about making choices. But not Architecture is about making choices. But not Architecture is about making choices. But not Architecture is about making choices. But not too soon - later is better. too soon - later is better. too soon - later is better. too soon - later is better. too soon - later is better. #dapr Maarten Mulders (@mthmulders)
  3. 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 #dapr Maarten Mulders (@mthmulders)
  4. DISTRIBUTED APPLICATION RUNTIME “ An event-driven, portable runtime for building

    microservices on cloud and edge. #dapr Maarten Mulders (@mthmulders)
  5. INGREDIENTS (or: Buzzword Bingo) Open Source Polyglot Modular Pluggable Cloud-Native

    warning: may contain traces of nuts, gluten and other allergens. #dapr Maarten Mulders (@mthmulders)
  6. BUILDING BLOCK Describe cross-cutting concerns for building distributed systems, e.g.

    “ my application needs to store data as key/value pairs #dapr Maarten Mulders (@mthmulders)
  7. 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\" }" } ] #dapr Maarten Mulders (@mthmulders)
  8. 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\" }" #dapr Maarten Mulders (@mthmulders)
  9. SERVICE MESH ON STEROIDS SERVICE MESH ON STEROIDS SERVICE MESH

    ON STEROIDS SERVICE MESH ON STEROIDS SERVICE MESH ON STEROIDS #dapr Maarten Mulders (@mthmulders)
  10. 🤞🏻 🤞🏻 🤞🏻 🤞🏻 🤞🏻 1. Start the Dapr sidecar

    2. Start the demo app 3. Store / retrieve data #dapr Maarten Mulders (@mthmulders)
  11. 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! #dapr Maarten Mulders (@mthmulders)
  12. 🤞🏻 🤞🏻 🤞🏻 🤞🏻 🤞🏻 1. Start the Dapr sidecar

    2. Start the demo apps 3. Simulate traffic 🚗 4. Receive speeding ticket 😱 #dapr Maarten Mulders (@mthmulders)
  13. OBSERVABILITY OBSERVABILITY OBSERVABILITY OBSERVABILITY OBSERVABILITY TRACING TRACING TRACING TRACING TRACING

    METRICS METRICS METRICS METRICS METRICS #dapr Maarten Mulders (@mthmulders)
  14. 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. #dapr Maarten Mulders (@mthmulders)
  15. METRICS Application records metrics (numeric measurements) Prometheus collects (scrapes) measurements

    → time series Grafana hosts dashboards to visualise the time series #dapr Maarten Mulders (@mthmulders)
  16. METRICS Dapr exposes metrics about its own processes, such as:

    resource usage mTLS (certificate issuing) sidecar operations #dapr Maarten Mulders (@mthmulders)
  17. TRACING WITH DAPR SIDECAR POST /v1.0/invoke/vehicleregistrationservice/method/v Host: localhost:3500 Content-Type: application/json

    X-DaprRequestId: b237d1da-beaa-42ef-b8c6-fcf38a900a21 ... (omitted for brevity) #dapr Maarten Mulders (@mthmulders)
  18. THE DAPR SDK FOR JAVA Using io.dapr:dapr-sdk daprClient.invokeMethod( "vehicleregistrationservice", "vehicleinfo/"

    + licenseNumber, null, // no request body HttpExtension.GET, VehicleInfo.class ).contextWrite( /* * add tracing context from * e.g. OpenTracing or Spring Sleuth */ ); #dapr Maarten Mulders (@mthmulders)
  19. THE DAPR SDK FOR JAVA Using io.dapr:dapr-sdk-springboot @Topic(name = "speedingviolations",

    pubsubName = "pub @PostMapping(path = "/collectfine") public ResponseEntity<Void> registerViolation( @RequestBody CloudEvent<SpeedingViolation> event ) { // ... } #dapr Maarten Mulders (@mthmulders)
  20. 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 #dapr Maarten Mulders (@mthmulders)
  21. 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 #dapr Maarten Mulders (@mthmulders)