Introduction: Binary search is one of the most important algorithms for competitive programming. You may find other uses of binary search too, these are just a few topics mentioned that use binary search heavily: 1. Array problems 2. Geometry problems Let me give you a real-life example, imagine you walked into a room with some […]
The decorator design pattern is a structural design pattern that is used for extending the functionality of existing classes without much of a change in the codebase. You can also look at this design pattern as a wrapper around the existing functionality. Let’s dive into the example which will make things much clearer. We have […]
Load balancing is defined as the methodical and efficient distribution of requests across multiple servers. The load balancer sits between client devices and backend servers, receiving and then distributing incoming requests to a server that is healthy and capable of fulfilling them. A load balancer is a critical component of any distributed system as it helps improve the services offered by increasing availability and responsiveness. As it distributes the traffic across multiple servers, it also helps us avoid a single point of failure.
Today’s technical architecture is inclined towards the distributed system because of the ease of scalability it provides. This scenario demands that we understand the trade-offs made in a distributed architecture, which brings us to the CAP theorem. Let’s begin right away but putting on our thinking caps!
So what is a singleton? In a simpleton’s language, a singleton is a class that will be instantiated only once. This essentially means that there will be only one instance of the Java class in the Java Virtual Machine (JVM). The singleton was initially proposed by the famous Gang of Four in their design patterns. […]