All writings 路 tech 路 Opensource

Dapr

馃敆Dapr

Dapr is an event-driven, distributed runtime that makes it easy for developers to develop applications that are resilient, stateless/stateful (without being an expert in distributed systems) that can run on cloud as well as edge.

Dapr follows the sidecar pattern and provides APIs that implemented keeping best practices in mind for building micro-services in form of Building Blocks

Microservice building for cloud and edge are shown below (and growing :))

Image of Building Blocks of Dapr

My work

TLDR

I wrote metrics for Dapr Workflow Building Block 鈫楋笍.

The Issue

I worked on implementing metrics for the Dapr Workflow Building Block .This helped Dapr users to track the overall traffic and health of their applications (workflows).

To fully understand the issue I worked on, check this Issue link.

I am very proud of this contribution since I got to be one of the enablers for making Dapr more stable.

The Solution

For the solution, I wrote custom metrics using Open Census. To be precise, I implemented the following metrics:

To deliver a complete solution, I also wrote tests for the implementation that had 92% coverage in the initial implementation.

Things I learnt about

Here is the Link to the Pull Request

Actor Model

The 馃敆Dapr project has the 馃敆Actor Model at it's core. I got to learn the implementation of the Actor pattern, how it works and how to implement it. I came across amazing resources from senior engineers at Microsoft that explained the conceptual knowledge perfectly. One of them is this YouTube Video

Workflow Engine

This is the internal implementation that manages the overall execution of a Dapr workflow analysing the events, status updates and even emitting metrics.

It also performs the task of scheduling the execution and re-scheduling in case of the event of a failure.

The in-depth explanation of the workflow engine will be in a different section.

I leant in depth how to work with concurrency in Go. I learnt how to work with time, sync, Marshalling/Un-Marshalling data and Durable tasks etc.


Originally published at prateeksingh.life/writings/tech/opensource/dapr. Save to Instapaper.