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

Derek Comartin

CAP: Event Bus & Outbox Pattern

If you’re thinking of building or already are implementing a system using async messaging (SOA or Microservices) then you need to start thinking about what type of messaging library you want to use in front of a message broker. CAP is an Event Bus that implements the Outbox Pattern to deal with distributed transactions. YouTube I did a live stream exploring CAP that is over on my YouTube Channel. Distributed Transaction When you’re using messages (events) to communicate between systems you will run into the situation where you need to save data to your database, then publish an event to… Read More »CAP: Event Bus & Outbox Pattern

Configuring Errors and Warnings in C#

I recently stumbled upon some code that was making an awaitable method call but was not being awaited. I noticed the issue because it was a compiler warning CS4014 and was highlighted in code. I immediately fixed the issue, however, my second action was configuring errors and warnings in C#. YouTube Make sure to check out my YouTube channel where I often post related content that accompanies my blog posts. WarningAsError You can have a .NET build fail by having the compitler producing errors for normally what are considered warnings. Such as as CS4014 Because this call is not awaited,… Read More »Configuring Errors and Warnings in C#

Roundup #72: Succinct C#, IHostedService Shutdown Timeout, try-convert, Coupling, Cohesion, and Microservices

Writing More Succinct C# When looking at a lot of C# code nowadays, I find myself thinking “wow, that code could be made SO MUCH SMALLER!”. C# is a very flexible language, allowing you to write clean and functional code, but also very bloated code. Link: https://www.danclarke.com/2020-more-succinct-csharp Extending the shutdown timeout setting to ensure graceful IHostedService shutdown I was seeing an issue recently where our application wasn’t running the StopAsync method in our IHostedService implementations when the app was shutting down. It turns out that this was due to some services taking too long to respond to the shutdown signal. In this post I show… Read More »Roundup #72: Succinct C#, IHostedService Shutdown Timeout, try-convert, Coupling, Cohesion, and Microservices