#interviewPreparation

Microservices Design Principle: Resiliency

Resiliency design principle of mircroservices is all about making our software reliable and available and ensuring that if we do have any failures within our back‑end microservices, each service fails fast and there’s alternate functionality so that the user doesn’t face any disruption. Let’s discuss the various steps to develop a resilient system Design for […]

Microservices Design Principle: Resiliency Read More »

Microservices Design Principle: Domain-driven Cohesion

The aim of Domain-driven Cohesion in Microservices is to help us tightly scope our microservices so that they represent a specific business domain within our organization in terms of the data and the functionality they provide. The cohesion part of this principle is just there to emphasize the fact that each individual microservice must be

Microservices Design Principle: Domain-driven Cohesion Read More »

Microservices Design Principle: Autonomy

Autonomy in microservices refers to the degree of independence and self-sufficiency that each individual microservice possesses within a microservices architecture. This enhances the performance and reliability of the service and gives consumers more guarantees about the quality of service they can expect from it. Coupled with statelessness, autonomy also contributes to the overall availability and scalability

Microservices Design Principle: Autonomy Read More »

Pseudo-Random Number Generators

Java 17 introduced enhancements to the Pseudo-Random Number Generators (PRNGs) to make working with random numbers in Java more versatile and user-friendly. These improvements provide better support for using multiple PRNG algorithms and properly handling stream-based operations. Here’s an overview of the enhancements: 1. PRNG Enhancements: Java 17 introduces a new interface type called RandomGenerator

Pseudo-Random Number Generators Read More »

Visitor Pattern

In the Visitor pattern, we employ a visitor class to alter the execution algorithm of an element class. This flexibility allows the element’s execution algorithm to adapt as the visitor changes. This pattern falls under the behavior pattern category. In accordance with this pattern, an element object must accept the visitor object, enabling the visitor

Visitor Pattern Read More »

Template Method

The Template Method is a behavioral design pattern that defines a blueprint for an algorithm in a superclass but allows specific steps of the algorithm to be overridden by subclasses without changing its core structure. Consider developing a data mining application that analyzes corporate documents in various formats (PDF, DOC, CSV) to extract meaningful data.

Template Method Read More »

Strategy Pattern

The Strategy pattern, also known as Policy is a design pattern that allows you to define a range of methods for achieving a specific task and place each method in its own class. These classes, known as strategies, are interchangeable, providing flexibility in algorithm selection without altering the core code. Imagine you’re developing a navigation

Strategy Pattern Read More »

State Pattern

The State Pattern is a behavioral design pattern that allows an object to alter its behavior when its internal state changes. The pattern encapsulates states as separate classes and delegates the state-specific behavior to these classes. This makes it easy to add new states and modify the behavior of an object without altering its structure.

State Pattern Read More »

Memento Pattern

The Memento pattern also known as Token is a behavioral design concept that enables the preservation and retrieval of an object’s prior state discreetly, without exposing the details of its internal structure and implementation. Imagine creating a text editor app with an undo feature. To save states for undo, the app records object states before

Memento Pattern Read More »

Scroll to Top