Apr 11, 2021 · 10 min read
In this series: Development environment and Event producer Event consumer Azure Event Hubs integration (this article) Azure Event Hubs is a horizontally scalable event ingestion service capable of receiving and processing millions of events per second. It supports Apache Kafka Producer and Consumer API that you can use as an alternative to running a self-managed Apache Kafka cluster. Now you can integrate the Kafka ecosystem applications such as Kafdrop and many others with Event Hubs.
Apr 04, 2021 · 8 min read
In this series: Development environment and Event producer Event consumer (this article) Azure Event Hubs integration Let’s carry our discussion forward and implement a consumer of the events published by the Employee service to the leave-applications Kafka topic. We will extend the application that we developed earlier to add two new services to demonstrate how Kafka consumers work: Manager service and Result reader service. Source Code The complete source code of the application and other artifacts is available in my GitHub repository.
Mar 29, 2021 · 12 min read
In this series: Development environment and Event producer (this article) Event consumer Azure Event Hubs integration An event-driven architecture utilizes events to trigger and communicate between microservices. An event is a change in the service’s state, such as an item being added to the shopping cart. When an event occurs, the service produces an event notification which is a packet of information about the event. The architecture consists of an event producer, an event router, and an event consumer.
Mar 15, 2021 · 11 min read
Since I wrote my first GraphQL post in 2019, much has changed with GraphQL in the .NET space. The ongoing changes have also affected most of the documentation available online. This article will walk you through the steps to create a basic GraphQL API on ASP.NET Core using GraphQL for .NET, Entity Framework Core, Autofac, and the Repository design pattern. I chose the tech stack for the sample application based on the popularity of the frameworks and patterns.
Feb 18, 2021 · 6 min read
I prefer using GraphQL over REST APIs wherever available, primarily because I can avoid overfetching and underfetching data while still enjoying the benefits of contract-based development. For this exercise, assume that you are the DevOps lead of an organization/open-source community that uses GitHub to manage its projects under a GitHub Organization. GitHub Organizations are shared accounts consisting of members and projects with sophisticated security and administrative features. You have been asked to ensure that your organization’s repositories are healthy such that there are no PRs in an unmerged state for more than one week, and every issue is either resolved or updated in 12 hours.
Feb 03, 2021 · 11 min read
Imagine running a .NET Core application in Kubernetes, which suddenly starts being sluggish, and the telemetry fails to give you a complete picture of the issue. To remediate performance issues of applications, starting with .NET Core 3, Microsoft introduced several .NET Core runtime diagnostics tools to diagnose application issues. dotnet-counters to view Performance Counters. dotnet-dump to capture and analyze Dumps. dotnet-trace to capture runtime events and sample CPU stacks. dotnet-gcdump to collect Garbage Collector dumps of application.
Jan 02, 2021 · 10 min read
In many event-driven applications, preserving the sequence of events is essential. For example, an event-driven eCommerce application might have the following states, transitions, and events. A user adds N items to the basket. This action generates the item added event. The user checks out the basket. This action generates the basket checked out event. The user pays for the items. This action generates the payment made event. Inventory decrements the count of available items by N.
Oct 24, 2020 · 9 min read
Many microservices applications require background tasks and scheduled jobs to process requests asynchronously. In the .NET Core ecosystem, background services are called Hosted services because a single host, such as a web host or a console host, can run several such services in the background while it is alive. In terms of implementation, a hosted service is required to implement the IHostedService interface. You can implement the IHostedService interface yourself, or even better, leverage the BackgroundService class that implements some common concerns such as cancellation token management and error propagation to the host for you.
Oct 01, 2020 · 6 min read
The default implementation of the gRPC on .NET - Grpc.net is built on Grpc.Core which uses the protoc tool (see: ProtoCompilerOutput) to generate C# artifacts from .proto files. Also, it adds complexity to testing the services and sharing the contracts with clients. The proto files are artifacts/files shared between the clients and the server that need to be managed and kept synced between the two parties. It is important to note that protobuf is simply a serialization format, and it is not dependent on proto files.
Jun 20, 2020 · 17 min read
I want to stretch every dollar that I spend on the cloud. I run a handful of web applications on Heroku, and like everyone else, run a suite of smoke tests and load tests on every release increment in a non-production environment. Load tests are important: they help us not only to understand the limits of our systems but also bring up issues that arise due to concurrency, which often escape the realms of unit tests and integration tests.