SlideShare a Scribd company logo
Classificatie: vertrouwelijk
Introductie van
Dapr –
de open source
personal
assistant
voor
applicaties en
microservices
Conclusion Code CafĂ© – Maandag 4 april 2022
Lucas Jellema
Classificatie: vertrouwelijk
Demo
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
dapr run --app-id myapp --dapr-http-port 3500
http
port 3500
myapp
default-components.yaml
Redis
Zipkin
tracing
Zipkin
Redis
state store
pubsub broker
Redis
state: redis
pubsub: redis
OpenTelemetry:
Classificatie: vertrouwelijk
Demo
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
curl -X POST -H "Content-Type: application/json"
-d '[{ "key": "name", "value": "Bruce Wayne"}]'
http://localhost:3500/v1.0/state/statestore
http
port 3500
myapp
default-components.yaml
Redis
Zipkin
tracing
Zipkin
Redis
state store
pubsub broker
Redis
statestore
pubsub
POST
key: name
value: Bruce Wayne
Classificatie: vertrouwelijk
Demo
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
curl -X POST -H "Content-Type: application/json"
-d '[{ "key": "name", "value": "Bruce Wayne"}]'
http://localhost:3500/v1.0/state/statestore
http
port 3500
myapp
default-components.yaml
Redis
Zipkin
tracing
Zipkin
Redis
state store
pubsub broker
Redis
statestore
pubsub
POST
key: name
value: Bruce Wayne
key: name
value:
Bruce
Wayne
Classificatie: vertrouwelijk
Demo
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
curl http://localhost:3500/v1.0/state/statestore/name
http
port 3500
myapp
default-components.yaml
Redis
Zipkin
tracing
Zipkin
Redis
state store
pubsub broker
Redis
statestore
pubsub
GET
key: name
value:
Bruce
Wayne
Classificatie: vertrouwelijk
Demo
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
curl http://localhost:3500/v1.0/state/statestore/name
http
port 3500
myapp
default-components.yaml
Redis
Zipkin
tracing
Zipkin
Redis
state store
pubsub broker
Redis
statestore
pubsub
GET
key: name
value: Bruce Wayne
“Bruce Wayne”
Classificatie: vertrouwelijk
Demo
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
http
myapp
app-components.yaml
Redis
Zipkin
tracing
Zipkin
Redis
state store
pubsub broker
Redis
My App
Application
http
Classificatie: vertrouwelijk
Hypothetical Demo
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
http
myapp
app-components.yaml
Redis
Zipkin
tracing
Zipkin
Redis
state store
pubsub broker
Redis
My App
Application
MySQL
database
http
Classificatie: vertrouwelijk
The Microservice
API
HTTP REST/JSON
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
”
Classificatie: vertrouwelijk
The Microservices Platform
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Runtime Platform
API
”
API
”
API
”
API
”
Classificatie: vertrouwelijk
The Microservices Platform
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
power cooling
rack
space
physical real estate
IAM
Certificate
Management
Vulnerability
Scanning
Logging
Monitoring Auditing
Cloud Usage
Analysis
Resource
Manager
APIs
Cloud
Events
Notifications Cloud Guard
Tagging
Search
Serverless
Functions
Container
engine
API
Gateway
Load
Balancer
Container
Registry
Artifact
Repository
Job
Scheduling Build & Deploy
Pipelines
Code
Repository
Web Application
Firewall
CDN
Virtual
Machines
API
”
Classificatie: vertrouwelijk
The Microservices Platform
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
power cooling
rack
space
physical real estate
IAM
Certificate
Management
Vulnerability
Scanning
Logging
Monitoring Auditing
Cloud Usage
Analysis
Resource
Manager
APIs
Cloud
Events
Notifications Cloud Guard
Tagging
Search
SQL
Database Serverless
Functions
Container
engine
Vault
API
Gateway
Load
Balancer
Message/
Event Broker
Data
Lake
Container
Registry
Artifact
Repository
Job
Scheduling Build & Deploy
Pipelines
NoSQL
Database
Data
Cache
Code
Repository
Web Application
Firewall
CDN
Virtual
Machines
File Storage
API
”
Classificatie: vertrouwelijk
The Microservices Platform
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
power cooling
rack
space
physical real estate
IAM
Certificate
Management
Vulnerability
Scanning
Logging
Monitoring Auditing
Cloud Usage
Analysis
Resource
Manager
APIs
Cloud
Events
Notifications Cloud Guard
Tagging
Search
SQL
Database Serverless
Functions
Container
engine
Vault
API
Gateway
Load
Balancer
Message/
Event Broker
Data
Lake
Container
Registry
Artifact
Repository
Job
Scheduling Build & Deploy
Pipelines
NoSQL
Database
Data
Cache
Code
Repository
Web Application
Firewall
CDN
Virtual
Machines
File Storage
API
”
Zipin
Classificatie: vertrouwelijk
What do most microservices do?
‱ Store and retrieve state
‱ Read runtime secrets and configuration values
‱ Publish “observability data”
‱ Subscribe to event topic and handle incoming events
‱ Publish events to event topic
‱ Interact with other microservices
‱ Invoke external services
‱ Run microservice specific business logic
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
This requires quite a bit of
repetitive “plumbing” tied to
specific technologies
– not meaningful effort
[from a business functionality
perspective]
Classificatie: vertrouwelijk
Dapr
Distributed Application Runtime
quick introduction
Classificatie: vertrouwelijk
Dapr
‱ Runtime
‱ Personal Assistant for Applications and Microservices
‱ Distributed Application Runtime
‱ Microservice architecture
‱ Decoupling
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Classificatie: vertrouwelijk
Dapr.io
‱ Launched by Microsoft (2019)
‱ Application runtime framework –
supporting cloud native and serverless
‱ Every application gets a uniform Personal Assistant
that takes care of common tasks
‱ remember (take note and reproduce)
‱ keep log
‱ restrict access
‱ handle incoming
‱ route outgoing
‱ interact with
other PAs (and
their apps)
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Application
Microservice or
Monolith
Personal
Assistant
(Dapr)
Personal
Assistant
(Dapr)
Personal
Assistant
(Dapr)
Personal
Assistant
(Dapr)
Personal
Assistant
(Dapr)
Personal
Assistant
(Dapr)
Classificatie: vertrouwelijk
Dapr.io
‱ Personal Assistant is Dapr Side Car
‱ companion process or side car container in Kubernetes Pod
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
My App Dapr API
HTTP/gRPC
Application
Dapr sidecar
Classificatie: vertrouwelijk
key value
myApp-weapon "DeathStar"
State management
My App
POST
http://localhost:3500/v1.0/state/corpdb
[{
"key": "weapon",
"value": "DeathStar"
}]
Redis Cache
Classificatie: vertrouwelijk
State management
My App
key value
myApp-weapon "DeathStar"
Redis Cache
GET
http://localhost:3500/v1.0/state/corpdb/planet
"DeathStar"
Classificatie: vertrouwelijk
State management
My App
key value
myApp-weapon "DeathStar"
Azure CosmosDB
GET
http://localhost:3500/v1.0/state/corpdb/planet
"DeathStar"
Classificatie: vertrouwelijk
Dapr state API
Save state
POST /v1.0/state/corpdb
Retrieve state
GET /v1.0/state/corpdb/mystate
Delete state
DELETE /v1.0/state/corpdb/mystate
Get bulk state
POST /v1.0/state/corpdb/bulk
Submit multiple state transactions
POST /v1.0/state/corpdb/transaction
corpdb-redis.yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: corpdb
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: redis-master.default.svc.cluster.local:6379
- name: redisPassword
secretKeyRef:
name: redis-secret
key: redis-password
Classificatie: vertrouwelijk
Dapr state API
Save state
POST /v1.0/state/corpdb
Retrieve state
GET /v1.0/state/corpdb/mystate
Delete state
DELETE /v1.0/state/corpdb/mystate
Get bulk state
POST /v1.0/state/corpdb/bulk
Submit multiple state transactions
POST /v1.0/state/corpdb/transaction
corpdb-cosmosdb.yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: corpdb
spec:
type: state.azure.cosmosdb
version: v1
metadata:
- name: url
value: corpdb.documents.azure.com
- name: masterKey
secretKeyRef:
name: master-key
key: cosmos-key
- name: database
value: orders
- name: collection
value: processed
Classificatie: vertrouwelijk
HTTP API gRPC API
Microservice building blocks
Service-
to-service
invocation
State
management
Publish
and
subscribe
Resource
bindings
and triggers
Actors Observability Secrets Extensible
Classificatie: vertrouwelijk
Standard APIs accessed over http/gRPC protocols from
user service code
Runs as local “side car library” dynamically loaded
at runtime for each service
HTTP API gRPC API
Any language and framework
Application code
Microservices written in
Any code or framework

