SlideShare a Scribd company logo
Introduction to Dapr (Distributed Application
Runtime)
Yevhen Bova
2021-02-25
2
www.luxoft.com
Short bio
 Java Developer at Luxoft
 10 years of experience in Java
 Involved in the development of:
 A huge OSGI-baseddesktop application(600+ modules, 300+ third-partymodules)
 Server-side - microservices
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Architecture"
4
www.luxoft.com
Project overview
 https://dapr.io/
 Initiated by Microsoft
 Open-source project (MIT License) - https://github.com/dapr/dapr
 Initial version: 0.1 released in Oct 2019
 Current version: v1.0 released on Feb 17
5
www.luxoft.com
High-level architecture diagram
6
www.luxoft.com
Building blocks (API)
7
www.luxoft.com
Hosting environments
• Self-hosted
• Dapr runtime needs to be launched via CL
• Kubernetes-hosted
• Dapr side-car container injected into pod
8
www.luxoft.com
Self-hosted
9
www.luxoft.com
Kubernetes-hosted
10
www.luxoft.com
Launching locally
dapr run --app-id myservice 
--app-port 8081 
--app-protocol http 
-- java -Dserver.port=8081 -jar com.example.myservice.jar
11
www.luxoft.com
Service invocation API
Overview
12
www.luxoft.com
Service invocation API
Features
• All calls between Dapr applications can be made secure with mutual authentication (mTLS)
• Supports calls across namespaces
• Performs retries
• Observability
• All calls between applications are traced, and metrics are gathered to provide insights and diagnostics for applications
• Uses W3C tracing context
• Integrates with OpenTelemetry for tracing, metrics, and logs
• Access Control Lists
13
www.luxoft.com
Pub/sub API
Overview
14
www.luxoft.com
Pub/sub API
The same file can be applied
• locally
• in k8s
Configuration
15
www.luxoft.com
Pub/sub API
Features
• Guarantees at-least-once semantics for message delivery
• Multiple subscribers with the same app ID
• Message delivered to one instance
• Multiple subscribers with different app ID
• Message delivered to all subscribers
• Topic scoping
• Limit which application can publish or subscribe to topics
• Messages are wrapped in CloudEvent format (if not already wrapped)
16
www.luxoft.com
Pub/sub API
Components
• Hazelcast
• Redis Streams (5.0.0 or later)
• NATS
• Kafka
• Azure Service Bus
• RabbitMQ
• Azure Event Hubs
• GCP Pub/Sub
• MQTT
• Possible to provide custom backend via SPI
17
www.luxoft.com
State management API
Overview
18
www.luxoft.com
State management API
Features
• Consistency
• eventual consistency (default behavior)
• strong consistency
• Concurrency
• first-write-wins (ETag support is required either by store or through Dapr emulation)
• last-write-wins
• Bulk operations
• not transactional
• transactional
19
www.luxoft.com
State management API
Components
Name CRUD
Transactional
(Supports Actors)
ETag
Aerospike ✅ ❌ ✅
Apache Cassandra ✅ ❌ ❌
Cloudstate ✅ ❌ ✅
Couchbase ✅ ❌ ✅
Hashicorp Consul ✅ ❌ ❌
Hazelcast ✅ ❌ ❌
Memcached ✅ ❌ ❌
MongoDB ✅ ✅ ❌
MySQL ✅ ✅ ✅
PostgreSQL ✅ ✅ ✅
Redis ✅ ✅ ✅
RethinkDB ✅ ✅ ✅
Zookeeper ✅ ❌ ✅
AWS, GCP, Azure stores…
20
www.luxoft.com
State management API
Components
• Dapr supports Redis 5 and later
• Azure supports Redis 4 and 6
21
www.luxoft.com
Bindings API
Overview
22
www.luxoft.com
Bindings API
Components
Name
Input
Binding
Output
Binding
Status
Apple Push Notifications (APN) ✅ Alpha
Cron (Scheduler) ✅ ✅ Alpha
HTTP ✅ GA
InfluxDB ✅ Alpha
Kafka ✅ ✅ Alpha
Kubernetes Events ✅ Alpha
MQTT ✅ ✅ Alpha
MySQL ✅ Alpha
PostgreSql ✅ Alpha
Postmark ✅ Alpha
RabbitMQ ✅ ✅ Alpha
Redis ✅ Alpha
SMTP ✅ Alpha
Twilio ✅ Alpha
Twitter ✅ ✅ Alpha
SendGrid ✅ Alpha
AWS, GCP, Azure, Alibaba…
23
www.luxoft.com
Secrets API
Overview
24
www.luxoft.com
Secrets API
Features
• Can be accessed
• Programmatically through API
• In Dapr component configuration files
• Secrets scoping
• By default, any secret is accessible from any Dapr application
• Each Dapr application can be configured to have access to only selected secrets
25
www.luxoft.com
Secrets API
Components
• Local environment variables
• Local file
• HashiCorp Vault
• Kubernetes secrets
• AWS Secret Manager
• GCP Secret Manager
• Azure Key Vault
26
www.luxoft.com
SDKs
Language Status Client SDK
Service
Extensions
Actor SDK
.NET Stable ✔
✔
ASP.NET Core
✔
Python Stable ✔
✔
gRPC
✔
FastAPI
Flask
Java Stable ✔
✔
Spring Boot
✔
Go Stable ✔ ✔
PHP Stable ✔ ✔ ✔
C++ In development ✔
Rust In development ✔
Javascript In development ✔
27
www.luxoft.com
Performance and scalability
Workflow
28
www.luxoft.com
Performance and scalability
Overhead
Test setup:
• 1,000 requests per second
• Sidecar limited to 0.5 vCPU
• Sidecar mTLS enabled
• Sidecar telemetry enabled (tracing with a sampling rate of 0.1)
• Payload of 1KB
• Dapr side car overhead (1,000 requests):
• 0.48 vCPU
• 23Mb
• Control plane consumes:
• In non-HA mode: 0.009 vCPU and 61.6 Mb
• In HA mode: ~0.02 vCPU and 185 Mb
29
www.luxoft.com
Performance and scalability
Latency
30
www.luxoft.com
Pros
 Simple workflows with pub/sub and stage management are easy to implement with Dapr
 No need to deal with different third-party SDK, drivers, etc.
 Encourages developers to use best practices
 Implementation of a component (store, pub-sub, etc) can be replaced easily
 Language-agnostic
 Well-documented
 API examples
 SDK examples
 Deployment examples
