Dapr is a free and open-source sub-system for distributed applications that simplifies development by offloading Service Invocation, Publish and Subscribe, Secret Management, Input/Output Bindings, State Management, and Virtual Actors as a sidecar pattern.
The Distributed Application Runtime (Dapr) is free and open-source under MIT Licence. It is written in Go, with various supported SDKs for Java, .NET, Python, etc. Dapr is sponsored by Microsoft (with close collaboration from customers and the open-source community).
Dapr joined Cloud Native Computing Foundation as an incubating project. Dapr is truly (cloud) technology agnostic, most of the code may come from Microsoft, but AWS, Google Cloud, and other 3rd party technologies are first-class citizens.
What is Dapr?
The worst thing about Dapr is that it is tough to explain what Dapr is. In my opinion, the official website does not help that much. The site focuses on everything Dapr can do and not on the base premise - offloading boring and repetitive work to the sidecar for distributed architectures.
The landing page of the official website reminds me of the early days of Steve Ballmer's Microsoft.
Dapr is divided into a few core blocks that you can use independently. Dapr (at the moment) provides the following core building blocks:
- Service Invocation - Make service to service calls.
- State Management - Manage stateless and stateful services.
- Publish & Subscribe - Messaging
- Input/Output Bindings - Triggers from an extensive array of inputs and output bindings to external resources.
- Virtual Actors - Actor model
- Secret Management - Access secrets
- Configuration - Configuration API that enables retrieval of application configuration items
Use all, or just one. It's up to the developers. Dapr building blocks are called by HTTP or gRPC calls directly or through one provided library.
Going through the details of each building block is too much for this text. But the basic idea behind every building block is to abstract one problem, make it simple to use, and make it changeable to any technology and cloud provider by simply changing the configuration.