Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.

Follow @CodeOpinion


CQRS without Multiple Data Sources

One of the most common misconceptions about CQRS is it implies Eventual Consistency. That you must have different data sources for your commands and queries. Meaning you will have a use one data source for commands/writes and an entirely different data source for query/reads. This is simply untrue. This assumption implies that you’re query/read data source will be eventually consistent with the command/write side. This is because the assumption is your commands will write to its data source, then emit events that will be processed and update your query/read database independently. If you’re unfamiliar with CQRS, I highly recommend checking… Read More »CQRS without Multiple Data Sources

Practical ASP.NET Core SignalR: Scaling

In this section, I’m going to cover how to deal with scaling SignalR when in a server farm behind a load balancer. Typically to scale we would introduce a load balancer and additional instances of our application. Introducing multiple instances of our application with SignlaR behind a load balancer is a problem because SignalR keeps track of connected clients in each instance. This blog post is apart of a course that is a complete step-by-setup guide on how to build real-time web applications using ASP.NET Core SignalR. By the end of this course, you’ll be able to build real-world, scalable, production… Read More »Practical ASP.NET Core SignalR: Scaling

Azure Cosmos DB Caching Tips

I’ve started to use Azure Cosmos DB a bit more over the last couple weeks and I’m really enjoying it.  The first real world scenario that I hit was needing to implement optimistic concurrency. This led me straight into I discovered two caching optimizations you can make for better performance accessing individual documents. Caching SelfLinks If you are using the .NET SDK, each document contains a unique SelfLink property.  This is represented by the _self property in the JSON. View the code on Gist. They are guaranteed to be unique and most importantly immutable. Because the SelfLink is immutable we… Read More »Azure Cosmos DB Caching Tips