31
www.luxoft.com
Cons
 APIs provide a small subset of features of underlying components
 Restricts versions of underlying components
 Only Redis 5 and 6 are supported
 Makes it harder to launch/debug apps on the dev side
 Need to launch two processes instead of one (app + Dapr)
 Console log is cluttered
 No good support in IDE (yet?)
 Devs have to create launchers manually to launch Dapr
 Requires extra resources on server side (two-four pods)
 Adds complexity to the overall picture
 Overlaps with istio: mTLS, tracing
 Maturity status:
 A lot of components are in alpha/experimental state
 Low adaptation
32
www.luxoft.com
References
Good overview - https://www.youtube.com/watch?v=MjyulcRqh20
Examples - https://github.com/dapr/quickstarts
SDK examples - https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples
API reference - https://docs.dapr.io/reference/api/
Service Invocation Performance - https://docs.dapr.io/operations/performance-and-scalability/perf-service-invocation/
Thank You!
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Architecture"
35
www.luxoft.com
Deployment in Kubernetes
Overview
36
www.luxoft.com
Deployment in Kubernetes
Annotations
37
www.luxoft.com
IDE support

More Related Content

What's hot (20)

PDF
Native Java with GraalVM
Sylvain Wallez
 
PDF
jLove 2020 - Micronaut and graalvm: The power of AoT
Iván López Martín
 
PPTX
Retrofitting Continuous Delivery
Alan Norton
 
PDF
Rails Application Optimization Techniques & Tools
guest05c09d
 
ODP
Performance Optimization of Rails Applications
Serge Smetana
 
PDF
Building Observable Applications w/ Node.js -- BayNode Meetup, March 2014
Yunong Xiao
 
PDF
Bareon functional testing ci
Max Lobur
 
PDF
美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术团队
 
PDF
CPAN Training
Pedro Figueiredo
 
PDF
Foreman - Advanced use cases - Timo Goebel
NETWAYS
 
PPTX
Nodejs Performance Debug
Rafael Gonzaga
 
PPTX
fsharp goodness for everyday work
Uladzimir Shchur
 
