What is Dapr (Distributed Application Runtime)

Image from Dapr Documentation, Dapr team, available at https://docs.dapr.io/concepts/overview/. Accessed on 1–29–2024.

Enter Dapr (Distributed Application Runtime), a game-changing tool designed to make building distributed applications easier and more intuitive. It’s a platform that says ‘yes’ to any language and any framework, aiming to work everywhere — from the vast public cloud to compact IoT devices. Born from real-world challenges observed in Microsoft Azure, Dapr is a treasure trove of best practices for both new and existing microservice applications.

Dapr stands out with its sidecar architecture, a system that brings high-level distributed capabilities into an easy-to-use format, accessible through simple HTTP or gRPC calls. It’s packed with features like state management, service communication, pub/sub messaging, and external integrations, all built on a flexible model that eases the development process.

Take a service that needs to manage State, instead of writing bespoke code for a specific store like Redis Cache, Dapr steps in with ready-to-use state management. Services interact with the Dapr state management component, which is flexibly linked to various state stores through configuration files. This versatility means you can switch from Redis to MySQL or Cassandra without altering your service’s code.

Dapr isn’t just for one language: it offers SDKs for Go, Node.js, Python, .NET, Java, and JavaScript, with the Dapr .NET SDK providing extra features for ASP.NET Core. Even without these SDKs, any language can use Dapr’s capabilities through HTTP or gRPC protocols.

The core of Dapr consists of building blocks, each representing a key distributed system feature:

State Management: Manages state in long-running services.
Service Invocation: Enables secure, platform-independent service-to-service communication.
Publish and Subscribe: Facilitates scalable messaging among services.
Bindings: Allows services to react to external events.
Observability: Provides monitoring for services across a network.
Secrets: Grants access to secure secret storage.
Actors: Offers a pattern for encapsulating data and logic.

These building blocks abstract away the complexities, allowing developers to focus on building robust, scalable services.

--

--

Alfred Nana Brown
Dapr (Distributed Application Runtime) Series

Over 12 years of excellence in leading teams and applying DevOps and SDLC best practices to architect scalable and fault-tolerant infrastructure solutions.