One of the things to watch out for when working with DI Containers is being aware of the Dependency Graph. One of the more dangerous types is where you expect a particular object to exist once during an entire HTTP Request lifecycle, but it starts behaving like a singleton.
There are times when we want to be able to consistently add a behaviour across our
ASP.NET Coreapp that doesn’t quite belong in application logic – a classic example is timing how long a request takes. This is where Filters come in (or Middleware, but that’s for another post).
Sometimes, there are cases when we need a Search Solution for a hobby project but don’t want to spend extra time and money in having a
Luceneor some other form of abstraction of
Lucene, such as
ElasticSearch. If you’re working with
MySQL(or even better, with
Postgres), then you’re in luck – there’s a way to have a quick and dirty search solution for your dear project.
The concept of concurrency is not an easy concept to grasp, when dealing with concurrency – the main enemy when doing any task in parallel are shared resources. This is why functional programming as a concept has gotten a lot of attention due to it’s potential in this modern age where there is an abundant amount of CPU core’s, making it much more scalable for parallel computing.
What about the
Object Oriented Approach? well, we’ve been dealing with concurrency problems for quite some time, and in
.NET, we have the we have the
Task Parallel Library(TPL). TPL makes concurrency patterns easier to implement. Let’s have a look at one of the most common problems in concurrency – race conditions.