Microservice Design Patterns (Part — 03)
The proxy microservice design pattern is slightly similar to the aggregator. But according to the proxy design pattern, we do not need an aggregator on the consumer, but we create a microservice to invoke other services based on the business requirements. Let’s understand the proxy pattern with the below example.
▪ ️Assume your company currently having a monolithic application. So now you need to move to microservice architecture. So when you are deploying microservices maybe you need to change the services.
▪️ Consider, you have a microservice to get the leave information of…
(Microservice Design Patterns — Part- 02)
If your house is powered by electricity, then you can find a circuit breaker. So when you get the power from the main grid, the power always comes through a circuit breaker. If the main grid behaves in an abnormal way, or if additional power tries to come, then that circuit breaker will go off and the internal power system of the house will be protected. So this scenario is much similar to the “Circuit Breaker Design Pattern”.
In a distributed system, there are many services that interact with each other. So the possibility…
(Design Patterns— Part- 01)
📍 Before going into the design patterns, first, we should understand the principles behind them. So below are some principles which were used to design Microservices.
▪️ Resilient Services
▪️ Isolation from Failures
▪️ Scalability and Auto Provisioning
▪️ Autonomous Services
📍 The design patterns in Microservices are the software design patterns that produce autonomous services which are reusable (Because when the solutions to an issue are well known, then we can apply them to the same kind of issues in the future)and helps to overcome the common problems and challenges that…
Microservices: Best Practices ✨
In this article, I’m going to discuss nine best practices that you should follow when dealing with microservices.
✹ It should have a well-defined scope. Consider the below example,
Assume that there’s a “Rent a car” application. There’s a customer and it can represent two different services but from two different aspects. Consider those as Customer Registration and Support service. Hence the same customer is involved for both modules but in two different aspects. If we consider the Support service, the main purpose/domain of this module is customer support.
So accordingly we should have a…
An Overview of Microservice Architecture
What we have today is called Monolithic Applications. These are built as a single, unified unit, or in other terms, we can say that the monolithic applications have a single executable file for your entire application (The entire application is packed into one file).
A simple overview of Docker and Container-based development.
📍 Early days we deployed our applications using physical servers.
Example: Assume there is an application, database, and web server. Accordingly in those days, we used three different physical hardware boxes for this purpose.
Have to maintain them.(If there were multiple servers, then we need muliple people to maintain it.)
Need more space.
Need seperate network.
Need seperate opertaing system.
Waste (As the application server/ web server is not using100% of processing power and the memory of the box, And the database server is not using100% of the space of…
New features in ES6 every developer must know 📝
In this article, I'm going to discuss the below topics:
3. Arrow Function
4. Function and Arrow Function
5. Handling Objects
6. Freeze method
An overview of the Memento Design Pattern and its implementation with a real-world scenario!
📍 According to the book “Design Patterns: Elements of Reusable Object-Oriented Software” by a gang of four, the Memento Desing Pattern belongs to the category of behavioral design patterns and, also known as snapshot pattern.
📍 The Memento is a design pattern was designed to restore an object to its previous state.
🌞 You have been using the Microsoft Word to do your work and have you ever seen an undo feature there🧐 By clicking the undo option you can go to your previous states.
📍 Chain of Responsibility Design Pattern is a Behavioral design pattern.
📍 The chain of responsibility pattern is mostly used to pass the responsibility to the next if the current object cannot handle it at the moment. By utilizing this Chain of Responsibility Design Pattern, you can accomplish the loose coupling.
Let’s understand this design pattern with the below example:
Assume that you need to control a menu on the user level. There you have the CEO, Director, Manager, and the Executives. So accordingly each of them has multiple levels of permissions. …
📍 The Builder Design Pattern comes under the creational design pattern.
📍 The Builder Design Pattern deals with tackle the problems with the creation of objects due to complicated multiple constructors.
📍 Sometimes we need to use multiple constructors in our program. Think of the below example➜
Assume that you have a “Vehicle” class in a Rent a Car system. So when someone rents out a vehicle, you need to give insurance, road assistance, emergency assistance, highway electric pass, and so on. So depend on those features, and as there are multiple combinations, you may have to create multiple constructors.
Associate Software Engineer at Virtusa