Fig 1: Proxy Pattern (Source: Google)

The proxy pattern is simply another variation of the Aggregator Pattern. In this pattern, the aggregation doesn't happen on the client side. A Separate Microservice will get invoked based on the requirement.

The difference,

Aggregator Pattern: Invokes multiple services to get the responses required by the application. Aggregation of data.

Proxy Pattern: No aggregation of data.

Let’s try to understand the Proxy pattern with the help of an example.

Think about a scenario where we have a large monolithic application and the management team decides to migrate it to the new Microservices architecture. We can use different software development methodologies…


Fig 1: Circuit Breaker (Source: Google)

The circuit Breaker pattern is another popular design pattern used in Microservices Architecture. This pattern falls under the category of sustainable design patterns. That means it helps to keep a particular service alive without failing. Availability is a crucial factor in Microservices Architecture. Therefore it is important to implement a way to overcome these failures.

Think about the microservices architecture. There are many remote calls between different services in the system. Unlike in-memory calls, these remote calls have a high possibility to fail at a given instance. These failures can occur due to network issues, timeouts, etc. There could also…


Fig 1: Design Patterns ( Source: dribbble )

Microservices is a completely new way of developing applications. Design patterns are a crucial part of this new implementation process. Let’s discuss some commonly used designed patterns.

Aggregator Pattern

A microservices application consists of several independent services. These services are less coupled and talk to each other through well-defined interfaces. Service has its own database as well. However, there may be instances where we need to write queries to get results from multiple databases which are in different services. We can use the Aggregator pattern to implement this.

In the aggregator design pattern, a particular service(service A) will receive the request. Then…


Fig 1: Best Practices (Source: Google)

Developers need to follow a set of best practices in order to successfully implement the Microservices architecture. Let’s discuss these best practices.

Design

It is very important to model the boundaries of the system before implementing the Microservices architecture. The developers who design the system must have a crystal clear understanding of the processes and rules in that particular domain. The design should be a Domain-Driven Design.

Domain-driven Design -

Domain-Driven Design is an approach to software development that centers the development on programming a domain model that has a rich understanding of the processes and rules of the domain.

—…


Fig 1: Microservices (Source: Google)

Monolithic Application Architecture

Monolithic application architecture is the architecture followed by most of the developers to create enterprise-level applications before the emergence of Microservices. In Monolithic applications, all the business modules run in a single process which is typically a WAR/EAR file. Classes of these different modules may talk to each other and they also may use the same libraries. There are many coupling between these modules. Moreover, Monolithic applications typically use a single database containing multiple tables related to all the available business modules. A monolithic application contains 3 main tiers namely the client tier, server tier, and database tier.

Example: Consider…


Fig 1: Containers (Source: Google)

Evolution of Application Architecture

Generation 01: The Dark Ages

One Physical Server — One Application


Fig 01: Js (Source: Google)

Through this article let’s discuss some new concepts in JavaScript. This is a continuation of the previous article. So I suggest you go through part 1 of this article before moving on to this.

Visit the previous article by —

6. Template Literals

Refers to a string literal that allows embedded expressions. Templates literals should be enclosed with ` ` instead of “ ”.

Multi-line Strings using template literals —

Easily write multi-line strings without having to use “\n”


Fig 1: JS — Source: Google

JavaScript is a lightweight, dynamic, text-based programming language that is used on both client-side and server-side in order to make web pages more interactive. Javascript was first introduced in 1995 with the name LiveScript. Later on, with the popularity of Java, Netscape changed its name to JavaScript. JavaScript is the only programming language that is native to the web browser and it's a relatively easy language to learn. Therefore the popularity of Javascript increased rapidly over the past few years. Almost all web Browsers contain a JavaScript Engine. JavaScript Engine is a computer program that is used to execute Javascript…


Memento Pattern is a Design pattern that is used to restore the state of an object to a previous state without revealing the implementation details. This pattern falls under the category of Behavioral design patterns. Think about a situation where we develop an application with states. Now there is a requirement saying that at a particular point, we need to go back to the previous state. A Memento Design pattern can be used to achieve this functionality.

There are 3 main components of the Memento Design Pattern

  1. Originator: Particular object whose state needs to be maintained. It creates the memento.


Definition

Chain of Responsibility Pattern is a Design pattern that forms sequentially connected components and consumers can simply pass the object to the first component. Then that particular object gets processed by each component according to the constructed sequence.

This pattern falls under the category of behavioral Design patterns. In simple terms, this pattern lets the application pass requests along a chain of handlers. Each handler can decide either to process the request or to pass it to the next handler in the constructed sequence. This pattern is mainly used to introduce loose coupling to the application. …

Damsak Bandara

Associate Software Engineer at Virtusa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store