by Dhanji Prasanna
Concurrency is increasingly a very important aspect of modern applications. As we scale to higher levels of traffic and demand, there is a greater need for multiple concurrent threads of execution. As such, the role of objects managed by the dependency injector is extremely important. Singletons are a particularly significant example of this need.
In a large web application handling several hundreds of a requests per minute, a poorly designed singleton can be a serious bottleneck. It introduces ceilings on concurrent performance, and can even render the application unscalable under certain conditions.
Mutability is an essential variable in this problem. Some pitfalls are contained within the idea of immutability, too, so let’s explore exactly what it means to be immutable. To change things up, this article looks at a series of puzzles.
Full Story
Source: Concurrency


