<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ashik Patel</title>
    <description>The latest articles on Forem by Ashik Patel (@ashik155).</description>
    <link>https://forem.com/ashik155</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F758593%2F51542cd4-0ed7-48c7-98a8-fb7438b0c576.jpeg</url>
      <title>Forem: Ashik Patel</title>
      <link>https://forem.com/ashik155</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ashik155"/>
    <language>en</language>
    <item>
      <title>How JavaScript works ?</title>
      <dc:creator>Ashik Patel</dc:creator>
      <pubDate>Thu, 01 Dec 2022 21:51:22 +0000</pubDate>
      <link>https://forem.com/ashik155/how-javascript-works--od7</link>
      <guid>https://forem.com/ashik155/how-javascript-works--od7</guid>
      <description>&lt;p&gt;Hey, let's talk about how JS works. &lt;/p&gt;

&lt;p&gt;To the very base level every single execution that happening in JavaScript is happening inside the 'Execution Context'. It is responsible for executing the code line by line with the available context. Before going further, consider the following illustration to get good idea of how execution context look like and works.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m75dCi9q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gyh6glkq7ofmvrb1low.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m75dCi9q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gyh6glkq7ofmvrb1low.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can assume execution context as a container having 2 parts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Code also known as thread of execution&lt;/li&gt;
&lt;li&gt;Memory also known as variable environment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Code is basically a place in execution context where generally our JS code resides. It will make the program line by line and so that is why JavaScript is called as single threaded language. In addition to this, JavaScript also executes the code in specific manner or way, it is called single threaded synchronous programming language as well. &lt;/p&gt;

&lt;p&gt;Memory is responsible for storing variable, functions and etc. While executing the program, JS will consume these variables and functions from the memory. Most importantly all of these stored variable, functions and etc are being stored as a key value pair. &lt;/p&gt;

&lt;p&gt;So this is how JS works basically.   &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>executioncontext</category>
    </item>
    <item>
      <title>forEach VS Map.</title>
      <dc:creator>Ashik Patel</dc:creator>
      <pubDate>Thu, 01 Dec 2022 00:58:24 +0000</pubDate>
      <link>https://forem.com/ashik155/foreach-vs-map-hei</link>
      <guid>https://forem.com/ashik155/foreach-vs-map-hei</guid>
      <description>&lt;p&gt;Let's keep it on point. JS has few methods for the Array to find or search or iterate items through particular Array. Here we want to discuss 2 mostly and widely used methods, &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;forEach &lt;/li&gt;
&lt;li&gt;Map&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Basic definition and example
&lt;/h2&gt;

&lt;p&gt;forEach method can be used to iterate through an Array. This method will be provided with a callback function, which will be called for each and every item available in Array. An Important point to remember is that, forEach does not return an array, in fact it returns 'undefined'. So if you my man working on some logging or processing which does require every item of an array and does not required anything in return you should consider this method as your to-go tool. let's take an example. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dG9hVvu5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i964cavskkrcrq0ru5j1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dG9hVvu5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i964cavskkrcrq0ru5j1.png" alt="Image description" width="540" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;let's now see what's that returnedValue is holding. any guess ? &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KbwoBVcI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wylcsjb9t3l4cw14zp5b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KbwoBVcI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wylcsjb9t3l4cw14zp5b.png" alt="Image description" width="556" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, map method works same as the forEach but the major difference is that it returns the same length of the newly created array as on array it is being called. Means it does not return 'undefined' as forEach do,  but it returns modified array according to the callback function of the same length. In addition to that, the callback is invoked for every items available in an element. You can always use this method when you want to do some processing or modification on every item of an array and use that newly created array further. example is given below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bqys-89F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3jln3vvgamb0aup1arg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bqys-89F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3jln3vvgamb0aup1arg.png" alt="Image description" width="684" height="241"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Chaining ability.
&lt;/h2&gt;

&lt;p&gt;wait wait wait, what the heck is that? well, in simple terms as you are now absolutely clear that forEach does not return anything and returning just 'undefined', it is not able to perform chaining operations like reduce, sort and etc. But but but, map is returning an array based on the callback modifications, we can chain methods on it. See it is that simple&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use what ?
&lt;/h2&gt;

