Dapr Distributed Application Runtime Dapr NET SDK Dev
Dapr Distributed Application Runtime Dapr. NET SDK Dev. Apps Meetup - Saison 04 Episode 07 Laurent Kempé - @laurentkempe 9 July 2021
Any cloud or edge infrastructure Application code Microservices written in Any code or framework… g. RPC API HTTP API Service-toservice invocation State management Publish and subscribe Resource bindings and triggers Actors Observability Secrets Extensible Hosting infrastructure Azure Arc On-Premises
Sidecar model Application Web. Site Dapr sidecar Dapr API HTTP/g. RPC POST http: //localhost: 3500/v 1. 0/invoke /cart/method/neworder GET http: //localhost: 3500/v 1. 0/state /inventory/item 67 POST http: //localhost: 3500/v 1. 0/publish /shipping/orders
Dapr applications Counter. Service State Management Service Invocation Pub. Sub Messaging Bindings & Triggers Secret Management Virtual Actors Web. Site Observability Weather. Service
Dapr components State Stores Pub. Sub Brokers My App Bindings & Triggers Secret Stores Observability Prometheus App. Insights Zipkin Jaeger
corpdb-redis. yaml Dapr state API Save state POST /v 1. 0/state/corpdb Retrieve state GET /v 1. 0/state/corpdb/mystate api. Version: dapr. io/v 1 alpha 1 kind: Component metadata: name: corpdb spec: type: state. redis version: v 1 metadata: - name: redis. Host value: redis-master. default. svc. cluster. local: 6379 - name: redis. Password secret. Key. Ref: name: redis-secret key: redis-password
pubsub Publish and subscribe Redis Cache Web. Site POST http: //localhost: 3500/v 1. 0/publish/pubsub/counterincremente d {“counter": “ 2"} Counter. Service POST {“counter": “ 2"}
orders. yaml Dapr pub/sub API App-to-sidecar Publish a message POST /v 1. 0/publish/orders/processed Sidecar-to-app Get app subscriptions GET /dapr/subscribe Publish to app POST /order-processing api. Version: dapr. io/v 1 alpha 1 kind: Component metadata: name: orders spec: type: pubsub. redis metadata: - name: redis. Host value: leader. redis. svc. cluster. local: 6379 - name: redis. Password secret. Key. Ref: name: redis-secret key: password - name: allowed. Topics value: "processed, audit"
Observability Weather. Service Web. Site Open. Telemetry collector Redis Cache Counter. Service Logging & tracing extensions
Thank You! �� Laurent Kempé https: //laurentkempe. com/ @laurentkempe
References Dapr. io Dapr on Github Dapr on discord Dapr for. NET Developers �� Learning Dapr - Building Distributed Cloud Native Applications �� Dapr SDK for. NET ���� �� e. Shop. On. Dapr, . NET distributed application ���� �� My Dapr playground ���� �� My Dapr blog posts
- Slides: 11