This article will guide you through 9 best practices that a developer should follow when working on a microservice project. let’s take a deep look at each.
Each service should have its own well-defined scope. Remove anything from your service that isn’t relevant to its scope and keep only the elements that are necessary to achieve the goal of the particular service.
While designing a microservice, make sure you have a fresh domain-driven design. If you are already running a microservice, just Rethink whether the design is domain-driven? …
To gain a deeper grasp of microservices, we must first understand the differences between microservice and monolithic architecture.
A monolithic application means a single, indivisible piece of software. A client-side user interface, a server-side program, and a database are typically included in such a system. It is integrated, all functions handled and served from a central place. Generally, monolithic applications have one large codebase and lack modularity. Developers use the same code base when they wish to update or replace something.
Previously, we deployed our application using multiple physical servers. To make things clearer, when we have an application that needs a web server, database and application server to run, we use three separate hardware to deploy it.
In this article, I’m going to cover some of the new features that have…
The Chain Of Responsibility pattern enables you to loosely couple the senders and receivers of a request. We build a receiver objects chain in this pattern, with each receiver containing a reference to another receiver. This chain receives a request from the client and starts processing it. If first object is unable to handle the request, it is passed to the next receiver, and so on, until the request is fully handled.
During the run time, the objects in the chain will decide who will handle the request and whether it needs to be passed on to the next object…
The Builder is a design pattern that allows us to build a complex object from simple objects in a step-by-step manner. The builder design pattern is classified as a creational pattern.
Let’s look at the example below to find the answer to the above question.
Assume that a shop sells hot-buns to their customers. A hot-bun can be either chicken-bun or beef-bun. There are three sizes to choose from: small, medium, and large. A customer can also request extra sauce, cheese or a cool drink when ordering a hot-bun. However, these extra items are optional. …
prototypes design pattern allows you to create objects by cloning an existing object instead of creating a new object from scratch. This pattern is used when the process of object creation is costly. when cloning, the newly copied object contains the same characteristics as its source object. After cloning, we can change the values of the new object’s properties as required. This pattern comes under a creational pattern.
For easier understanding, Assume that a database operation should be done in order to create an object. This database call is both time-consuming and costly. we need to create multiple objects. As…
The factory method is a design pattern that provides an interface or abstract class for creating an object and allows its subclasses to decide which class to be instantiated. Factory pattern is classified as a creational pattern.
For easier understanding, Let’s assume a shop contains a variety of products, and the shopkeeper delivers us the things we require based on our requirements. In the same way, the factory pattern works. Typically, we pass parameters. Our factory method determines which class should be instantiated based on the parameter we passed, and creates and provides an instance of that specific class.
The Singleton is one of the most used design pattern which is used to create a class that can have only one instance that can be accessed globally. Singleton is classified as a creational pattern.
Only one singleton object can be made, per container. If you’re a JAVA developer, you’ll get one Instance per JVM.
To understand DNS spoofing, we must have enough knowledge about DNS servers and how it works.
Each and every devices in the world which is connected to the internet will own a unique IP address. An IP address is a unique address that identifies a device on the internet or a local network. The term IP (Internet Protocol) refers to a collection of rules that regulate the format of data transmitted over the internet or a local network.
If you are currently connected to the internet, you too have a unique IP address. …