EvenireDB part 1: what and why?

EvenireDB part 1: what and why?

I have quite a fascination for Event Sourcing. Not sure why this pattern got my attention a while ago, but since then I’ve been using it at work (whenever possible and meaningful) and for some personal projects too. I have also been blogging about it for some time, as some...

2 minute read
Thread-safety on MemoryCache

Thread-safety on MemoryCache

I have been using the in-memory cache library in a pet project lately and I stumbled on an interesting problem. Are we 100% sure that this class is completely thread safe? Let me clarify a bit. Most of the times, we use a cache as first layer before turning to...

2 minute read
Handling long-running operations in a .NET Background Service

Handling long-running operations in a .NET Background Service

I have seen few articles around about how to execute long-running tasks in a BackgroundService and most of them do the same mistake. The code looks more or less like this: public class MyWorker : BackgroundService { protected override async Task ExecuteAsync(CancellationToken cancellationToken) { while(!cancellationToken.IsCancellationRequested) { await DoSomethingAsync(); } }...

2 minute read
Are design patterns dead? The Singleton problem

Are design patterns dead? The Singleton problem

Today we’ll talk about another Design Pattern: the Singleton. I’m pretty much sure everyone knows what I am talking about, but just to be sure, let’s do a quick recap. The Singleton pattern guarantees that there is only one instance of a class throughout the application. This can be beneficial...

5 minute read
Buy Me A Coffee