PDF
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Bilgin Ibryam
 
PDF
High Fidelity Games: Real Examples, Best Practices ... | Oleksii Vasylenko
Jessica Tams
 
PDF
perlcc made easy or, how to make a CGI Moose app
cPanel
 
PPTX
Ruby/rails performance and profiling
Danny Guinther
 
KEY
Scaling application servers for efficiency
Tomas Doran
 
PPTX
MongoDB backup service overview Boston MUG
MongoDB
 
PDF
Reverse Installing CPAN
brian d foy
 
PDF
Whoops! I Rewrote It in Rust
ScyllaDB
 
Native Java with GraalVM
Sylvain Wallez
 
jLove 2020 - Micronaut and graalvm: The power of AoT
Iván López Martín
 
Retrofitting Continuous Delivery
Alan Norton
 
Rails Application Optimization Techniques & Tools
guest05c09d
 
Performance Optimization of Rails Applications
Serge Smetana
 
Building Observable Applications w/ Node.js -- BayNode Meetup, March 2014
Yunong Xiao
 
Bareon functional testing ci
Max Lobur
 
美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术团队
 
CPAN Training
Pedro Figueiredo
 
Foreman - Advanced use cases - Timo Goebel
NETWAYS
 
Nodejs Performance Debug
Rafael Gonzaga
 
fsharp goodness for everyday work
Uladzimir Shchur
 
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Bilgin Ibryam
 
High Fidelity Games: Real Examples, Best Practices ... | Oleksii Vasylenko
Jessica Tams
 
perlcc made easy or, how to make a CGI Moose app
cPanel
 
Ruby/rails performance and profiling
Danny Guinther
 
Scaling application servers for efficiency
Tomas Doran
 
MongoDB backup service overview Boston MUG
MongoDB
 
Reverse Installing CPAN
brian d foy
 
Whoops! I Rewrote It in Rust
ScyllaDB
 

Similar to Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Architecture" (20)

PPTX
Dapr- Distributed Application Runtime
Moaid Hathot
 
PPTX
DAPR - Distributed Application Runtime Presentation
Knoldus Inc.
 
PPTX
Dapr: the glue to your microservices
Moaid Hathot
 
PPTX
Dapr: distributed application runtime
Moaid Hathot
 
PPTX
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
CodeValue
 
PPTX
Distributed Application Runtime (Dapr) - Azure Israel 2020
Moaid Hathot
 
PDF
Dapr: Dinosaur or Developer's Dream? (v1)
Maarten Mulders
 
PDF
Dapr: Dinosaur or Developer Dream? (J-Fall)
Maarten Mulders
 
PPTX
Watts Water Dapr Community Call - Building Distributed Systems with Dapr
ssuserfb6acb
 
PDF
Dapr - A 10x Developer Framework for Any Language
Bilgin Ibryam
 
PPTX
Core Service with Dapr Presentation.pptx
Knoldus Inc.
 
PDF
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller
 
PDF
DWX 2023 - .NET-Microservices mit Dapr: Zu viel Abstraktion oder der richtige...
Marc Müller
 
PDF
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Geert van der Cruijsen
 
PDF
Dapr.pdf
Vishwas N
 
PDF
SGCE 2015 REST APIs
Domingo Suarez Torres
 
PDF
APIs distribuidos con alta escalabilidad
Software Guru
 
PDF
2021 JCConf 使用Dapr簡化Java微服務應用開發
Rich Lee
 
PPTX
Pune_MuleSoft_Meetup_Async_API_Dwl_Library.pptx
Ravi Prakash Singh
 
Dapr- Distributed Application Runtime
Moaid Hathot
 
DAPR - Distributed Application Runtime Presentation
Knoldus Inc.
 
Dapr: the glue to your microservices
Moaid Hathot
 
Dapr: distributed application runtime
Moaid Hathot
 
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
CodeValue
 
Distributed Application Runtime (Dapr) - Azure Israel 2020
Moaid Hathot
 
Dapr: Dinosaur or Developer's Dream? (v1)
Maarten Mulders
 
Dapr: Dinosaur or Developer Dream? (J-Fall)
Maarten Mulders
 
Watts Water Dapr Community Call - Building Distributed Systems with Dapr
ssuserfb6acb
 
Dapr - A 10x Developer Framework for Any Language
Bilgin Ibryam
 
