Introduction
Building enterprise-grade applications that should communicate with various other services and contain multiple building blocks are one of the most common things today. Usually, those applications are part of some bigger distributed systems and should be built by multiple teams where each team focuses on a certain building block. Keeping the solution clean, easy to track, understand, update troubleshoot, and manageable should be one of the top priorities.
However, this is not such an easy task to do due to the different options and tools to achieve anything that you want to inside of your applications such as service discovery, secret management, publish/subscribe, state stores, service-to-service invocation, and more. Another thing is how these options will combine, play together, and connect different dots in a solution, on which platform should they be running, what programming Languages will be used to build them, and what Runtimes and SDKs will be used. How easy it will be to change something in the future?
Dapr
This is where Dapr, the “Distributed application Runtime” comes into play.
Dapr is an open-source platform, infrastructure, and language-agnostic runtime that provides portable, event-driven runtime for building distributed applications that abstract some of the most common tasks that developers didn’t have to go through.
Focus on building applications and not infrastructure
When building distributed applications traditionally there is a lot of different boilerplate code for handling different kinds of infrastructure connections (cloud or edge) and usually, there is a need to make some changes.
With Dapr all of this code is cleaned up and encapsulated around industry best-practices building blocks abstractions that are extensible, pluggable, and portable.
Dapr core building blocks are:
- Service-to-service Invocation
- State Management
- Publish&Subscribe
- Bindings (Input/Output)
- Actors
- Observability
- Secrets
Each building block is defined in a declarative file independent of the application and can establish a connection with different services such as different kinds of Databases, Message Brokers, External HTTP/Grpc services, Application Secrets, Monitoring tools, etc that can be changed at any time without impacting the application code and business logic.
Building blocks can be used independently from one another and added to the solution at any time which enables the code to be simple, and clean and enables developers to focus on the business logic.
Dapr setup
Setting up Dapr is very easy and can be done quickly. All that should be done is to install Dapr Runtime and define the Dapr building blocks declarative files. After all that is done, Dapr runtime should be set up to run as a sidecar container to your application.
Conclusion
Bringing additional value by focusing more on our client’s business needs is one of ⋮IWConnect core values.
By letting Dapr take care of the complex challenges such as service discovery, encryption, observability, secret management, bindings, state management the developers can focus much more on business logic, keep the code clean and simple, be much more productive and not worry at all about the infrastructure’s underline components.