&lt;p&gt;I will say you will encounter an 'Anti-Pattern' if using map and getting array in return, and for serveral reason you stupid dev does not want to use it further. So if you really do not need to use returned value please please go for forEach. &lt;br&gt;
vice versa is also fine. &lt;/p&gt;

&lt;h2&gt;
  
  
  Performance ?
&lt;/h2&gt;

&lt;p&gt;Well, depends on the several factors I do not want to dig into it.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>array</category>
    </item>
    <item>
      <title>Array.from VS Array.prototype.map</title>
      <dc:creator>Ashik Patel</dc:creator>
      <pubDate>Tue, 29 Nov 2022 18:06:21 +0000</pubDate>
      <link>https://forem.com/ashik155/arrayfrom-vs-arrayprototypemap-52i6</link>
      <guid>https://forem.com/ashik155/arrayfrom-vs-arrayprototypemap-52i6</guid>
      <description>&lt;p&gt;Hello there,&lt;/p&gt;

&lt;p&gt;let's discuss these 2 amazing methods or functions in a proper context and get to know each of them. &lt;/p&gt;

&lt;p&gt;Array.From(arrayLike) is a static method which can be used to create an array from any sort of &lt;strong&gt;array-like non-array object&lt;/strong&gt; in order to perform any available instance method of Array.prototype. Not clear yet ? stick with me I will try to make it clear.&lt;/p&gt;

&lt;p&gt;Array.prototype.map is a instance method which also works similar to the Array.from but it is only working with instance of the Array.&lt;/p&gt;

&lt;p&gt;Consider the following examples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P1jcXsDx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ujg5n67j8gg5j9jjixy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P1jcXsDx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ujg5n67j8gg5j9jjixy.png" alt="Image description" width="532" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--F4we7kVP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cyis294iqakzudts2do7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--F4we7kVP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cyis294iqakzudts2do7.png" alt="Image description" width="465" height="130"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here you can see, the output is same but the internal working is a bit different. &lt;/p&gt;

&lt;p&gt;From the above example we cannot use Array.from as instance method on any array. Same goes for map, we cannot perform map method on Array class itself. &lt;/p&gt;

&lt;p&gt;i.e &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iQNWym8m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8yihcj046ljvyytj1rlx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iQNWym8m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8yihcj046ljvyytj1rlx.png" alt="Image description" width="740" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we consider map, it will work only on instance of an Array. &lt;/p&gt;

&lt;p&gt;i.e &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3rmSDjqe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p0rm4is7oqpq9xlfyql1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3rmSDjqe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p0rm4is7oqpq9xlfyql1.png" alt="Image description" width="691" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so now is it possible to create a whole new array with the Array.from ? Yes you can do the above with the following code. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B6Cm5JFw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xcbdpwc6n31k8fu0go3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B6Cm5JFw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xcbdpwc6n31k8fu0go3f.png" alt="Image description" width="732" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Important
&lt;/h2&gt;

&lt;p&gt;*&lt;em&gt;Now since you're able to create a whole new array with the use of Array.from method, you can perform all the other Array.prototype methods such as sort,push,append,pop and etc with newly create an array. *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Array.from is really helpful when you are working with very large and complex project. it helps to prevent any breakdown while dealing with array methods when sometimes your incoming data or response looks like array but it is non-array object. In this case one can always double check and create an actual Array to perform other useful array methods. &lt;/p&gt;

&lt;p&gt;P.S Scenario is based on my own working project. &lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>es6</category>
      <category>array</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Object Oriented JavaScript &amp; More ! [ Part 1 ]</title>
      <dc:creator>Ashik Patel</dc:creator>
      <pubDate>Sat, 26 Mar 2022 03:55:53 +0000</pubDate>
      <link>https://forem.com/ashik155/object-oriented-javascript-more-part-1--3jie</link>
      <guid>https://forem.com/ashik155/object-oriented-javascript-more-part-1--3jie</guid>
      <description>&lt;p&gt;Hey There! &lt;/p&gt;

