Implementing Dapr Pub/Sub in ASP.NET Core Web APIs

Implementing Dapr Pub/Sub functionality to ASP.NET Core Web APIs

In event-driven architectures, communicating between different microservices via messages can be enabled using Publish and Subscribe functionality (Pub/Sub for short). The publisher (or producer) writes messages to a message topic (or queue), while a subscriber will subscribe to that particular topic and receives the message. Both the publisher and subscriber are unaware of which application either produced or subscribed to the topic. This pattern is useful when we want to send messages to different services, while ensuring that they are decoupled from each other....

August 15, 2023 · 9 min · Will Velida
Building Simple Dapr Cron Jobs with ASP.NET Core Web APIs

Building Simple Dapr Cron Jobs with ASP.NET Core Web APIs

I’ve been thinking about migrating one of my side projects from Azure Functions to the Dapr framework to make it more portable. One of the most important components of this architecture is the ability to refresh an authentication token that enables each Function app to retrieve data from an external API. In an Azure Functions architecture, we can use timer triggers to perform scheduled jobs simply. The issue here is that Functions have an opinionated programming model....

June 19, 2023 · 5 min · Will Velida
Implementing Dapr State Management in ASP.NET Core Web APIs

Implementing Dapr State Management in ASP.NET Core Web APIs

In distributed architectures, we’ll usually have a number of independent stateless services that serve a purpose (set around a domain, such as ordering items, storing items in a catalog, handling authentication etc.) While services should strive to be stateless, there will be some services that need to track state in order to fufil a business operation or function. Dapr has a state management build block that simplifies state tracking and enables you to store state across a variety of data stores....

June 14, 2023 · 12 min · Will Velida
Azure Container Apps code with Dapr and ACA logo

Dapr Service Invocation with Azure Container Apps

I had a bit of time last week to do some Dapr learning, so I started to read the Dapr for .NET Developers e-book that’s available on our documentation (completely free by the way!). In one of the early chapters, the book outlines a tutorial that you can run locally to use service invocation to communicate between to two applications. Running locally is fairly straightforward, so I wanted to deploy the two applications as Container Apps, since it has support for Dapr in the platform....

November 6, 2022 · 8 min · Will Velida