Service-
to-service
invocation
State
management
Publish
and
subscribe
Resource
bindings
and triggers
Actors Observability Secrets Application
Configuration
Classificatie: vertrouwelijk
HTTP API gRPC API
Any cloud or edge infrastructure
Application code
Microservices written in
Any code or framework

Service-
to-service
invocation
State
management
Publish
and
subscribe
Resource
bindings
and triggers
Actors Observability Secrets Application
Configuration
Hosting infrastructure
On-Premises
Azure Arc
Classificatie: vertrouwelijk
Dapr components
My App
Observability
Prometheus AppInsights Jaeger
Zipkin
Bindings
& Triggers
State
Stores
Secret
Stores
PubSub
Brokers
Classificatie: vertrouwelijk
Service invocation
Service A
My App
mDNS
Multicast DNS component for
service discovery
mTLS encryption
POST
http://localhost:3500/v1.0/invoke/servicea/method/neworder
{"data":"Hello World"}
POST
http://10.0.0.2:8000/neworder
{"data":"Hello World"}
Classificatie: vertrouwelijk
Publish and subscribe
Service B
My App Redis
Cache
Service A
POST
http://localhost:3500/v1.0/publish/orders/processed
{"data":"Hello World"}
POST
http://10.0.0.2:8000/orders
http://10.0.0.4:8000/factory/orders
{"data":"Hello World"}
Classificatie: vertrouwelijk
Input triggers
My App
Twitter
POST
http://10.0.0.2:8000/newtweet
{"data":“📱 We are excited
to announce the 
"}
Classificatie: vertrouwelijk
Output bindings
My App
Twilio
POST
http://localhost:3500/v1.0/bindings/twilio
{"data":"Hello World"}
Hello World
Classificatie: vertrouwelijk
Secrets
My App
GET
http://localhost:3500/v1.0/secrets/vault/mysecret
"supersecret"
HashiCorp
Vault
key value
mysecret "supersecret"
Classificatie: vertrouwelijk
Host/Pod
Stateful, objects of
storage and compute
Dapr Actor features:
Distribution and failover
Turn-based concurrency
State management
Timers
Reminders
Host/Pod
Video Game
Enemy
Virtually identical to Service Fabric Reliable Actors
Virtual actors
Classificatie: vertrouwelijk
Actor A
Actor C
My
Actor
Pod 1
Actor B
Actor F
Actor E
Actor G
Virtual actors
My App
POST
http://localhost:3500/v1.0/actors/MyActor/A/method/update
{"speed":"1"}
Dapr actor placement
service
Placement
Actor Z
Actor X
My
Actor
Pod 2
Actor Y
Actor U
Actor V
Actor T
Classificatie: vertrouwelijk
Observability
OpenTelemetry collector
Logging &
tracing extensions
My App Redis
Cache
Twitter
Service B
Service A
Classificatie: vertrouwelijk
Metrics
Dapr Metrics features:
Call latency
CPU/memory usage
Error rates
Sidecar injection failures
System health
Built-in monitoring capabilities to
understand the behavior of the
Dapr sidecar and system services
Classificatie: vertrouwelijk
Application Configuration Settings (preview)
Centralized management of configuration settings such as endpoints, hostnames,
filesystem locations, feature toggles.
Applications can consume configuration values and subscribe to change events.
Classificatie: vertrouwelijk
Dapr hosting environments
‱ Get started with dapr init -k
‱ Fully managed Dapr control plane
‱ Deploys dashboard, placement, operator,
sentry, and injector pods
‱ Automatically inject Dapr sidecar into
all annotated pods
‱ Upgrade with dapr upgrade or Helm
‱ Get started with dapr init
‱ Easy setup with Docker images
‱ Sets up placement, Zipkin, Redis
‱ slim-init available without Docker
‱ Run any application with Dapr sidecar
using dapr run
Self-hosted
Classificatie: vertrouwelijk
Dapr in self-hosted Docker mode
Local dev machine or virtual machine
Zipkin
tracing
Zipkin
Redis
state store
Redis
My App
State Stores
PubSub
Brokers
Secret Stores
Bindings
& Triggers
Observability
Dapr Components
dapr run myapp
Use components
Launch application
Launch sidecar process
Set env variables
Save and retrieve state
Publish and subscribe to messages
Send distributed tracing
Classificatie: vertrouwelijk
Dapr in self-hosted Docker mode – add MySQL Database
Local dev machine or virtual machine
Zipkin
tracing
Zipkin
MySQL
database
Redis
state store
Redis
myotherapp
dapr run --app-id myotherapp --dapr-http-port 3510 --components-path .
Launch application
Launch sidecar process
Set env variables
Save and retrieve state
mysql-statestore.yaml
Classificatie: vertrouwelijk
Dapr on Kubernetes
Any cloud or edge infrastructure
Pod
Actor
partition
placement
Placement
Pod
Dapr
runtime
injector
Injector
Pod
Cert authority
and identity Sentry
Pod
Update
component
changes
Operator
Pod
My App
Kubelet Use components
Inject Dapr sidecar
into annotated pods
Inject env variables
Manage mTLS
between services
Assign spiffe identity
Create mapping table of
actor instances to pods
Manage component updates
Manage Kubernetes
service endpoints
Readiness and Liveness
probe on healthz API to
determine Dapr health state
State Stores
Pub/Sub
Brokers
Secret Stores
Bindings
& Triggers
Observability
Dapr Components
Operator
Deploys and
manages Dapr
Classificatie: vertrouwelijk
Dapr and service meshes
Service Mesh
Operator
Hosting infrastructure
Application code
Any code or
framework

Traffic splitting
Traffic routing
Distributed tracing
Resiliency
Metrics
mTLS
Service-to-service
invocation
State
management
Publish and
subscribe
Secrets
Resource bindings
and triggers
Actors
Developer
Classificatie: vertrouwelijk
Dapr and Node Applications
‱ HTTP (or gRPC) with Dapr SideCar
‱ easier yet: Node SDK for Dapr
‱ Leverage Dapr and its building blocks for
‱ simple state management
‱ simple publication of messages
‱ subscription to incoming messages
‱ retrieving secrets
‱ retrieving configuration data
‱ invoking external services (database, message broker, store, API)
‱ register as listener to inbound requests and messages for external
services
‱ decoupled interaction between microservices – implemented in
potentially very different languages
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
components.yaml
sidecar (the personal assistant)
Node SDK
for Dapr
Observability
Prometheus AppInsights Jaeger
Zipkin
Bindings
& Triggers
GCP
Storage
AWS
S3 Kafka
Azure
Storage Twilio
State
Stores
Firebase Cassandra
Redis
Azure
CosmosDB
AWS
DynamoDB
Secret
Stores
AWS
Secrets Manager
Azure
KeyVault
GCP
Secret Manager
HashiCorp
Vault
Kubernetes
Secret
PubSub
Brokers
Redis
AWS
SQS
Azure
Service Bus
RabbitMQ
GCP
Pub/Sub
Classificatie: vertrouwelijk
Observability
Prometheus AppInsights Jaeger
Zipkin
Bindings
& Triggers
State
Stores
Secret
Stores
PubSub
Brokers
Dapr Architecture
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Dapr main
state store
interface
pub/sub
interface
binding
interface
secret
interface
register all
components
(per type)
observable
interface
do something for me – store
or retrieve state, subscribe
to topic (and callback with
messages), invoke service,
retrieve secret
components.yaml
Classificatie: vertrouwelijk
State Management with Dapr from Node application
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
sidecar (the personal assistant)
Node SDK
for Dapr
State Store
components
set & get state
components.yaml
State
Stores
state store
interface
Classificatie: vertrouwelijk
State Management with Dapr from Node application
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
sidecar (the personal assistant)
Node SDK
for Dapr
State Store
components
set & get state
components.yaml
State
Stores
state store
interface
connect to
sidecar
retrieve
state
setstate
Classificatie: vertrouwelijk
State Management with Dapr from Node application -
switch to MySQL state store with configuration change
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
sidecar (the personal assistant)
Node SDK
for Dapr
State Store
components
set & get state
components.yaml
State
Stores
state store
interface
connect to
sidecar
retrieve
state
setstate
Classificatie: vertrouwelijk
State Management with Dapr from any application
- either through SDK or using HTTP or gRPC
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
sidecar (the personal assistant)
SDK for
Dapr
State Store
components
set & get state
components.yaml
State
Stores
state store
interface
Classificatie: vertrouwelijk
Pub/Sub with Dapr from Node applications
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
sidecar (the personal assistant)
Node SDK
for Dapr
Pub/Sub
components
publish message
components.yaml
PubSub
Brokers
pub/sub
interface
Node SDK
for Dapr
components.yaml
subscribe on topic
with handler function
message sent to handler
Classificatie: vertrouwelijk
Pub/Sub with Dapr from Node applications
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
sidecar (the personal assistant)
Node SDK
for Dapr
Pub/Sub
components
publish message
components.yaml
PubSub
Brokers
Node SDK
for Dapr
components.yaml
subscribe on topic
with handler function
message sent to handler
pub/sub
interface
publish
message
Classificatie: vertrouwelijk
Pub/Sub with Dapr from Node applications
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
sidecar (the personal assistant)
Node SDK
for Dapr
Pub/Sub
components
publish message
ponents.yaml
PubSub
Brokers
Node SDK
for Dapr
components.yaml
pub/sub
interface
subscribe
on topic
message sent
to handler
Classificatie: vertrouwelijk
Pub/Sub with Dapr from Node applications
Replace Redis by Apache Kafka
Microservices in real life – with Node & Dapr.io
sidecar (the personal assistant)
Node SDK
for Dapr
Pub/Sub
components
publish message
to topic
components.yaml
PubSub
Brokers
pub/sub
interface
Node SDK
for Dapr
components.yaml
subscribe on topic
with handler function
message sent to handler
9094
9093
9092
test-topic
Classificatie: vertrouwelijk
Asynchronous Interaction between Microservices
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Front App
http
State
Stores
PubSub
Brokers
Node App
get get & set
publish
subscribe
consume
name = John
Classificatie: vertrouwelijk
Telemetry Observation in Zipkin
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
greeter
http
State
Stores
PubSub
Brokers
name-processor
get get & set
publish
subscribe
consume
name = John
Telemetry
Data
Classificatie: vertrouwelijk
Telemetry Observation in Zipkin
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Telemetry
Data
Front App
http
State
Stores
PubSub
Brokers
Node App
get get & set
publish
subscribe
consume
name = John
Classificatie: vertrouwelijk
Hands On
In a Linux compatible environment with Docker CLI set up
‱ Download and Install Dapr.io
‱ with out of the box state management and pub/sub based on Redis and
telemetry observation by Zipkin
‱ Run Dapr Sidecar
‱ Explore Dapr State Management APIs
‱ from the command line (cURL HTTP calls)
‱ Run MySQL container and have Dapr manage state in a MySQL database
‱ Explore Dapr Telemetry collection and presentation in Zipkin
‱ Explore Node and Dapr
‱ add state management to Node application – through Dapr sidecar
‱ implement pub/sub for Node applications – through Dapr sidecar
‱ realize asynchronous communication between Node based microservices
through Daprized pub/sub
‱ Explore Telemetry for asynchronous interactions
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Classificatie: vertrouwelijk
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
State
Stores
app.js
get & set
Node SDK
for Dapr
components.yaml
dapr_host,
dapr_http_port
app_port
key value
John
Monty
3
2
name,
instance count
Default, out
of the box
?name=John
Handson
Classificatie: vertrouwelijk
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Handson
SomeService
Invoker SomeService
echo
Daprized Go application – has
registered an invocation
handler for operation echo
Daprized Node application –
asks its sidecar to invoke
method echo on service
SomeService
mDNS
Multicast DNS component
for service discovery
Classificatie: vertrouwelijk
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Handson
SomeService
Invoker SomeService
echo
Daprized Go application – has
registered an invocation
handler for operation calculate
{ x: 3.14159,
y: 42,
z: 2.71828 }
mDNS
Multicast DNS component
for service discovery
calculate
{ "outcome":
13618.131,
"comment":
"Greetings" }
Local function
complexCalculation invokes
method calculate on remote
service SomeService
Classificatie: vertrouwelijk
Code Café - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
Handson
SomeService
echo
Daprized Go application – has
registered an invocation
handler for operation echo
OtherService
Invoker
Regular, NonDaprized Node
application – asks
SomeService’s sidecar to
invoke method echo – calling
the gRPC port of that sidecar

More Related Content

PDF
[ì˜€í”ˆí…ŒíŹë„·ì„œë°‹2022] ꔭ낎 PaaS(Kubernetes) Best Practice 및 DevOps 환êČœ ê”Źì¶• ì‚ŹëĄ€.pdf
PPTX
Tour of Dapr
ODP
Introduction to Swagger
PDF
ìż ì•ŒëȘ»ìŽ Amazon EKS로 안정적읞 서ëč„슀 욎영하Ʞ - 씜용혞(ë„„ìŠšìœ”ëŠŹì•„) :: AWS Community Day 2020
PDF
Serverless Microservices Communication with Amazon EventBridge
PDF
Amazon SageMaker ëȘšëž 학슔 ë°©ëȕ 소개::씜영쀀, ì†”ëŁšì…˜ìŠˆ 아킀텍튞 AI/ML 엑슀퍌튞, AWS::AWS AIML 슀페셜 웚ëč„나
PDF
ë§ˆìŽíŹëĄœ 서ëč„슀넌 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
PDF
OpenAPI 3.0, And What It Means for the Future of Swagger
[ì˜€í”ˆí…ŒíŹë„·ì„œë°‹2022] ꔭ낎 PaaS(Kubernetes) Best Practice 및 DevOps 환êČœ ê”Źì¶• ì‚ŹëĄ€.pdf
Tour of Dapr
Introduction to Swagger
ìż ì•ŒëȘ»ìŽ Amazon EKS로 안정적읞 서ëč„슀 욎영하Ʞ - 씜용혞(ë„„ìŠšìœ”ëŠŹì•„) :: AWS Community Day 2020
Serverless Microservices Communication with Amazon EventBridge
Amazon SageMaker ëȘšëž 학슔 ë°©ëȕ 소개::씜영쀀, ì†”ëŁšì…˜ìŠˆ 아킀텍튞 AI/ML 엑슀퍌튞, AWS::AWS AIML 슀페셜 웚ëč„나
ë§ˆìŽíŹëĄœ 서ëč„슀넌 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
OpenAPI 3.0, And What It Means for the Future of Swagger

What's hot (20)

PDF
Amazon SageMaker ëȘšëž 배포 ë°©ëȕ 소개::êč€ëŒ€ê·Œ, AI/ML ìŠ€íŽ˜ì…œëŠŹìŠ€íŠž ì†”ëŁšì…˜ìŠˆ 아킀텍튞, AWS::AWS AIML 슀페셜 웚ëč„나
PDF
Infrastructure & System Monitoring using Prometheus
PDF
닀양한 배포 êž°ëČ•êłŒ AWS에서 ê”Źì¶•í•˜ëŠ” CI/CD 파읎프띌읞 l 안횚ëčˆ ì†”ëŁšì…˜ìŠˆ 아킀텍튞
PDF
Keycloak SSO basics
PDF
Best Practices with Azure Kubernetes Services
PPTX
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWS
PDF
ëšžì‹ ëŸŹë‹ ë„ìš°ëŻž, Amazon SageMaker 따띌하Ʞ: SageMaker ꔭ낎 적용 ì‚ŹëĄ€
PDF
Amazon SageMaker ëȘšëž ëčŒë”© 파읎프띌읞 소개::읎유동, AI/ML ìŠ€íŽ˜ì…œëŠŹìŠ€íŠž ì†”ëŁšì…˜ìŠˆ 아킀텍튞, AWS::AWS AIML 슀...
PDF
Kubernetes
PPTX
Introduction to kubernetes
PPTX
Secure your app with keycloak
PDF
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
PDF
2020-02-20 - HashiCorpUserGroup Madring - Integrating HashiCorp Vault and Kub...
PPTX
Migrating on premises workload to azure sql database
PPTX
Vagrant
PDF
AWS Fargate와 Amazon ECS넌 ì‚Źìš©í•œ CI/CD ëČ ìŠ€íŠž 프랙티슀 - ìœ ìžŹì„, AWS ì†”ëŁšì…˜ìŠˆ 아킀텍튞 :: AWS Build...
PDF
Prometheus
PPTX
Architecture for the API-enterprise
PDF
ìčŽìčŽì˜€ êŽ‘êł  플랫폌 MSA 적용 ì‚ŹëĄ€ 및 API Gateway와 읞슝 ê”Źí˜„ì— 대한 소개
PDF
REST vs GraphQL
Amazon SageMaker ëȘšëž 배포 ë°©ëȕ 소개::êč€ëŒ€ê·Œ, AI/ML ìŠ€íŽ˜ì…œëŠŹìŠ€íŠž ì†”ëŁšì…˜ìŠˆ 아킀텍튞, AWS::AWS AIML 슀페셜 웚ëč„나
Infrastructure & System Monitoring using Prometheus
닀양한 배포 êž°ëČ•êłŒ AWS에서 ê”Źì¶•í•˜ëŠ” CI/CD 파읎프띌읞 l 안횚ëčˆ ì†”ëŁšì…˜ìŠˆ 아킀텍튞
Keycloak SSO basics
Best Practices with Azure Kubernetes Services
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWS
ëšžì‹ ëŸŹë‹ ë„ìš°ëŻž, Amazon SageMaker 따띌하Ʞ: SageMaker ꔭ낎 적용 ì‚ŹëĄ€
Amazon SageMaker ëȘšëž ëčŒë”© 파읎프띌읞 소개::읎유동, AI/ML ìŠ€íŽ˜ì…œëŠŹìŠ€íŠž ì†”ëŁšì…˜ìŠˆ 아킀텍튞, AWS::AWS AIML 슀...
Kubernetes
Introduction to kubernetes
Secure your app with keycloak
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
2020-02-20 - HashiCorpUserGroup Madring - Integrating HashiCorp Vault and Kub...
Migrating on premises workload to azure sql database
Vagrant
AWS Fargate와 Amazon ECS넌 ì‚Źìš©í•œ CI/CD ëČ ìŠ€íŠž 프랙티슀 - ìœ ìžŹì„, AWS ì†”ëŁšì…˜ìŠˆ 아킀텍튞 :: AWS Build...
Prometheus
Architecture for the API-enterprise
ìčŽìčŽì˜€ êŽ‘êł  플랫폌 MSA 적용 ì‚ŹëĄ€ 및 API Gateway와 읞슝 ê”Źí˜„ì— 대한 소개
REST vs GraphQL
Ad

Similar to Introducing Dapr.io - the open source personal assistant to microservices and other applications (Conclusion Code Cafe, april 2022) (12)

PPTX
Dapr: the glue to your microservices
PPTX
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
PPTX
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
PPTX
Dapr: distributed application runtime
PPTX
Dapr- Distributed Application Runtime
PPTX
Distributed Application Runtime (Dapr) - Azure Israel 2020
PDF
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
PPTX
DAPR - Distributed Application Runtime Presentation
PDF
2021 JCConf äœżç”šDapr簡挖JavaćŸźæœć‹™æ‡‰ç”šé–‹ç™Œ
PDF
Dapr: Dinosaur or Developer's Dream? (v1)
PPTX
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Dapr: the glue to your microservices
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Dapr: distributed application runtime
Dapr- Distributed Application Runtime
Distributed Application Runtime (Dapr) - Azure Israel 2020
Eugene Bova "Dapr (Distributed Application Runtime) in a Microservices Archit...
DAPR - Distributed Application Runtime Presentation
2021 JCConf äœżç”šDapr簡挖JavaćŸźæœć‹™æ‡‰ç”šé–‹ç™Œ
Dapr: Dinosaur or Developer's Dream? (v1)
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Ad

More from Lucas Jellema (20)

PPTX
Introduction to web application development with Vue (for absolute beginners)...
PPTX
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
PPTX
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
PPTX
Apache Superset - open source data exploration and visualization (Conclusion ...
PPTX
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
PPTX
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
PPTX
Op je vingers tellen... tot 1000!
PPTX
IoT - from prototype to enterprise platform (DigitalXchange 2022)
PPTX
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
PPTX
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
PPTX
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
PPTX
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
PPTX
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
PPTX
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
PPTX
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
PPTX
Tech Talks 101 - DevOps (jan 2022)
PPTX
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
PPTX
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
PPTX
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
PPTX
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...
Introduction to web application development with Vue (for absolute beginners)...
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Apache Superset - open source data exploration and visualization (Conclusion ...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Op je vingers tellen... tot 1000!
IoT - from prototype to enterprise platform (DigitalXchange 2022)
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Tech Talks 101 - DevOps (jan 2022)
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Software Engineering as the Next Level Up from Programming (Oracle Groundbrea...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Who Wants to Become an IT Architect? A Look at the Bigger Picture (Oracle Gro...

Recently uploaded (20)

PPT
Introduction Database Management System for Course Database
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Complete React Javascript Course Syllabus.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Digital Strategies for Manufacturing Companies
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Understanding Forklifts - TECH EHS Solution
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
System and Network Administraation Chapter 3
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Introduction Database Management System for Course Database
VVF-Customer-Presentation2025-Ver1.9.pptx
Complete React Javascript Course Syllabus.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Wondershare Filmora 15 Crack With Activation Key [2025
Digital Strategies for Manufacturing Companies
PTS Company Brochure 2025 (1).pdf.......
How Creative Agencies Leverage Project Management Software.pdf
ManageIQ - Sprint 268 Review - Slide Deck
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Understanding Forklifts - TECH EHS Solution
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
System and Network Administraation Chapter 3
How to Choose the Right IT Partner for Your Business in Malaysia
Design an Analysis of Algorithms II-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
Essential Infomation Tech presentation.pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...

Introducing Dapr.io - the open source personal assistant to microservices and other applications (Conclusion Code Cafe, april 2022)

  • 1. Classificatie: vertrouwelijk Introductie van Dapr – de open source personal assistant voor applicaties en microservices Conclusion Code CafĂ© – Maandag 4 april 2022 Lucas Jellema
  • 2. Classificatie: vertrouwelijk Demo Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices dapr run --app-id myapp --dapr-http-port 3500 http port 3500 myapp default-components.yaml Redis Zipkin tracing Zipkin Redis state store pubsub broker Redis state: redis pubsub: redis OpenTelemetry:
  • 3. Classificatie: vertrouwelijk Demo Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices curl -X POST -H "Content-Type: application/json" -d '[{ "key": "name", "value": "Bruce Wayne"}]' http://localhost:3500/v1.0/state/statestore http port 3500 myapp default-components.yaml Redis Zipkin tracing Zipkin Redis state store pubsub broker Redis statestore pubsub POST key: name value: Bruce Wayne
  • 4. Classificatie: vertrouwelijk Demo Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices curl -X POST -H "Content-Type: application/json" -d '[{ "key": "name", "value": "Bruce Wayne"}]' http://localhost:3500/v1.0/state/statestore http port 3500 myapp default-components.yaml Redis Zipkin tracing Zipkin Redis state store pubsub broker Redis statestore pubsub POST key: name value: Bruce Wayne key: name value: Bruce Wayne
  • 5. Classificatie: vertrouwelijk Demo Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices curl http://localhost:3500/v1.0/state/statestore/name http port 3500 myapp default-components.yaml Redis Zipkin tracing Zipkin Redis state store pubsub broker Redis statestore pubsub GET key: name value: Bruce Wayne
  • 6. Classificatie: vertrouwelijk Demo Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices curl http://localhost:3500/v1.0/state/statestore/name http port 3500 myapp default-components.yaml Redis Zipkin tracing Zipkin Redis state store pubsub broker Redis statestore pubsub GET key: name value: Bruce Wayne “Bruce Wayne”
  • 7. Classificatie: vertrouwelijk Demo Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices http myapp app-components.yaml Redis Zipkin tracing Zipkin Redis state store pubsub broker Redis My App Application http
  • 8. Classificatie: vertrouwelijk Hypothetical Demo Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices http myapp app-components.yaml Redis Zipkin tracing Zipkin Redis state store pubsub broker Redis My App Application MySQL database http
  • 9. Classificatie: vertrouwelijk The Microservice API HTTP REST/JSON Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices ”
  • 10. Classificatie: vertrouwelijk The Microservices Platform Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Runtime Platform API ” API ” API ” API ”
  • 11. Classificatie: vertrouwelijk The Microservices Platform Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices power cooling rack space physical real estate IAM Certificate Management Vulnerability Scanning Logging Monitoring Auditing Cloud Usage Analysis Resource Manager APIs Cloud Events Notifications Cloud Guard Tagging Search Serverless Functions Container engine API Gateway Load Balancer Container Registry Artifact Repository Job Scheduling Build & Deploy Pipelines Code Repository Web Application Firewall CDN Virtual Machines API ”
  • 12. Classificatie: vertrouwelijk The Microservices Platform Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices power cooling rack space physical real estate IAM Certificate Management Vulnerability Scanning Logging Monitoring Auditing Cloud Usage Analysis Resource Manager APIs Cloud Events Notifications Cloud Guard Tagging Search SQL Database Serverless Functions Container engine Vault API Gateway Load Balancer Message/ Event Broker Data Lake Container Registry Artifact Repository Job Scheduling Build & Deploy Pipelines NoSQL Database Data Cache Code Repository Web Application Firewall CDN Virtual Machines File Storage API ”
  • 13. Classificatie: vertrouwelijk The Microservices Platform Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices power cooling rack space physical real estate IAM Certificate Management Vulnerability Scanning Logging Monitoring Auditing Cloud Usage Analysis Resource Manager APIs Cloud Events Notifications Cloud Guard Tagging Search SQL Database Serverless Functions Container engine Vault API Gateway Load Balancer Message/ Event Broker Data Lake Container Registry Artifact Repository Job Scheduling Build & Deploy Pipelines NoSQL Database Data Cache Code Repository Web Application Firewall CDN Virtual Machines File Storage API ” Zipin
  • 14. Classificatie: vertrouwelijk What do most microservices do? ‱ Store and retrieve state ‱ Read runtime secrets and configuration values ‱ Publish “observability data” ‱ Subscribe to event topic and handle incoming events ‱ Publish events to event topic ‱ Interact with other microservices ‱ Invoke external services ‱ Run microservice specific business logic Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices This requires quite a bit of repetitive “plumbing” tied to specific technologies – not meaningful effort [from a business functionality perspective]
  • 16. Classificatie: vertrouwelijk Dapr ‱ Runtime ‱ Personal Assistant for Applications and Microservices ‱ Distributed Application Runtime ‱ Microservice architecture ‱ Decoupling Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
  • 17. Classificatie: vertrouwelijk Dapr.io ‱ Launched by Microsoft (2019) ‱ Application runtime framework – supporting cloud native and serverless ‱ Every application gets a uniform Personal Assistant that takes care of common tasks ‱ remember (take note and reproduce) ‱ keep log ‱ restrict access ‱ handle incoming ‱ route outgoing ‱ interact with other PAs (and their apps) Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Application Microservice or Monolith Personal Assistant (Dapr) Personal Assistant (Dapr) Personal Assistant (Dapr) Personal Assistant (Dapr) Personal Assistant (Dapr) Personal Assistant (Dapr)
  • 18. Classificatie: vertrouwelijk Dapr.io ‱ Personal Assistant is Dapr Side Car ‱ companion process or side car container in Kubernetes Pod Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices My App Dapr API HTTP/gRPC Application Dapr sidecar
  • 19. Classificatie: vertrouwelijk key value myApp-weapon "DeathStar" State management My App POST http://localhost:3500/v1.0/state/corpdb [{ "key": "weapon", "value": "DeathStar" }] Redis Cache
  • 20. Classificatie: vertrouwelijk State management My App key value myApp-weapon "DeathStar" Redis Cache GET http://localhost:3500/v1.0/state/corpdb/planet "DeathStar"
  • 21. Classificatie: vertrouwelijk State management My App key value myApp-weapon "DeathStar" Azure CosmosDB GET http://localhost:3500/v1.0/state/corpdb/planet "DeathStar"
  • 22. Classificatie: vertrouwelijk Dapr state API Save state POST /v1.0/state/corpdb Retrieve state GET /v1.0/state/corpdb/mystate Delete state DELETE /v1.0/state/corpdb/mystate Get bulk state POST /v1.0/state/corpdb/bulk Submit multiple state transactions POST /v1.0/state/corpdb/transaction corpdb-redis.yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: corpdb spec: type: state.redis version: v1 metadata: - name: redisHost value: redis-master.default.svc.cluster.local:6379 - name: redisPassword secretKeyRef: name: redis-secret key: redis-password
  • 23. Classificatie: vertrouwelijk Dapr state API Save state POST /v1.0/state/corpdb Retrieve state GET /v1.0/state/corpdb/mystate Delete state DELETE /v1.0/state/corpdb/mystate Get bulk state POST /v1.0/state/corpdb/bulk Submit multiple state transactions POST /v1.0/state/corpdb/transaction corpdb-cosmosdb.yaml apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: corpdb spec: type: state.azure.cosmosdb version: v1 metadata: - name: url value: corpdb.documents.azure.com - name: masterKey secretKeyRef: name: master-key key: cosmos-key - name: database value: orders - name: collection value: processed
  • 24. Classificatie: vertrouwelijk HTTP API gRPC API Microservice building blocks Service- to-service invocation State management Publish and subscribe Resource bindings and triggers Actors Observability Secrets Extensible
  • 25. Classificatie: vertrouwelijk Standard APIs accessed over http/gRPC protocols from user service code Runs as local “side car library” dynamically loaded at runtime for each service HTTP API gRPC API Any language and framework Application code Microservices written in Any code or framework
 Service- to-service invocation State management Publish and subscribe Resource bindings and triggers Actors Observability Secrets Application Configuration
  • 26. Classificatie: vertrouwelijk HTTP API gRPC API Any cloud or edge infrastructure Application code Microservices written in Any code or framework
 Service- to-service invocation State management Publish and subscribe Resource bindings and triggers Actors Observability Secrets Application Configuration Hosting infrastructure On-Premises Azure Arc
  • 27. Classificatie: vertrouwelijk Dapr components My App Observability Prometheus AppInsights Jaeger Zipkin Bindings & Triggers State Stores Secret Stores PubSub Brokers
  • 28. Classificatie: vertrouwelijk Service invocation Service A My App mDNS Multicast DNS component for service discovery mTLS encryption POST http://localhost:3500/v1.0/invoke/servicea/method/neworder {"data":"Hello World"} POST http://10.0.0.2:8000/neworder {"data":"Hello World"}
  • 29. Classificatie: vertrouwelijk Publish and subscribe Service B My App Redis Cache Service A POST http://localhost:3500/v1.0/publish/orders/processed {"data":"Hello World"} POST http://10.0.0.2:8000/orders http://10.0.0.4:8000/factory/orders {"data":"Hello World"}
  • 30. Classificatie: vertrouwelijk Input triggers My App Twitter POST http://10.0.0.2:8000/newtweet {"data":“📱 We are excited to announce the 
"}
  • 31. Classificatie: vertrouwelijk Output bindings My App Twilio POST http://localhost:3500/v1.0/bindings/twilio {"data":"Hello World"} Hello World
  • 33. Classificatie: vertrouwelijk Host/Pod Stateful, objects of storage and compute Dapr Actor features: Distribution and failover Turn-based concurrency State management Timers Reminders Host/Pod Video Game Enemy Virtually identical to Service Fabric Reliable Actors Virtual actors
  • 34. Classificatie: vertrouwelijk Actor A Actor C My Actor Pod 1 Actor B Actor F Actor E Actor G Virtual actors My App POST http://localhost:3500/v1.0/actors/MyActor/A/method/update {"speed":"1"} Dapr actor placement service Placement Actor Z Actor X My Actor Pod 2 Actor Y Actor U Actor V Actor T
  • 35. Classificatie: vertrouwelijk Observability OpenTelemetry collector Logging & tracing extensions My App Redis Cache Twitter Service B Service A
  • 36. Classificatie: vertrouwelijk Metrics Dapr Metrics features: Call latency CPU/memory usage Error rates Sidecar injection failures System health Built-in monitoring capabilities to understand the behavior of the Dapr sidecar and system services
  • 37. Classificatie: vertrouwelijk Application Configuration Settings (preview) Centralized management of configuration settings such as endpoints, hostnames, filesystem locations, feature toggles. Applications can consume configuration values and subscribe to change events.
  • 38. Classificatie: vertrouwelijk Dapr hosting environments ‱ Get started with dapr init -k ‱ Fully managed Dapr control plane ‱ Deploys dashboard, placement, operator, sentry, and injector pods ‱ Automatically inject Dapr sidecar into all annotated pods ‱ Upgrade with dapr upgrade or Helm ‱ Get started with dapr init ‱ Easy setup with Docker images ‱ Sets up placement, Zipkin, Redis ‱ slim-init available without Docker ‱ Run any application with Dapr sidecar using dapr run Self-hosted
  • 39. Classificatie: vertrouwelijk Dapr in self-hosted Docker mode Local dev machine or virtual machine Zipkin tracing Zipkin Redis state store Redis My App State Stores PubSub Brokers Secret Stores Bindings & Triggers Observability Dapr Components dapr run myapp Use components Launch application Launch sidecar process Set env variables Save and retrieve state Publish and subscribe to messages Send distributed tracing
  • 40. Classificatie: vertrouwelijk Dapr in self-hosted Docker mode – add MySQL Database Local dev machine or virtual machine Zipkin tracing Zipkin MySQL database Redis state store Redis myotherapp dapr run --app-id myotherapp --dapr-http-port 3510 --components-path . Launch application Launch sidecar process Set env variables Save and retrieve state mysql-statestore.yaml
  • 41. Classificatie: vertrouwelijk Dapr on Kubernetes Any cloud or edge infrastructure Pod Actor partition placement Placement Pod Dapr runtime injector Injector Pod Cert authority and identity Sentry Pod Update component changes Operator Pod My App Kubelet Use components Inject Dapr sidecar into annotated pods Inject env variables Manage mTLS between services Assign spiffe identity Create mapping table of actor instances to pods Manage component updates Manage Kubernetes service endpoints Readiness and Liveness probe on healthz API to determine Dapr health state State Stores Pub/Sub Brokers Secret Stores Bindings & Triggers Observability Dapr Components Operator Deploys and manages Dapr
  • 42. Classificatie: vertrouwelijk Dapr and service meshes Service Mesh Operator Hosting infrastructure Application code Any code or framework
 Traffic splitting Traffic routing Distributed tracing Resiliency Metrics mTLS Service-to-service invocation State management Publish and subscribe Secrets Resource bindings and triggers Actors Developer
  • 43. Classificatie: vertrouwelijk Dapr and Node Applications ‱ HTTP (or gRPC) with Dapr SideCar ‱ easier yet: Node SDK for Dapr ‱ Leverage Dapr and its building blocks for ‱ simple state management ‱ simple publication of messages ‱ subscription to incoming messages ‱ retrieving secrets ‱ retrieving configuration data ‱ invoking external services (database, message broker, store, API) ‱ register as listener to inbound requests and messages for external services ‱ decoupled interaction between microservices – implemented in potentially very different languages Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices components.yaml sidecar (the personal assistant) Node SDK for Dapr Observability Prometheus AppInsights Jaeger Zipkin Bindings & Triggers GCP Storage AWS S3 Kafka Azure Storage Twilio State Stores Firebase Cassandra Redis Azure CosmosDB AWS DynamoDB Secret Stores AWS Secrets Manager Azure KeyVault GCP Secret Manager HashiCorp Vault Kubernetes Secret PubSub Brokers Redis AWS SQS Azure Service Bus RabbitMQ GCP Pub/Sub
  • 44. Classificatie: vertrouwelijk Observability Prometheus AppInsights Jaeger Zipkin Bindings & Triggers State Stores Secret Stores PubSub Brokers Dapr Architecture Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Dapr main state store interface pub/sub interface binding interface secret interface register all components (per type) observable interface do something for me – store or retrieve state, subscribe to topic (and callback with messages), invoke service, retrieve secret components.yaml
  • 45. Classificatie: vertrouwelijk State Management with Dapr from Node application Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices sidecar (the personal assistant) Node SDK for Dapr State Store components set & get state components.yaml State Stores state store interface
  • 46. Classificatie: vertrouwelijk State Management with Dapr from Node application Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices sidecar (the personal assistant) Node SDK for Dapr State Store components set & get state components.yaml State Stores state store interface connect to sidecar retrieve state setstate
  • 47. Classificatie: vertrouwelijk State Management with Dapr from Node application - switch to MySQL state store with configuration change Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices sidecar (the personal assistant) Node SDK for Dapr State Store components set & get state components.yaml State Stores state store interface connect to sidecar retrieve state setstate
  • 48. Classificatie: vertrouwelijk State Management with Dapr from any application - either through SDK or using HTTP or gRPC Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices sidecar (the personal assistant) SDK for Dapr State Store components set & get state components.yaml State Stores state store interface
  • 49. Classificatie: vertrouwelijk Pub/Sub with Dapr from Node applications Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices sidecar (the personal assistant) Node SDK for Dapr Pub/Sub components publish message components.yaml PubSub Brokers pub/sub interface Node SDK for Dapr components.yaml subscribe on topic with handler function message sent to handler
  • 50. Classificatie: vertrouwelijk Pub/Sub with Dapr from Node applications Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices sidecar (the personal assistant) Node SDK for Dapr Pub/Sub components publish message components.yaml PubSub Brokers Node SDK for Dapr components.yaml subscribe on topic with handler function message sent to handler pub/sub interface publish message
  • 51. Classificatie: vertrouwelijk Pub/Sub with Dapr from Node applications Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices sidecar (the personal assistant) Node SDK for Dapr Pub/Sub components publish message ponents.yaml PubSub Brokers Node SDK for Dapr components.yaml pub/sub interface subscribe on topic message sent to handler
  • 52. Classificatie: vertrouwelijk Pub/Sub with Dapr from Node applications Replace Redis by Apache Kafka Microservices in real life – with Node & Dapr.io sidecar (the personal assistant) Node SDK for Dapr Pub/Sub components publish message to topic components.yaml PubSub Brokers pub/sub interface Node SDK for Dapr components.yaml subscribe on topic with handler function message sent to handler 9094 9093 9092 test-topic
  • 53. Classificatie: vertrouwelijk Asynchronous Interaction between Microservices Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Front App http State Stores PubSub Brokers Node App get get & set publish subscribe consume name = John
  • 54. Classificatie: vertrouwelijk Telemetry Observation in Zipkin Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices greeter http State Stores PubSub Brokers name-processor get get & set publish subscribe consume name = John Telemetry Data
  • 55. Classificatie: vertrouwelijk Telemetry Observation in Zipkin Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Telemetry Data Front App http State Stores PubSub Brokers Node App get get & set publish subscribe consume name = John
  • 56. Classificatie: vertrouwelijk Hands On In a Linux compatible environment with Docker CLI set up ‱ Download and Install Dapr.io ‱ with out of the box state management and pub/sub based on Redis and telemetry observation by Zipkin ‱ Run Dapr Sidecar ‱ Explore Dapr State Management APIs ‱ from the command line (cURL HTTP calls) ‱ Run MySQL container and have Dapr manage state in a MySQL database ‱ Explore Dapr Telemetry collection and presentation in Zipkin ‱ Explore Node and Dapr ‱ add state management to Node application – through Dapr sidecar ‱ implement pub/sub for Node applications – through Dapr sidecar ‱ realize asynchronous communication between Node based microservices through Daprized pub/sub ‱ Explore Telemetry for asynchronous interactions Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices
  • 57. Classificatie: vertrouwelijk Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices State Stores app.js get & set Node SDK for Dapr components.yaml dapr_host, dapr_http_port app_port key value John Monty 3 2 name, instance count Default, out of the box ?name=John Handson
  • 58. Classificatie: vertrouwelijk Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Handson SomeService Invoker SomeService echo Daprized Go application – has registered an invocation handler for operation echo Daprized Node application – asks its sidecar to invoke method echo on service SomeService mDNS Multicast DNS component for service discovery
  • 59. Classificatie: vertrouwelijk Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Handson SomeService Invoker SomeService echo Daprized Go application – has registered an invocation handler for operation calculate { x: 3.14159, y: 42, z: 2.71828 } mDNS Multicast DNS component for service discovery calculate { "outcome": 13618.131, "comment": "Greetings" } Local function complexCalculation invokes method calculate on remote service SomeService
  • 60. Classificatie: vertrouwelijk Code CafĂ© - 4 april 2022 - Dapr - Open Source Personal Assistant voor Microservices Handson SomeService echo Daprized Go application – has registered an invocation handler for operation echo OtherService Invoker Regular, NonDaprized Node application – asks SomeService’s sidecar to invoke method echo – calling the gRPC port of that sidecar

Editor's Notes

  • #57: https://github.com/lucasjellema/fontys-2022-microservices-kafka-dapr