&lt;p&gt;Let's talk about JavaScript and Object-Oriented Programming. Huh? Oh yes. Everything in JS ( I will use JS as an alias for Javascript, so please bear with me ) is referenced as an object to some extent. Today, I will show you how to implement Object Oriented concepts using JS and its ES6 features.&lt;/p&gt;

&lt;p&gt;Before we get more in-depth, we will go through the object and we will see why we really need OOP concepts in JS.&lt;/p&gt;

&lt;p&gt;Consider the code below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const userOneName = 'John Doe';
const userOneEmail = 'johnDoe@gmail.com';

const usertwoName = 'Shah';
const usertwoEmail = 'shah@icloud.com';

const userThreeName = 'Jack';
const userThreeEmail = 'jack@Something.com';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this code does not make any sense when you try to look at it from the entity perspective. It is really boring to keep writing and repeating the same code of line for the same entity.&lt;/p&gt;

&lt;p&gt;Now, let's create an object of UserOne by the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const UserOne = {
  name: "joh  doe",
  email: "john@gamil.com",
  printUser: function () {
    console.log(`${this.name} ${this.email}`);
  },
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code makes sense now that we are encapsulating the properties of user entities into a single object. It is now possible to create the same object for another user by simply changing its properties and customizing them as well.&lt;/p&gt;

&lt;p&gt;You can simply access the properties of the object by using the below code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
console.log(UserOne.name); 

//Dynamic Access
console.log(UserOne['email']);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can access and retrieve data from the object using the above syntax. Dynamic access is recommended as the key to access the data may change and may depend on some external environment. This explanation is shown in the following code.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;  &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User = {
  name: "John Doe",
  email: "john@gmail.com",
};

var getUserBytKey = "name";
console.log(User[getUserBytKey]);
//output = John Doe

getUserBytKey = "email";
console.log(User[getUserBytKey]);
//output = john@gmail.com

// but we cannnot use below way to access the property
console.log(User.getuserBytKey);
//output = undefined


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So I hope you are clear with this concept of Dynamic access of properties.&lt;/p&gt;

&lt;p&gt;Now, what if there are more than one user object having same properties and methods ? Do we really need to keep copying this object and can modify accordingly ? NO NO NO. We really do not need to do this. &lt;/p&gt;

&lt;p&gt;If you know JS well, then you will also be familiar with the prototype. Prototypes allow you to create multiple objects with similar properties and behaviors (generally functions). JS has its own implementation of Object-Oriented Programming High-Level Language since many developers are using or are compatible with Object-Oriented Programming High Level Language.  Bingo! By using the new JS ES6 Class feature, we can replicate some of the basic concepts of OOP.&lt;/p&gt;

&lt;p&gt;let's discuss Class. Well, behind the scene this class concept is using the working style of prototype. I want to talk a bit about prototype here. &lt;/p&gt;

&lt;p&gt;i.e Let's create a Person prototype function and do some fun stuff with it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
function Person(name, age, email) {
  this.name = name;
  this.age = age;
  this.email = email;
  this.getInfo = function () {
    console.log(`${this.name} ${this.age} ${this.email}`);
  };
}

//This is how we can create a objects from the Person prototype..
const userOne = new Person("Alisha", 30, "alisha@gmail.com");
const userTwo = new Person("Shah", 30, "shah@icloud.com");

userOne.getInfo();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, This is how you can play with the prototype. &lt;/p&gt;