Core Service with Dapr Presentation.pptx
Knoldus Inc.
 
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller
 
DWX 2023 - .NET-Microservices mit Dapr: Zu viel Abstraktion oder der richtige...
Marc Müller
 
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Geert van der Cruijsen
 
Dapr.pdf
Vishwas N
 
SGCE 2015 REST APIs
Domingo Suarez Torres
 
APIs distribuidos con alta escalabilidad
Software Guru
 
2021 JCConf 使用Dapr簡化Java微服務應用開發
Rich Lee
 
Pune_MuleSoft_Meetup_Async_API_Dwl_Library.pptx
Ravi Prakash Singh
 
Ad

More from LogeekNightUkraine (20)

PPTX
Face recognition with c++
LogeekNightUkraine
 
PPTX
C++20 features
LogeekNightUkraine
 
PPTX
Autonomous driving on your developer pc. technologies, approaches, future
LogeekNightUkraine
 
PDF
Orkhan Gasimov "High Performance System Design"
LogeekNightUkraine
 
PPTX
Vitalii Korzh "Managed Workflows or How to Master Data"
LogeekNightUkraine
 
PDF
Yevhen Tatarynov "From POC to High-Performance .NET applications"
LogeekNightUkraine
 
PDF
Oleksii Kuchuk "Reading gauge values with open cv imgproc"
LogeekNightUkraine
 
PDF
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
LogeekNightUkraine
 
PDF
Pavlo Zhdanov "Mastering solid and base principles for software design"
LogeekNightUkraine
 
PDF
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
LogeekNightUkraine
 
PPTX
Aleksandr Kutsan "Managing Dependencies in C++"
LogeekNightUkraine
 
PDF
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
LogeekNightUkraine
 
PDF
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
LogeekNightUkraine
 
PPTX
Michal Kordas "Docker: Good, Bad or Both"
LogeekNightUkraine
 
PPTX
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
LogeekNightUkraine
 
PPTX
Shestakov Illia "The Sandbox Theory"
LogeekNightUkraine
 
PPTX
Dmytro Kochergin “Autotest with CYPRESS”
LogeekNightUkraine
 
PPTX
Ivan Dryzhyruk “Ducks Don’t Like Bugs”
LogeekNightUkraine
 
PDF
Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"
LogeekNightUkraine
 
PDF
Dmytro Safonov "Open-Source Map Viewers"
LogeekNightUkraine
 
Face recognition with c++
LogeekNightUkraine
 
C++20 features
LogeekNightUkraine
 
Autonomous driving on your developer pc. technologies, approaches, future
LogeekNightUkraine
 
Orkhan Gasimov "High Performance System Design"
LogeekNightUkraine
 
Vitalii Korzh "Managed Workflows or How to Master Data"
LogeekNightUkraine
 
Yevhen Tatarynov "From POC to High-Performance .NET applications"
LogeekNightUkraine
 
Oleksii Kuchuk "Reading gauge values with open cv imgproc"
LogeekNightUkraine
 
Oleksandr Kutsan "Using katai struct to describe the process of working with ...
LogeekNightUkraine
 
Pavlo Zhdanov "Mastering solid and base principles for software design"
LogeekNightUkraine
 
Serhii Zemlianyi "Error Retries with Exponential Backoff Using RabbitMQ"
LogeekNightUkraine
 
Aleksandr Kutsan "Managing Dependencies in C++"
LogeekNightUkraine
 
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
LogeekNightUkraine
 
Alexandr Golyak, Nikolay Chertkov "Automotive Testing vs Test Automatio"
LogeekNightUkraine
 
Michal Kordas "Docker: Good, Bad or Both"
LogeekNightUkraine
 
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
LogeekNightUkraine
 
Shestakov Illia "The Sandbox Theory"
LogeekNightUkraine
 
Dmytro Kochergin “Autotest with CYPRESS”
LogeekNightUkraine
 
Ivan Dryzhyruk “Ducks Don’t Like Bugs”
LogeekNightUkraine
 
Nhu Viet Nguyen "Why C++ is Becoming a Necessity for QA Automation"
LogeekNightUkraine
 
Dmytro Safonov "Open-Source Map Viewers"
LogeekNightUkraine
 
Ad

Recently uploaded (20)

PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Digital Circuits, important subject in CS
contactparinay1
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 

Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Architecture"