5. La necesidad de soportar muchos
puntos de integración
diferentes(cache, message
queues, 3rd party APIs, secret
stores)
Muchos puntos diferentes para
soportar el tracing, la
configuración y la administración
de secretos
¿Que es lo difícil acerca
de los microservicios?
Esto da como resultado el
acoplamiento en el código.
Acoplado a un servicio específico
y a un SDK
7. HTTP API gRPC API
Service-
to-service
invocation
State
management
Publish
and
subscribe
Resource
bindings
and triggers
Actors Observability Secrets Extensible
Microservice building blocks
9. State stores
Publish & subscribe
Bindings
Scanning
for events
Messaging
Load and
save state
Input/output
Sidecars and
components
Dapr API
Dapr API
Service
code B
Service
code A
Application
Sidecar Sidecar
Secure communication with mTLS
Tracing, logs
and metrics
Tracing, logs
and metrics
Observability
Prometheus AppInsightts Jaeger
Capturing, querying
traces, logs and metrics
10. Standard APIs accessed over http/gRPC protocols from user
service code
http://localhost:3500/v1.0/invoke/cart/method/neworder
http://localhost:3500/v1.0/state/inventory/item67
Runs as local “side car library” dynamically loaded at
runtime for each service
HTTP API gRPC API
Microservice building blocks
Service-
to-service
invocation
State
management
Publish
and
subscribe
Resource
bindings
and triggers
Actors Observability Secrets Extensible
Application code
Microservices written in
Any code or framework…
11. 71 Dapr Components
18 State stores
Redis Streams
Apache Kafka
AWS SNS/SQS
Azure Events Hub
Azure Service Bus
GCP Pub/Sub
Hazelcast
MQTT
NATS streaming
Pulsar
RabbitMQ
Aerospike
Cassandra
Cloudstate
Couchbase
etcd
Hashicorp Consul
Hazelcast
Memcached
MongoDB
PostgreSQL
RethinkDB
Redis
Zookeeper
Azure CosmosDB
Azure SQL Server
Azure Table Storage
Azure Blob Storage
Google Cloud Firestore
Azure Key Vault secret store
Azure Key Vault with Kubernetes MI
AWS Secrets Manager
GCP Secret Manager
HashiCorp Vault
Kubernetes Secrets
Local environment variables (for Development)
Local file (for Development)
APNs
Cron (Scheduler)
HTTP
InfluxDB
Kafka
Kubernetes Events
MQTT
PostgreSql
RabbitMQ
Redis
Twilio
Twitter
SendGrid
AWS DynamoDB
AWS S3
AWS SNS
AWS SQS
AWS Kinesis
GCP Cloud Pub/Sub
GCP Storage Bucket
Azure Blob Storage
Azure EventHubs
Azure CosmosDB
Azure Service Bus Queues
Azure SignalR
Azure Storage Queues
Azure Event Grid
OAuth2
Open Policy Agent (OPA)
Rate limit
Bearer
Kubernetes
Multicast DNS
Blob Storage
14. Kubernetes (K8S)
Kubernetes is an open-source
container-orchestration
system for automating
computer application
deployment, scaling, and
management
15. Azure Kubernetes Service o AKS
• Actualizaciones y parches
automáticos
• Alta disponibilidad
• Escalación de clúster fácil
y segura
• Autorrecuperación
• Supervisión de API
Server
APIServer
Administradorde
controlador
Programador
Tienda
etcd
Controladorde
nube
Nodo(s)maestro(s)auto-administrado(s)
Workernodes
Definiciónde
aplicación/carg
adetrabajo
Usuario
Docker
Pods
Docker
Pods
Docker
Pods
Docker
Pods
Docker
Pods
Programarpodsportúnel
privado
Puntode
conexióndeAPI
deKubernetes
AzureManagedControlPlane
16. Pod
C O N T A I N E R
Python code
C O N T A I N E R
Dapr
Runtime
Dapr API
HTTP or gRPC
Send updates on
state binding
changes (gRPC)
Injects Dapr sidecar container
Pod
C O N T A I N E R
Node code
C O N T A I N E R
Dapr
Runtime
Dapr API
HTTP or gRPC
Python generated items
State
stores
State management
Deploys
and
manages
Dapr
Pod
C O N T A I N E R
Dapr
Operator
Sidecar-injector
Pod
C O N T A I N E R
Dapr
Operator
17. How Dapr is run
Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
labels:
app: my-app
spec:
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
annotations:
dapr.io/enabled: "true"
dapr.io/app-id: "my-appr"
dapr.io/app-protocol: ”http"
dapr.io/app-port: ”8080”
…
Standalone (self-hosted)
dapr run --app-id my-app
--app-protocol grpc
--app-port 50105
--components-path ./config
go run main.go
dapr run --app-id my-app
--app-protocol http
--app-port 3000
--components-path ./config
dotnet run
dapr run --app-id my-app
--app-protocol http
--app-port 5678
--components-path ./config
./my-exe