&lt;p&gt;Now enough of this. Let's play with classes. &lt;br&gt;
No more talking, just understanding through code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class User {
  constructor(name, email) {
    this.name = name; 
    this.email = email;
  }
  getInfo() {
    console.log(`${this.name} ${this.email}`);
  } 
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above code represents User class where you can have constructor and method. &lt;/p&gt;

&lt;p&gt;Whenever you create an object based on a class, the constructor will initialize that object with default values.&lt;br&gt;
let's create an object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
const UserOne = new User("John Doe", "jon@gmail.com");

const UserTwo = new User("Shah", "sha@as.com");

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, UserOne and UserTwo are the object from the User class created using "new" keyword. &lt;/p&gt;

&lt;p&gt;Taking note of the fact that, you can now create a function in the constructor, a function in a class generally represents the behavior of the object.&lt;/p&gt;

&lt;p&gt;Also, Here,  "this" keyword refer to the context of particular object.&lt;/p&gt;

&lt;p&gt;so for UserOne, this refers to object UserOne&lt;br&gt;
UserTwo, this refers to object UserTwo. &lt;/p&gt;

&lt;p&gt;Is that clear? It is not that hard, you can try it by your self.&lt;br&gt;
Comment down below if you find any difficulty understanding this article. &lt;/p&gt;

&lt;p&gt;I will discuss some Advanced concepts In Part 2. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>oop</category>
      <category>prototypejs</category>
      <category>jsclass</category>
    </item>
    <item>
      <title>Service Discovery in Microservice Architecture.</title>
      <dc:creator>Ashik Patel</dc:creator>
      <pubDate>Thu, 24 Mar 2022 20:35:09 +0000</pubDate>
      <link>https://forem.com/ashik155/service-discovery-in-microservice-architecture-2m71</link>
      <guid>https://forem.com/ashik155/service-discovery-in-microservice-architecture-2m71</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nSGC5hdD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8v1dlx02e22yezmb13bt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nSGC5hdD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8v1dlx02e22yezmb13bt.png" alt="Image description" width="880" height="673"&gt;&lt;/a&gt;In this article I will try to explain about Service Discovery in the Microservices Architecture.&lt;/p&gt;

&lt;p&gt;As we all know that, in MS Architecture all the services may have n number of instances running. In this type of architecture, services might be scaled up or down which make the changes in number of instances particular services. As a result,  all of the instances of the services are running on different port. Then how can an application handle request and find the suitable or desirable service among these ports ? That's where we need Service Discovery mechanism in order to serve request according to need of application. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Service Discovery ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is an infrastructure which keep tracks of all the services instances and route the request to it. &lt;/p&gt;

&lt;p&gt;There are 2 Ways to Implement such infrastructure.&lt;/p&gt;

&lt;p&gt;1.Service Mesh &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is used in mostly containerized infrastructure, where container keeps tracks of services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.Service Registry &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When application does not have any control over network and there can be lot of inclusion of services then this pattern is more useful as it is working at application level. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here, whenever a new service gets a life it will register it self to this service registry. So now if application wants to know about this service it will query to this service registry and service registry will provide metadata about requested services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In addition to these, if one service has more than one instances running and registered @ service registry then service registry will provide port of request service to the application in such a way that load can be balanced in more efficient way. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>serviceregistry</category>
      <category>servicemesh</category>
      <category>microservices</category>
      <category>node</category>
    </item>
    <item>
      <title>Microservices at First !</title>
      <dc:creator>Ashik Patel</dc:creator>
      <pubDate>Wed, 23 Mar 2022 20:23:01 +0000</pubDate>
      <link>https://forem.com/ashik155/microservices-234c</link>
      <guid>https://forem.com/ashik155/microservices-234c</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JGXQBGq7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/35ps53o2ik3918k6se7m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JGXQBGq7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/35ps53o2ik3918k6se7m.jpeg" alt="Image description" width="880" height="586"&gt;&lt;/a&gt;&lt;br&gt;
Hey There !&lt;br&gt;
let's talk about microservices. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic principles:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Microservices serve only one specific solution to the given problem. For an example, we can retrieve all the list of top 10 movies from the backend of our streaming app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It can be deployed completely on independent system which do not necessarily have any relation with main system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It always communicate over http methods.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Umm, Benefits ?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;New Developers do not need to understand whole application and can focus on main assigned area.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These services can be developed by independent team according to the requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No programming language barrier for developing microservices. You can choose best language according to need.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bingo ! if one specific service goes down, take a deep breath your application won't get affected by this failure. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Whoah ! Drawbacks !!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hard to Monitor end-to-end development &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dependency problems if one microservice depend on other when it is time to roll back changes. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hard to test &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All complexity now bear by network layer as it communicates via network protocols. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>microservices</category>
      <category>node</category>
      <category>backenddev</category>
    </item>
  </channel>
</rss>
