7. About Moaid Hathot
7
Senior software Engineer @ Microsoft
Ex-Azure MVP
Code Jedi & Software Architect
Software Craftsmanship advocate
Clean Coder
Co-Founder of Code.Digest();
https://meetup.com/Code-Digest
Co-Founder of ILDC’s .NET Bond
Moaid Hathot
8. Microservices – solutions
Serverless architecture
Azure Functions & AWS Lambada
Stateless, event-driven microservices
Virtual Actor model
Object-oriented microservices
E.g Microsoft Orleans
The cloud takes care of
Activating, retries, scaling, failure handling
8
9. Microservices – solution issues
Coupled to Stack
Coupled to cloud providers
A single application depends on multiple SDKs
FaaS and Actor integration can be complicated
FaaS runtimes can be heavy
9
11. Dapr
Portable, Event-driven runtime for building microservices
Open Source
https://github.com/dapr/dapr
19.2K Github stars
197 contributors
1.5K forks
Alpha phase
11
12. Dapr
Supports any platform
Services knows only HTTP/gRPC
Can decide to use dedicated SDKs
Services are not aware of the actual technologies
Services are not aware of other services
Everything is configurable via yaml files
E.g you can switch from Cosmos DB to DynamoDB
12
13. Dapr
Sidecar architecture
Dapr is isolated via Process or Container from your app
Two hosting modes
Self-hosting
Kubernetes
13
29. Dapr – Service Invocation
Every service has an id (name)
Calling services must know that id
HTTP or gRPC
Takes care of
Discoverability
Reliability
Retries
Failure handling
30
39. Dapr – State Management
The actual store is not known to services
Support for many platforms, including:
Redis
AWS DynamoDB
Azure Cosmos DB
MongoDB
Cassandra
SQL Server
More…
Easy to implement new state store
40
56. Dapr – Resource Bindings
Input/Output with cloud resources
Similar in concepts to Azure Function’s Binding
Trigger your service or invoke external systems
Takes care of connections, polling, queuing, etc…
Benefits
Focus on Business logic
Your code is free from SDKs and libraries
Auto handling for retries & failure recovery
Switch bindings at run time
Deploy to different environments without code changes
57
68. Dapr – Virtual Actors
The Actor Model
Self-contained unit of code (actor)
Actors interacts using via messages
The runtime manages how, when and where each actor runs
Dapr implements the Virtual Actors Model
Takes care of
Lifetime
Retries
Failover
Concurrency
69
69. summary
Microservices has many benefits
But also, challenges
Dapr
Runtime for building microservices
Any platform, any stack, any environment
Takes care of a lot of the challenges
Open Source
Community
Demo repo:
https://github.com/MoaidHathot/Azure-Israel-Dapr-2020
70