<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nikini Aloka on Medium]]></title>
        <description><![CDATA[Stories by Nikini Aloka on Medium]]></description>
        <link>https://medium.com/@nikinialoka1401?source=rss-409a485cb6e1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*acOyBUDuYsMdW6ia.jpg</url>
            <title>Stories by Nikini Aloka on Medium</title>
            <link>https://medium.com/@nikinialoka1401?source=rss-409a485cb6e1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:14:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nikinialoka1401/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Real Async Microservices | SAGA Microservice Pattern]]></title>
            <link>https://towardsdev.com/real-async-microservices-saga-microservice-pattern-f2d592345f5d?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2d592345f5d</guid>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Fri, 22 Jul 2022 04:02:10 GMT</pubDate>
            <atom:updated>2022-08-03T06:46:55.408Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F1fitU5xATqAztt8KWrDlQ.png" /></figure><p>In this Article , I discuss Saga patterns. The HTTP protocol is unsuitable for microservices backends due to its synchronous nature, the microservices require an asynchronous mode of communication.</p><p>As the previous example of the <a href="https://medium.com/@nikinialoka1401/why-http-based-microservices-is-bad-dc826f6cfed1">my previous article </a>.The dispersed transactions are represented by some data being added to the database and others not being uploaded to other databases. That problem will be solved via the Saga pattern.</p><h4>Saga pattern</h4><p>It is a non-microservice implementation design that can be customized as long as the consequences are followed. In distributed transaction scenarios, the Saga design pattern is used to manage data consistency across microservices. A saga is a series of transactions in which each service is updated and a message or event is published to trigger the next transaction step. If a step fails, the saga executes compensating transactions that counteract the preceding transactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*7WXKzaq01tMljQEm2P4HPg.jpeg" /></figure><p>Saga can implement in two different ways</p><ol><li>choreographic: choreographic means event-based,</li><li>orchestration: command based.</li></ol><p>Both can use in different use cases and his own problems.</p><p>Let’s take the choreography pattern and consider a use case.</p><p>There is a new connection service, and when a new connection request arrives, it must be validated whether the customer has a good reputation or a television connection. When each verification is successful, this informs the finance service, which may then create the customer’s bill. If the charging is successful, the operating service will convey the start of the connection. The event broker is a Kafka broker, and services communicate with the Kafka topic.</p><p>When a new connection arrives at the service, the message the event is published to the subject, and the verification services simultaneously listen to the requests. Both verification success and a topic as verification response have been published there. While waiting for the response, the new connection service is listening to the verification response topic.</p><p>When the new connection service determines that the verification was successful, it sends a separate event to the new connection topic indicating that the verification was successful. The financial service listens to the topic, and if the payment is successful, it sends a payment success message to the verification response topic. When a new connection receives a payment success response, it is published in the new connection topic as payment is successful.</p><p>The operation service listens to the new connection topic and creates a new connection when the payment is successful. It publishes as activate success in the verification response topic once more. So, now that the problem has been solved and there is no service waiting for a response, everything is perfect. Microservices cannot communicate if the message system is down, however if MSK or any Kafka cluster is used and there are numerous replicants, they can start fast. This approach is useful for monitoring services because any service that is unavailable can generate an alert. If a request has been published and no one is waiting, the monitoring service can notify the services.</p><h4>Orchestration model</h4><p>There is a separate command model service in the orchestration model, as well as the same new connection service. When a new connection request arrives, it informs the command service and proceeds to check the user’s details as having a television connection and being a legitimate user. That process can also be carried out in parallel. After verifying success, go to the finance service and request payment. When it’s finished, inform the command service to activate the new connection. The command service governs the process, and the system can use a hybrid approach with an event driver. The command service then receives a new request and publishes it to the message broker with a target service.</p><p><strong>The disadvantage of choreography</strong></p><ul><li>There are a number of events that may result in a deadlock. It is difficult to resolve a deadlock scenario and would require integration testing for thousands of events. Having a centralized command module is advantageous because it does not modify anything and decides on its own what to do next.</li></ul><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=GfB_z4Y6YD4&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=41.">https://www.youtube.com/watch?v=GfB_z4Y6YD4&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=41.</a> [Accessed: 22- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2d592345f5d" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/real-async-microservices-saga-microservice-pattern-f2d592345f5d">Real Async Microservices | SAGA Microservice Pattern</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why HTTP based Microservices is Bad]]></title>
            <link>https://medium.com/@nikinialoka1401/why-http-based-microservices-is-bad-dc826f6cfed1?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc826f6cfed1</guid>
            <category><![CDATA[https]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 16:40:59 GMT</pubDate>
            <atom:updated>2022-07-21T16:40:59.843Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*bvPBYN5__ALMQofA5L84Tg.png" /></figure><p>In this Article, I discuss about what http based Microservices is bad.</p><p>HTTP is wrong choice for microservice. Are you agree with this idea?</p><p>Let see the example for understand it.</p><ul><li>If someone providing mobile connection to the phone wants a system with unique identification of the user. when someone come to the system a new connection is creating.</li></ul><p>But what is a microservices ?</p><ul><li>microservices is isolate bounded context for each service. You need make sure doing one thing and doing it well.</li></ul><p>Let’s consider that. A new connection service is available. When a connection is required, you can go and apply for a new connection if you’d want to have additional functions. The connection service must verify that the user has a fixed line connection, a TV connection, and whether or not they are on a blacklist of users who have been banned by other providers. If all goes well, the user can acquire a fresh connection. The user is currently connected to the support, connection, packages, accounts, and billing tables.</p><p>Connection table is used to active new connection. Support table is used to open some support ticket in case. Package tables are used to what is package you have</p><ul><li>This system’s own organization offers a variety of other services. Using the user ID, access the new connection service, and verify the user’s details regarding their fixed line or TV connection. If every detail is accurate, then data should be stored in tables.</li><li>Then another problem has to face that the databases can be in different departments. Probably some table get successfully insert the recode, but some tables may not.</li></ul><p>The request can be sent at once if the HTTP protocol has been used for all verification services. Requests are made, other services are verified, and then we wait for a response from another provider’s system if the 4G connection service is down and another provider’s user verification service has gotten very slow. If 100 queries come in at once, everyone must wait until they receive an answer after using other services to confirm.</p><p>This above problem called as <strong>Cascade Failure.</strong> There fore the entire transaction failed because cannot activate another provider service because don’t know the 4G connection result because it is offline. The UI have to wait and should have to run batch job to visit the transaction is happening or what is failed. Because of this problem the system has to have a backup process. This is a scenario that prove the HTTP is bad for microservices backend processed.</p><p>Multiple requests are being sent to the same server by services A and B. A sent 400 requests to B and was anticipating replies. When sending queries through HTTP, responses always arrive in the same sequence. It doesn’t work since HTTP is synchronous when an asynchronous system is being used. Therefore, using HTTP for microservice backends is not recommended.</p><p>A message framework like Kafka can be used as a remedy. All other verification services listen to Kafka, and new connection requests are forwarded to it. They accept the Kafka request, check it in the databases, and then reply with information about a different subject. A new connection service is listening for Kafka messages and gathering the responses. When a service is unavailable, Kafka saves the request and sends it once it is back online. The order and timing of responses are therefore irrelevant and operate in an asynchronous manner.</p><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=bkpNvADPKZE&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=40.">https://www.youtube.com/watch?v=bkpNvADPKZE&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=40.</a> [Accessed: 19- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc826f6cfed1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[oAuth and OpenID connect]]></title>
            <link>https://medium.com/@nikinialoka1401/oauth-and-openid-connect-81822081af6f?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/81822081af6f</guid>
            <category><![CDATA[openid]]></category>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 07:15:35 GMT</pubDate>
            <atom:updated>2022-07-21T07:15:35.100Z</atom:updated>
            <content:encoded><![CDATA[<p>In this Article, I discuss about oAuth and OpenID connect.</p><p>Every app should have OAuth2, a safe and open standard for data sharing. This authentication and authorization standard provides access to the data without disclosing the user’s identity or credentials, protecting personal data.</p><p>A protocol called OAuth2 uses token-based authorization. Resource server, resource owner, and authorization server are the three components of OAuth. Owners of resources offer their approval for a client authorization server to access a website and a resource server. Recourse servers use an authentication server to validate the token.Access tokens, also known as user roles and permissions, are tokens that discuss users and what they are capable of doing. When the refresh token expires, it is exchanged for a new access token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*0y0RWMGxXPPxpeXl5WTauQ.jpeg" /></figure><ul><li>Client goes to the website and request to create an account.</li><li>The resource owner asks to login with social account and redirect to the authentication server.</li><li>Authorization servers issue a token to the client and client send token to resource server.</li><li>Resource servers send token to the authorization server to validate the token.</li><li>After that resource sever give access to the client.</li></ul><p>There are few grant types in OAuth</p><ul><li>authorization code</li><li>client credentials</li><li>implicit,</li><li>password</li><li>device code.</li></ul><p>Authorization code grant type is the widely use grant type.</p><p>Let see real-world use case.</p><p>Let’s think ,Client sends the request to the google authorization server. Client is hype my website .After that authorization server pop up me and open the dialog box and say hype is going to access your contact list. It is only access the my contact details. So I say ok with that. Now authorization server sends the code. It is important.Becuase it is not token.It is a code. client again send the token request to authorization server. Client says he want to token not a code .Then authorization sever sends token to the client and it send the token to resource server. It validates the token against the authorization server.</p><p>The JWT token depends on the architecture design. If don’t have certification and keys it can validate against authorization server. After validating can send the resources to the client. This is ideal for resource owner don’t trust the client.The above scenario is shown below diagram.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*BaaTeAY9eftT0_OpS6XHpA.jpeg" /></figure><ul><li>What are the confusing points of this?</li></ul><p>Goggle contact is Goggle and you are asking password and token are also Goggle.</p><p>Now we can get brief idea about grant types</p><ul><li>Password grant type can be used when the resource owner trusts the owner and application and doesn’t hesitate to provide the credentials.</li><li>When you don’t trust a person, you can utilize the grant type of authentication code. Also, there is a reason to have token request separately instead of sending the code first and then code back to client and get the token. But actually, happen authorization server send code to client, client send it back then authorization server sends the token to client.</li></ul><p>The issue is that we generally work with web applications, and everything is visible when you go to the code. Someone may be able to access the credentials used by the authorization server to register the client and provide the client id and secret if the token is obtained directly from the front end. Only the client id is required to obtain the code. To obtain the token, however, it requires the<strong> client ID and secret</strong>. Frontend doesn’t communicate with the authorization server because client credentials are visible, but the backend does and shares the token. There are times when there is only a front end and no backend. Use implicit flow, which asks for a token directly, if no one is available to deliver the token request. After that, you’ll just get the token and not the code.</p><p>OAuth is used to solve the problem to don’t need share the credentials to untrusty application and access the resources. But the OAuth is not designed to hand the authentication. But Facebook and other techs used to handle the authentication from OAuth.</p><p>There fore , this misuse turned to OpenID connect as solution.</p><p><strong>OpenID</strong></p><p>Binding oidc and OAuth2 together can use these authentication or authorization content.</p><p>Modern web apps with a lot of JavaScript and a tendency to run on a single page, like Gmail, are well supported by OpenID Connect. Mobile: OpenID Connect offers excellent support for native iOS and Android mobile applications.</p><p>Mobile app redirects the client using their client id to the application authentication server. There are four scopes which are four functionalities in the application as create, delete, update and read. The client’s authorization server give a token to the mobile app as permission to read the content.</p><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=GTT-hg-F1Zo&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=32.">https://www.youtube.com/watch?v=GTT-hg-F1Zo&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=32.</a> [Accessed: 20- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81822081af6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Secure Enterprise Microservice architecture with SSO]]></title>
            <link>https://medium.com/@nikinialoka1401/how-to-secure-enterprise-microservice-architecture-with-sso-6ecd78791c7b?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ecd78791c7b</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[sso]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Thu, 21 Jul 2022 04:26:36 GMT</pubDate>
            <atom:updated>2022-07-21T04:26:36.963Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*0zdYimZDQVvnUJzJ9qKS7w.jpeg" /></figure><p>In this Article, I am going to talk about how to secure enterprise micro service architecture with SSO.</p><p>Security is something we must implement every system what we develop it.Do you know how is it implement? .I discuss about how to implement securer using SSO.SSO means single sign on.</p><p><strong>How does SSO work: </strong>Once you sign on to particular system using SSO ,this sign on tokens can be shared the all the applications where they can define trust. So you usually 99 time gets this requirements. So it is better to go there now.</p><p>In the OAuth solution was implementing custom OAuth server. In this case also that solution works fine. But problem is that ,if you have out of box solution ,Why do you burn your hand.You should use smart solution. Then life is easy.And also you used the own oAtuth server, you should care about all of the security and all bugs and issues. Then if you need to new requirement ,you need to implement it again.</p><p>Let’s see that what are available solution for that.</p><ol><li>keyclock: keyclock is open source project .It is stable. And also it has access management solution out there.</li><li>AWS Cognito:It is customizable and pre token generation.</li></ol><p>3.WSO2 IS- It can used without cloud.</p><p>All of theses solution commonly share the oAuth2.When we choose particular solution , we need to see what we need to be done as authentication and authorization implementation.</p><p>Authentication and authorization are two different. Authentication means who you are that is way we validate user again password.So it is used to identify who is the person. Authorization means what user can do. In real-world, these two concepts are complicated .Let explain using example. When developing a system solution for an organization with multiple departments, each employee must give permission for only the department to which he or she is assigned to see the employee profiles. The authorization then has two parts: what can be done and what can be done with that.</p><p>Imagine a system for managing support tickets where a support engineer is the only one who has access to read user profiles. This indicates that the support engineer has read access to all profiles, but he can only read those assigned to him and not other profiles. Implementing this scenario to grant read access is simple, but using an authorization server to grant access to the same area is challenging. These are referred to as user policies or capabilities.</p><p>We can implement theses policies .But it is here.When are implementing these types of scenarios, create users and roles. There are permissions can give to the users like read, update, create, delete, and list. Therefore, we can assign these permissions to a role and assign a role to a user. without implement own authorization server it is easy to use service like Keyclock. When you implement keyclock ,now user redirect the keyclock. Keyclock is somehow authenticate the user and the token comes to UI.The token submits with every service request. When service request comes.Api gateway says “this user is trying to read user&quot;. So it says that does this token caring create a user permission. But problem is user that can do this for what. It means which department this user can create a new user. Department can access can be defined using policy management solution like OPA. OPA is open policy agent and simple, scalable and virtually can put with anything like SSH and rest services.</p><p>Before making a request, the user should speak with the OPA and inquire about being permitted to view this department’s profiles after receiving approval. OPA verifies the user’s capabilities and user roles. OPA states if a statement is true or untrue, and based on the policy decision, the user is granted permission.</p><p>Authentication can be implement various ways.</p><p>One is identity brokering. It means that you can implement social login like goggle,apple,facebook. When login with social accounts it redirects to identity provider after logging, and it gives token back to the Keyclock. Keyclock can generate its own token with user roles and JWT token back.</p><p>Second is identity federation. It means keyclock can validate user against data sources. For communicating with data sources and verify users, they have unique adapters. The system can achieve security with the help of all these services. The services that use comparable authentication mechanisms are Ldap, Active Directory, and Kerberos. For authenticating users, they can each function independently. If the system has active directory installed, be sure to configure Keycloak or identity brokering for it.</p><p>As a result, when a user is already signed in to Active Directory and Keylock communicates with Active Directory, it notifies the user of their existing sign-in. Next, keylock trust will provide the user a token. It indicates that the user need not log in again. SSO, or single sign-on, is meant by that.</p><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=yWuhTxRyVAA&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=32.">https://www.youtube.com/watch?v=yWuhTxRyVAA&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=32.</a> [Accessed: 20- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ecd78791c7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating and deploying services on Docker.]]></title>
            <link>https://medium.com/@nikinialoka1401/creating-and-deploying-services-on-docker-bde4384bd6d1?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bde4384bd6d1</guid>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Wed, 20 Jul 2022 19:16:05 GMT</pubDate>
            <atom:updated>2022-07-20T19:16:05.570Z</atom:updated>
            <content:encoded><![CDATA[<p>In this Article, you can get a idea about how you can install and create your first docker container in you machine. I think that you have some knowledge about docker. If you don’t have ,you can read the<a href="https://medium.com/@nikinialoka1401/introduction-to-docker-and-container-based-development-925fc54cd355"> my previous articles.</a></p><p>If you have a 32 core platorm,ideal number would be 32 containers to create on host. Are you agree it? This idea is completely wrong. Because there is no point of having docker technology. Your docker takes ,one container takes one CPU. It is not correct all other cases.</p><p>Docker works like this. Number cores and number of container doesn’t relevant each other directly. Docker is not virtual machine. It is a container which is another process to operating system.</p><p>Docker has a principle. It is allocate and share.It means you can do the process allocation for your container.</p><p>Let’s move to install process, If your operation system is windows. You have a at least window 10 .But you don’t have window 10 ,you can use the docker tool box using this <a href="https://jff--docker-docs.netlify.app/toolbox/toolbox_install_windows/">link</a>.</p><p>After you download it ,you can face this kind of problems.</p><p>* how does it? you can install the tool box in your computer along with virtual box and it install the Linux image to your virtual box. It is done automatically. You did not want to worry. After docker tool box installation is done, you need to run environment command on docker machine. You can start first , then you need to run the environment command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*STXP1ZtZlJMGYzRDMamp4g.jpeg" /></figure><p>The terminal runs a special bash environment instead of the standard Windows command prompt. The bash environment is required by Docker.</p><p>After that you should Make the terminal active by clicking your mouse next to the $ prompt.</p><p>The prompt is traditionally a $ dollar sign. You type commands into the <em>command line</em> which is the area after the prompt. Your cursor is indicated by a highlighted area or a | that appears in the command line. After typing a command, always press RETURN.</p><p>Type the docker run hello-world command and press RETURN.</p><p>If you are behind the proxy, you need to export the proxy in order to download images.</p><p>If you use the Mac ,you can directly download the docker.</p><p>How to create docker file on Mac using this command ?touch Dockerfile</p><p>How do you configure the Docker file? Frist line of command is FROM</p><p>FROM means go into our repository and download this particular docker image.</p><h4>HOW to configure the Docker file on windows.</h4><p>You should know below things.</p><p>The Docker Engine receives the guidance it needs to generate a container image from the Dockerfile instructions. These directives are carried out sequentially.<br>FROM<br>The container image that will be utilized while creating the new picture is set by the FROM instruction. For instance, the resulting image when using the instruction FROM mcr.microsoft.com/windows/server core is derived from and dependent upon the Windows Server Core base OS image. The Docker engine will try to download the given image from a public or private image registry if it is not already on the system running the Docker build process.</p><p>The FROM instruction’s format goes like this:</p><p>DockerfileCopy</p><pre>FROM &lt;image&gt;</pre><p>For more detailed information, see the <a href="https://docs.docker.com/engine/reference/builder/#from">FROM reference</a>.</p><p><strong>RUN</strong></p><p>The RUN command defines which instructions should be executed and recorded in the new container image. These instructions may be used to configure the environment, install applications, create files and folders, and more.</p><h4>References</h4><p>[1]<em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=cUiU8yDdQmw&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3.">https://www.youtube.com/watch?v=cUiU8yDdQmw&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3.</a> [Accessed: 19- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bde4384bd6d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Fundamentals]]></title>
            <link>https://medium.com/@nikinialoka1401/javascript-fundamentals-cc60ab1aed96?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc60ab1aed96</guid>
            <category><![CDATA[javascript-fundamental]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 17:39:25 GMT</pubDate>
            <atom:updated>2022-07-15T17:39:25.613Z</atom:updated>
            <content:encoded><![CDATA[<p>In this Article, you can know JS fundamentals. JavaScript is most popular programming language.</p><p><strong>Why study JavaScript?</strong></p><p>JavaScript enables useful programming techniques like imperative, functional, and object-oriented programming. Beginner developers can then use these abilities to learn whatever new language they like, such as Python, Java.</p><h4>JavaScript</h4><p>JavaScript is an<em> </em>object-based scripting language which is used to create client-side dynamic pages. JavaScript is a translated language not a compiled language. The JavaScript Translator which is embedded in the browser translates the JavaScript code for the web browser.</p><p>This was released in 1995 to allow users of the Netscape Navigator browser to add programs to webpages. Since then, many graphical web browsers have used this technology.</p><p>JavaScript is used for applications such as client-side validation, dynamic drop-down menus, displaying date and time, pop-up windows and dialog boxes , and clocks etc.</p><p>Following is an example of a JavaScript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*IMc3TO0Jz-LN7dEsBde_tg.png" /></figure><p><strong>JavaScript Basics</strong></p><p><strong>1)</strong> <strong>JavaScript Comment</strong></p><p>Comments are used to add information about the code so that end user can easily understand the code. Comments also can be used to remove unnecessary lines of coding. There are two types of comment in JavaScript. They are the single line comment and the multiple line comment.</p><p>JavaScript Single line Comment-This is represented by a double forward slash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*57yPrPy77yOed1_dOOrhRw.png" /></figure><p>JavaScript Multi line Comment- Represented by forward slash with asterisk then asterisk with forward slash. This can be used to comment many lines in a code as shown in below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*TboM_7-LIx59N7eFa8eN_A.png" /></figure><p><strong>2)</strong> <strong>JavaScript Variable</strong></p><p>Variables can be simply explained as the containers for data storing.</p><p>Rules for declaring a JavaScript variable.</p><ol><li>Variable name starts with a letter, underscore, or dollar sign.</li><li>Digits can be used after the first letter.</li><li>They are case sensitive.</li></ol><p>There are two types of variables in JavaScript :</p><p>· local variable -This is declared inside block or function and accessible within the function or block only.</p><p>· Global variable-A variable declared outside the function or declared with window object is known as global variable. This is accessible from any function.</p><p><strong>3)</strong> <strong>JavaScript Data Types</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*tnUB9zyXo3nCW7F7kQmm2A.png" /></figure><p>There are two types of data types in JavaScript.</p><ol><li>Primitive data type -numbers, strings, Boolean etc. are examples for this data type</li><li>Non-primitive (reference) data type -objects and arrays are example for this.</li></ol><p>4) JavaScript Operators</p><p>These are symbols used to perform operations on operands.</p><ol><li>Arithmetic Operators- used to perform arithmetic operations on the operands. The following operators are known as JavaScript arithmetic operators.</li><li>Comparison (Relational) Operators — compares the two operands.</li><li>Bitwise Operators — perform bitwise operations on operands.</li><li>Logical Operators — used to perform logical expressions.</li><li>Assignment Operators — used to assign values/variables to variables.</li></ol><p><strong>5)</strong> <strong>JavaScript If-else</strong></p><p>This is used <em>to execute the code according to whether the checked condition is true or false</em>. There are three forms of if statement in JavaScript.</p><ol><li>If Statement — It evaluates the content only if expression is true.</li><li>If else statement — evaluates the content whether condition is true of false.</li><li>if else if statement — evaluates the content only if expression is true from several expressions.</li></ol><p><strong>6)</strong> <strong>JavaScript Switch</strong></p><p>This is used <em>to execute one code from multiple expressions</em>. This is convenient than <em>if- else </em>because it can be used with numbers, characters etc. Following is an example for the switch.</p><p><strong>7)</strong> <strong>JavaScript Loops</strong></p><p>Loops are used to run the same code over and over again, each time with a different value. This is mainly used in array.</p><p>JavaScript supports different kinds of loops:</p><ul><li>for loops through a block of code a number of times</li><li>for in loops through the properties of an object</li><li>while loops through a block of code while a specified condition is true</li><li>do while — also loops through a block of code while a specified condition is true</li></ul><p><strong>8)</strong> <strong>JavaScript Functions</strong></p><p>This is a block of code designed to perform a specific task which is executed when it is called.</p><p>There are mainly two advantages of JavaScript functions.</p><ol><li><strong>Code reusability — A</strong> function can be called several times.</li><li><strong>Less coding</strong> — don’t need to write many code lines each time to perform a common task.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc60ab1aed96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PROXY DESGIN PATTERN in Microservices.]]></title>
            <link>https://medium.com/@nikinialoka1401/proxy-desgin-pattern-in-microservices-3b27962e2f69?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b27962e2f69</guid>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 10:33:30 GMT</pubDate>
            <atom:updated>2022-07-15T10:33:30.369Z</atom:updated>
            <content:encoded><![CDATA[<h3>Proxy Design pattern</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*nL0XH6Aa6CLsv-P0Td3lfg.jpeg" /></figure><p>Everyone has a basic understanding of what a proxy is, but many people have no idea of how a proxy is used. Let’s have a look at an example before discussing the proxy pattern. Let’s say you have a client that is ready to go from a monolithic application to a microservice architecture for his business. Due to its ongoing development over the course of its life, microservices are extremely beneficial when dealing with agile. Some services may need updates as a result of this ongoing work, such as changing functionalities and queries. A particular service update may have an impact on other services as well (the services which are connected ).The result will be system failure. We can utilize the proxy design pattern to resolve this.</p><p>The only difference between this and the aggression design pattern is that instead of aggregation, depending on the business need, a separate microservice may be invoked. The main goal of this paradigm, which can scale independently, is to avoid making each service accessible to users through an interface.</p><p>Let’s think about an example to help make things clearer and simpler. Imagine a mechanism for managing schools (the same example taken in our previous article). Additionally, it includes service to retrieve each student’s grades. You use your student’s complete name to receive the grades, but after some time, you release a new version of the service that is also utilized to get grades. Let’s say for the moment that the student’s I.D. is required in order to acquire their grades, in which case the mark service’s customers will experience problems. We can use the proxy pattern to find a solution. To get over this problem, we can build a proxy server for the specific service (the mark service). As a result, the proxy service will be used by all customers to communicate with the mark service. When the user enters the student’s full name, it will now connect with the initial or old version because the developers are no longer allowed to make any changes on the consumer side. The latest version will be communicated to the student as soon as the user gives them their number. By doing this, you can independently launch your service without upsetting your client. If your first or previous version of the service doesn’t receive any traffic after a while, you can decommission that specific version.</p><h4>Semantic versioning</h4><p>The semantic version has <strong>major</strong>, <strong>minor</strong>, and <em>patch </em>versions.</p><ul><li>You increment the <strong>major version </strong>when the new version is incompatible with the previous or existing version.</li><li>You increment the <strong>minor</strong> <strong>version</strong> whenever you have new functionalities, but the previous or the initial service will work. If the user wants the new version, then the user is capable of updating, or else the user can go with the old functionalities.</li><li>The <strong>Patch version</strong> is not much relevant, and you are capable of updating it as you want.</li></ul><h4>Service Discovery Tool</h4><p>When a service is created, it is much preferable to utilize a third party to find the service because when the infrastructure is modified, the hostname, IP address, etc. may also change. You might need to utilize a service discovery tool to prevent this. In order to determine the student version 1 or student version 2 based on the values of the provided parameters, the proxy will run this discovery tool. In comparison to hard coding the values, this technique is significantly superior. For the service discovery tool, you can use the ws02 governor’s register. Since your service is independent, a service discovery tool is essential.</p><p><strong>Message queues:</strong></p><p>The messages are stored in message queues, which then process them one at a time into the database. When the database takes a lengthy time to save the data, this is necessary (important when DB takes a lot of time to respond). To put it another way, it enables us to lessen the cascade impact. Message queues are useful for minimizing or eliminating cascading effects. When implementing message queues, you should also take other factors like faults, fault tolerance, and queue failures into account. It’s crucial to have a redundancy system.</p><p><strong>Time out</strong></p><p>This is an important factor you should consider when using a proxy service. Let’s assume your student version 1 is getting more and more deployed. If you haven’t implemented the time out, that block thread can also affect version 2.</p><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=7mBvb7nKONg&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=7.">https://www.youtube.com/watch?v=7mBvb7nKONg&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=7.</a> [Accessed: 14- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b27962e2f69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Circuit breaker design pattern in Microservices]]></title>
            <link>https://medium.com/@nikinialoka1401/circuit-breaker-design-pattern-in-microservices-2062a35cc982?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2062a35cc982</guid>
            <category><![CDATA[microservices-pattern]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 10:17:32 GMT</pubDate>
            <atom:updated>2022-07-15T10:17:32.218Z</atom:updated>
            <content:encoded><![CDATA[<p>In this Article, I discuss about Circuit breaker design pattern in microservices.</p><p>Circuit breaker design pattern is a sustainable design pattern. It is helped you to keep your service without die.</p><p>Why is this pattern import? . we have no idea on how other services would break. So each service is responsible for staying alive. In other way, developers, you are responsible for keeping the services alive.</p><p>This is not just applicable to microservices, but this is very critical in microservices since we have multiple services that behave in different ways that are maintained by different teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*x3hImeVxVUU1hldn5RK64A.jpeg" /></figure><p>If you go and check your house, you will find a closed or transparent box (electricity box) only if your house is powered by electricity. If you open your electricity box, it consists of circuit breakers. If you get high voltage or when the main grid works in an abnormal way due to some scenario, your circuit break will break by protecting your internal wires. This is pretty much equal to the design pattern.</p><h4>CIRCUIT BREAKER PATTERN</h4><p>The primary responsibility of the circuit breaker design pattern is to stop the request and response process if a particular service is not working.</p><p>The Circuit Breaker pattern has 3 states.</p><ol><li>Open.</li><li>Closed.</li><li>Half-Open.</li></ol><ul><li>When the Circuit Breaker is set to “Open,” Microservice requests immediately fail and an exception is raised. However, the Circuit Breaker will restore to the “Half-Open” state following a timeout.</li><li>Closed: When everything is functioning normally, the circuit breaker is left closed, and all incoming calls are forwarded to the services.</li><li>Half-Open: After a delay interval, the circuit enters a half-open condition to see if the underlying issue is still there. In this half-open state, the breaker trips again if even one call is unsuccessful. In the event that it is successful, the circuit breaker switches back to being closed.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*pHV1HrH59vllTJrTEu4HOA.jpeg" /></figure><h3>Use Case of Circuit Breaker Pattern</h3><p>Let’s take an example to understand, where we can apply Circuit Breaker Pattern in Microservices architecture.</p><h4>Scenario:</h4><p>Assume a Microservices application contains five different services. The server will reserved one thread each time it receives a request to use that specific service. However, a failure has shows a rapid delay in the service, and the thread is waiting. However, if only one thread is awaiting that service, everything is OK. However, it is not a good idea to cling onto a service if it is too demanding and frequently requested. Since more threads will soon be allocated for this service, existing threads will eventually have to wait.</p><p>The remaining requests that are sent to your service will then be blocked or queued as a result. The web server is still attempting to handle the requests in the queue even though the service has been restored. because the webserver will never recover because it is always receiving requests. This could eventually result in cascading failures across the entire application. As a result, these kinds of situations will cause your services or perhaps the application to crash.</p><h3>Solution:</h3><p>The above scenario is the ideal one for using the circuit breaker pattern. Let’s say you’ve set a threshold for a specific service, and you expect it to react in under 200 milliseconds. That service, as I already indicated, is in high demand and is frequently requested. If 75% of those requests take longer than the maximum allowed time (150–200 ms), the service will eventually stop working. However, if numerous queries take longer than the allotted time (200ms), the service will stop answering. As a result, it will advise the customer that this specific service is unavailable. In light of the aforementioned states of this pattern, we are now shifting from the “Closed” state to the “Open” state.</p><p>As a result, all those requests that comes to the particular service, not going to wait anymore. However, after a timeout, the Circuit Breaker sends ping requests to that service in the background. That means now we are in the “Half-Open” state of the Circuit Breaker pattern. If these requests are successful, the Circuit Breaker will allow to send requests for that service again.</p><p>So, you can use the Circuit Breaker Pattern to improve the fault-tolerance and resilience of the Microservice Architecture and also to prevent the cascading of failure to other microservices</p><p>The following are the primary benefits of the Circuit Breaker Pattern:<br>* Fail quickly and recover quickly.<br>* Prevent failures from cascading.<br>* When possible, fall back and gracefully degrade.</p><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=mw8W-RpvCu0&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=6.">https://www.youtube.com/watch?v=mw8W-RpvCu0&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=6.</a> [Accessed: 14- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2062a35cc982" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design patterns for Microservices]]></title>
            <link>https://medium.com/@nikinialoka1401/design-patterns-for-microservices-f101142b9cf2?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f101142b9cf2</guid>
            <category><![CDATA[microservices-pattern]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 05:01:18 GMT</pubDate>
            <atom:updated>2022-07-15T05:03:07.870Z</atom:updated>
            <content:encoded><![CDATA[<h4>AGGREGATOR DESIGN PATTERN</h4><p>I think that you have a idea about the Microservices and Best practice microservice. If you don&#39;t have idea about Microservice. You can read the my pervious article. In this Article I discuss about Aggregator design pattern of Microservice. Design patterns are major valuable things that you should know</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*XnJm5TbIqpqh6i1e1wa52Q.jpeg" /></figure><p>Why do we want design patterns to Microservice? Your design choices will ultimately determine whether your application uses microservice architecture efficiently. Design patterns are therefore important.</p><p>In several design patterns are in Microservices. In here we can get a idea about Aggregator design pattern.</p><h3>Aggregator Design Pattern.</h3><p>Simply defined, an aggregator pattern is one that accepts a request, sends requests to many services, gathers the results, and then answers to the original request.</p><p>Aggregator design pattern is divided to 3 branches. They are like below image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*TBzSAano9ucBDjf5nfDFmg.png" /></figure><p>Now I describe the Aggregator design pattern using a real world application.</p><p>Assume you are asked to implement a microservice platform for an IT company. They have different systems, but your responsibility is to implement microservices. You should remember ,We need to go with a Domain Driven Design</p><p>Just imagine you came up with a small design like below.</p><p>There are 4 different services and consumers who use these services. Service 1 is to get personal information and service 2 gets leave information and service 3 gets appraisal information and service 4 get allocate information. And also , you have Attendance Management System and a Project Management System.</p><p>At present, the company has a monolithic system that has everything in built. They can login to the system, do project allocation, check leave and attendance system and like everything.</p><p>Your responsibility is to convert this to Microservice platform. How can you do this???One microservice for an attendance system and another for a project management system might be developed. Additionally, if you have anything like a claim management system, another microservice can be developed. Dealing with a Domain Driven Design is the thing you need to pay attention to. There should be one service that does well.</p><p>Solution :</p><p>1. Create first service -To get personal information</p><p>2.Create second service -To get leave information</p><p>3. Create third service -To get appraisal information</p><p>4. Create fourth service -To get allocation information</p><p>Now you may see that. You do not have any service to get personal and leave information for the attendance system. There is no service where you get personal and allocation information for project management system. And that is fine. But why???</p><p>You have 4 different services. Those are micro-level services. These services will not do anything alone other than what it decides to do. This is fine because of the concept “ <strong>Do one thing and do it well</strong>” that is used in Microservices.</p><p>Now When you go with this kind of a pattern, you can create and deploy 4 or multiple dockers based on the demand since you have 4 different services.</p><p>Problem: Attendance system needs to consume personal information service and leave information service</p><p>Solution: Now you can create 1 service to consume those two microservices (personal information service &amp; leave information service) and give response back to consumer. It will take the request from the consumer and invoke personal information service and leave information service, then aggregate responses and send back to the consumer</p><p>How can you achieve the solution using 3 branches.</p><h3>Parallel Aggregation Pattern</h3><p>You can send parallel calls to personal information service and leave information service. Then, get those responses, aggregate them as a single response and send back to consumer. This is called “Parallel Aggregation”.</p><h3>Chaining Aggregation Pattern</h3><p>Just assume if your leave information service has a dependency from your personal information service.</p><p>Ex: The consumer sends Employee ID to you. Your leave system still does not know how to grab information from ID. May be the current version of leave system/database does not have ID-But user will send you the user ID.</p><p>Now, you can invoke personal information service and get Employee code along with other information from that. And then pass this code into leave information service and get leave information. Now you can send aggregated response back to consumer. This is called “Service Chaining”.(You call one service, get response and call another service)</p><ul><li>There is no requirement to get something from the first service, but one after the other.</li></ul><p>Let’s Assume personal information service takes 10ms response time and leave information service to take a response time of 10ms</p><p>Using Parallel Aggregation</p><p>You can both (Personal &amp; Leave) information theoretically in 10ms which means you may be able to deliver your response within 15ms.</p><p>If you go with Service Chaining Approach (one after the other):</p><p>First call will take 10ms and second call too will take 10ms. Altogether 20ms. When you put your transformation time, it will take approximately 25ms for the response.</p><ul><li>This may be a better approach when you are migrating from monolithic applications to microservices platform since your backend may still run with some legacy platform.</li></ul><p>Assume you have an encoding service where you take some response and push it into encoding service. It must be Service Chaining method because you have to get some response and you should send this to encode/decode/encryption service. In such kind of scenarios, you can apply aggregation pattern using service chaining.</p><p>Let us consider a use case.</p><p>Your project management service decides to check employee leave information before allocating a new project. Now, business logic has changed. Earlier Requirement was;</p><p>You have deployed in the production. You have 2 aggregate services in the production. They are Attendance System and Project Management System</p><p>Currently, Project Management System currently consumes 2 services. They are</p><ol><li>Personal information Service</li><li>Allocation information Service</li></ol><p>Now it is in the production. But their business requirement has changed eventually. They decide to check an employee’s leave behavior before allocating to a critical project.</p><p><strong>Solution</strong> -In such a scenario, you do not have to manipulate any existing services. You can create a new aggregation service that will invoke all 3 services. Aggregation services do not cost much. It does not need much performance as it just aggregates things without performing any transformation logic.</p><p>You have 2 different services in your Project Management System. Now you can deploy both services in production. And you can ask consumers to migrate into this new version. And according to the scrum timeline/plans, consumers can slowly migrate into the new service that consumes all 3 backends. When you notice that all consumers have migrated from existing service, you can shutdown and keep the newer one alive.</p><h3><strong>Advantages of using aggregator pattern</strong></h3><ul><li>Easy to understand and implement</li><li>Scalability</li><li>Can be developed fast</li><li>Microservices signature flexibility to internal services</li></ul><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=DZeXqbFvYNA&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=5.">https://www.youtube.com/watch?v=DZeXqbFvYNA&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=5.</a> [Accessed: 14- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f101142b9cf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best practices for Microservices /Web Application Developers.]]></title>
            <link>https://medium.com/@nikinialoka1401/best-practices-for-microservices-web-application-developers-cf95c89fdcbb?source=rss-409a485cb6e1------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf95c89fdcbb</guid>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Nikini Aloka]]></dc:creator>
            <pubDate>Fri, 15 Jul 2022 03:43:16 GMT</pubDate>
            <atom:updated>2022-07-15T03:43:16.469Z</atom:updated>
            <content:encoded><![CDATA[<p>In this Article ,You can know about best practices of Microservices application. The best practices you should employ when working with the implementation of microservices will be the topic of this essay. You should Know the best practices would minimize careless mistakes and increase earnings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*5mgZq6tbWGPPgOvoo65pzQ.jpeg" /></figure><h4>*1. Domain-Driven Design</h4><p>Initially, When it comes to the implementation of microservices, you should think about the design. <strong>Domain-driven</strong> design needs to always be used. The services can be independent of domain.</p><h4>* 2. Hardcode value</h4><p>Secondly, configuration is something to think about. Consider that two services must connect with one another. That for this example, let’s use the A service and the B service. As a result, in order to B call the A, the B service needs the A’s address. To provide these details, developers tend to hard code the hostname, IP address, and relevant URL After it is done so that the B can call the A. Hard coding the values isn’t the correct approach due to many reasons. Because the network team changed the hostname or address. Then again, the developers must change the relevant section and deploy the code again.</p><p>The developers need to use a service discovery mechanism tool, like a <strong>circuit breaker pattern</strong>, to properly resolve issue.</p><h4>* 3. Logging</h4><p>you should consider is logging as 3 best practice .</p><p>Developers always mess up with logging either by having no logs or having too many logs. There is a saying fail faster log later.</p><p>You don’t require to log every section. The majority of the time, logging happens where the process is started, however recording a specific stack trace is required. Since it enables us to determine which error happened in which area, this must be logged. You can keep a separate log file, but it would be more difficult to do so than to use an established framework like the plank.</p><h4>* 4. Versioning</h4><p>Versioning needs to be done semantically. This is a good move because the version number makes it clear to whom or what you are referring. When you release a new version or when you repair any bugs, there is a proper approach to name your application. Major, minor, and patch are the three parts of the semantic version, respectively.</p><h4>* 5.Authorization and Authentication Mechanism.</h4><p>When deploying your application as a microservice, it would be beneficial if you always took authorization and authentication into consideration. Assume there are three servers like A ,B and C. Let’s assume that each service needs to validate an AUTH token, and that it takes each service roughly 5ms to do so. The issue here is that it takes roughly 15ms because each of the three services needs to validate the AUTH token. The validation service needs to be fully independent to address this. When the appropriate request reaches the service layer, for instance, you can redirect it to the identity service, where it will be validated. The second benefit you acquire is that it will reduce latency.</p><h4><strong>* 6. Dependency</strong></h4><p>One central point you should always consider is that avoid using dependency as much as possible. when you want to deploy the A service, it should not depend on the B service. If it is so it will result in a bad design.</p><h4>*7.<strong>Fault tolerance</strong></h4><p>Fault tolerance makes the servers user-friendly. Because the same server has users and it is our responsibility to provide user-friendly services, if we utilize a monolithic application, we develop a user-friendly application. On the other hand, if a microservice design has more than two or three services, the user cannot use it successfully if one of them fails or responds slowly. Therefore, a suitable management system is currently needed in order to address the aforementioned problem</p><h4>References</h4><p>[1]K. Dinesh, <em>Youtube.com</em>, 2022. [Online]. Available: <a href="https://www.youtube.com/watch?v=Alj5sqsv0QU&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=4.">https://www.youtube.com/watch?v=Alj5sqsv0QU&amp;list=PLD-mYtebG3X9HaZ1T39-aF4ghEtWy9-v3&amp;index=4.</a> [Accessed: 14- Jul- 2022].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf95c89fdcbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>