Nowadays, for almost all services, we would like to set up at least poor man’s HA. This means we would have more than one node/server/pod at a time. This is great for load balancing and availability purposes. Nevertheless, there’s a simple problem with this setup. What if you want to execute a piece of code in only one node? We can do this via a simple mutual…
Leave a CommentTag: spring
Spring cache abstraction applies caching to the Java methods. It provides an environment where we can cache the result for the methods we choose. By doing so, it improves the performance of the methods by avoiding multiple execution of the methods for the same object. Note that this type of caching can be applied to the methods which return the same result for the same input. In…
Leave a CommentDependency injection is about removing the hard coded dependencies and providing way of changing dependencies in compile-time or run-time. This pattern has been exercised in several frameworks like Spring(Java). It is also becoming popular in JavaScript community. There are libraries that support dependency injection like Angular.js, Require.js, Inject.js and more. Following recent developments, we will present what is dependency injection, its advantages and simple implementation of this…
4 Comments