<?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: msmittalas</title>
    <description>The latest articles on Forem by msmittalas (@msmittalas).</description>
    <link>https://forem.com/msmittalas</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%2F322490%2Ff6553fcb-021e-4f94-8f2c-3a8ee0584c05.png</url>
      <title>Forem: msmittalas</title>
      <link>https://forem.com/msmittalas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/msmittalas"/>
    <language>en</language>
    <item>
      <title>Can we run a java program without a main method?</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Fri, 23 Jun 2023 12:53:45 +0000</pubDate>
      <link>https://forem.com/msmittalas/can-we-run-a-java-program-without-a-main-method-401g</link>
      <guid>https://forem.com/msmittalas/can-we-run-a-java-program-without-a-main-method-401g</guid>
      <description>&lt;p&gt;In Java, starting point of any program is Main method and it can be placed in any class that’s part of a program.&lt;br&gt;
But What if we want to run a program without a Main method. Can we do it ?&lt;br&gt;
Answer is Yes. We can execute a program with help of "Static block" aka "static initialization block".&lt;/p&gt;

&lt;p&gt;What is static block?&lt;br&gt;
 Static block is group of statements that gets executed once when Class Loader loads class. &lt;/p&gt;

&lt;p&gt;Example : &lt;br&gt;
&lt;code&gt;class StaticExample {&lt;br&gt;
    static {&lt;br&gt;
        System.out.println("Hello World from static");&lt;br&gt;
        System.exit(0);&lt;br&gt;
    }&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World from static
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: Above code will work till 1.6 version only. In new versions, JVM Checks for Main method before initialization.&lt;/p&gt;

&lt;p&gt;Though it won't work for new versions, however it helps us in understanding how JVM class loaders works.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to prepare for AZ-305 Azure Solutions Architect Expert Exam?</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Fri, 23 Jun 2023 12:28:59 +0000</pubDate>
      <link>https://forem.com/msmittalas/how-to-prepare-for-az-305-azure-solutions-architect-expert-exam-3l64</link>
      <guid>https://forem.com/msmittalas/how-to-prepare-for-az-305-azure-solutions-architect-expert-exam-3l64</guid>
      <description>&lt;p&gt;I cleared AZ 305 exam recently and received Azure Solutions Architect Expert badge.&lt;br&gt;
In This Blog, I would like to discuss a few points on AZ 305:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is AZ 305 exam?&lt;/li&gt;
&lt;li&gt;Who should give this exam?&lt;/li&gt;
&lt;li&gt;What are the prerequisites of AZ 305?&lt;/li&gt;
&lt;li&gt;What is the cost of the exam? &lt;/li&gt;
&lt;li&gt;How to prepare for AZ 305?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Q:What is AZ 305 Exam?&lt;br&gt;
A:&lt;br&gt;
The AZ-305 Exam is a certification exam for Designing Microsoft Azure Infrastructure Solutions.&lt;br&gt;
This is Architect level exam. You will get "Three star" badge from Microsoft. &lt;/p&gt;

&lt;p&gt;Q:Who should give this exam?&lt;br&gt;
A: &lt;br&gt;
Candidates for this exam should have subject matter expertise in designing cloud and hybrid solutions that run on Microsoft Azure, including compute, network, storage, monitoring, and security. &lt;/p&gt;

&lt;p&gt;Q:What are the prerequisites for getting for Azure Solutions Architect Expert badge?&lt;br&gt;
A: &lt;br&gt;
To become a Microsoft Certified: Azure Solutions Architect Expert (AZ 305), you must earn the Microsoft Certified: Azure Administrator Associate certification (AZ 104).&lt;br&gt;
It means you need clear AZ-104 exam to get AZ-305 badge.&lt;/p&gt;

&lt;p&gt;Q:What is the cost of the exam ?&lt;br&gt;
A:&lt;br&gt;
The cost of the AZ-305 Exam is $165 USD. However, the price is based on the country or region in which the exam is proctored.&lt;/p&gt;

&lt;p&gt;Q:How to prepare for AZ 305?&lt;br&gt;
A:&lt;br&gt;
I prepared from two different websites, and I would suggest same:&lt;/p&gt;

&lt;p&gt;1.&lt;br&gt;
Udemy Course AZ 305 by Alan Rodrigues: &lt;br&gt;
I had completed AZ305 Udemy course. It had help me to understand azure topics easily. &lt;br&gt;
Excellent content and the instructor (Alan Rodrigues).  He has good knowledge on the subject. Explanations have enough details for good understanding. The amount and quality of the practice tests are also invaluable.&lt;/p&gt;

&lt;p&gt;link: &lt;a href="https://www.udemy.com/course/exam-az-microsoft-azure-exam-role1/"&gt;https://www.udemy.com/course/exam-az-microsoft-azure-exam-role1/&lt;/a&gt;   &lt;/p&gt;

&lt;p&gt;2.&lt;br&gt;
Microsoft Learn Documents:&lt;/p&gt;

&lt;p&gt;Microsoft offers a variety of resources to help you prepare for the AZ-305 Exam. You can watch AZ-305 Exam Prep videos on Microsoft Learn and download the AZ-305 study guide to help you prepare for the exam. You can also demo the exam experience by visiting Microsoft’s Exam Sandbox. Additionally, you can test your skills with practice questions to help you prepare for the exam.&lt;/p&gt;

&lt;p&gt;Link: &lt;a href="https://learn.microsoft.com/en-us/certifications/exams/az-305/"&gt;https://learn.microsoft.com/en-us/certifications/exams/az-305/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Quickly Setup Java Microservice Projects?</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Fri, 23 Jun 2023 11:53:32 +0000</pubDate>
      <link>https://forem.com/msmittalas/how-to-quickly-setup-java-microservice-projects-38n6</link>
      <guid>https://forem.com/msmittalas/how-to-quickly-setup-java-microservice-projects-38n6</guid>
      <description>&lt;p&gt;When We start Development, Team often spends a significant amount of time in project setup work and developing mechanisms to handle cross-cutting concerns. &lt;/p&gt;

&lt;p&gt;Cross cutting concerns like &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Externalized configuration - includes credentials, and network locations of external services such as databases and message brokers&lt;/li&gt;
&lt;li&gt;Logging - configuring of a logging framework such as log4j or logback&lt;/li&gt;
&lt;li&gt;Health check - a url that a monitoring service can “ping” to determine the health of the application&lt;/li&gt;
&lt;li&gt;Security - for example, REST APIs must be secured by requiring an Access Token&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It is typical to dedicate one to two days, occasionally even more, to setup the project and putting cross-cutting concerns as the initial investment is negligible if you plan to spend months or years developing a monolithic application. &lt;/p&gt;

&lt;p&gt;However, if you are creating an application using a microservice architecture, the scenario is entirely different. Tens or even hundreds of services are available. You'll regularly design new services, and it will only take a few days or weeks to complete each one. You can't afford to take several days to set up each service.&lt;/p&gt;

&lt;p&gt;Question: How to Quickly Setup Microservice Projects? &lt;/p&gt;

&lt;p&gt;Answer:&lt;br&gt;
*&lt;em&gt;Microservice chassis pattern&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Create a microservice chassis framework that can be foundation for developing your microservices.&lt;br&gt;
The chassis implements Reusable build logic that builds and tests a service. This includes, for example, Gradle Plugins.&lt;br&gt;
Mechanisms that handle cross-cutting concerns. The chassis typically assembles and configures a collection of frameworks and libraries that implement this functionality.&lt;/p&gt;

&lt;p&gt;There are well developed Java microservice chassis available to use like Spring Boot, Spring Cloud and Drop Wizard.&lt;/p&gt;

&lt;p&gt;The fundamental advantage of a microservice chassis is that updating dependencies, build logic, and cross-cutting concern logic is quicker and simpler. You only update each service to use the latest version of the microservice chassis framework, which has been updated to include the necessary changes.&lt;/p&gt;

&lt;p&gt;One issue is that each programming language or framework you want to use has its own microservice chassis. Adopting a new programming language or framework may be difficult because of this.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to prevent a network or service failure from cascading to other services?</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Mon, 19 Jun 2023 18:32:04 +0000</pubDate>
      <link>https://forem.com/msmittalas/how-to-prevent-a-network-or-service-failure-from-cascading-to-other-services-4fnm</link>
      <guid>https://forem.com/msmittalas/how-to-prevent-a-network-or-service-failure-from-cascading-to-other-services-4fnm</guid>
      <description>&lt;p&gt;Occasionally, services work together to complete requests. There is always a chance that one service will synchronously invoke another that is either unavailable or has such a high delay that it is practically unusable. While waiting for the other service to react, the caller may use valuable resources like threads. The calling service can become resource-constrained as a result, rendering it unable to handle additional requests. Throughout the application, the failure of one service could potentially cascade to other services.&lt;br&gt;
How to prevent a network or service failure from cascading to other services?&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Implement Circuit Breaker Pattern.&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A proxy that works like an electrical circuit breaker should be used by a service client to call a remote service. All attempts to launch the remote service will immediately fail for a timeout period after the circuit breaker trips when the number of consecutive failures exceeds a threshold. A certain number of test requests are permitted to pass through the circuit breaker after the timeout expires. The circuit breaker restores regular operation if those requests are granted. Otherwise, the timeout period starts over if there is a failure.&lt;/p&gt;

&lt;p&gt;Following is Circuit Breaker example using Java Spring Boot and Hystrix lib.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.test.service;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;

@Service
public class TestService {

      @HystrixCommand(commandProperties = {@HystrixProperty( name ="execution.isolation.thread.timeoutInMilliseconds",value="2000")},fallbackMethod="getDataFallBack")

    public List&amp;lt;String&amp;gt; getLatestBookNames()throws Exception {

        ArrayList&amp;lt;String&amp;gt; listOfBooks = new ArrayList();

        //some service to get list of Books 
           //To Simulate service is taking time to reply
        Thread.sleep(5000);

        return listOfBooks;
    }

    public List&amp;lt;String&amp;gt; getDataFallBack() {

        System.out.println("Inside fallback");
        ArrayList&amp;lt;String&amp;gt; listOfBooks = new ArrayList();
        listOfBooks.add("Clean Code: A Handbook of Agile Software Craftsmanship");
        listOfBooks.add("Introduction to Algorithms");

        return listOfBooks;

    }

}



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

&lt;/div&gt;



&lt;p&gt;Here We are simulating delay from other services using Thread.sleep.&lt;/p&gt;

&lt;p&gt;If We call "getLatestBookNames" method, it will wait for 5 Seconds. We have timeout of 2 seconds and after 2 seconds, Circuit will break, and Circuit breaker (CB) will call "getDataFallBack" method. &lt;/p&gt;

&lt;p&gt;This shows that CB will help caller services to handle the failure of other services that they invoke.&lt;/p&gt;

&lt;p&gt;For more information visit: &lt;a href="https://spring.io/projects/spring-cloud-circuitbreaker"&gt;https://spring.io/projects/spring-cloud-circuitbreaker&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>"Sequenced Collections": an upcoming feature of Java 21 to handle a sequence of elements in a better way.</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Mon, 19 Jun 2023 16:53:10 +0000</pubDate>
      <link>https://forem.com/msmittalas/sequenced-collections-an-upcoming-feature-of-java-21-to-handle-a-sequence-of-elements-in-a-better-way-1452</link>
      <guid>https://forem.com/msmittalas/sequenced-collections-an-upcoming-feature-of-java-21-to-handle-a-sequence-of-elements-in-a-better-way-1452</guid>
      <description>&lt;p&gt;Java's Collection API is one of the oldest and active API in JDK. &lt;br&gt;
It has collection type like List, Set and Map. However, A collection type that represents a sequence of elements with a specified encounter order and standard set of operation is absent from Java's collections framework. &lt;/p&gt;

&lt;p&gt;For instance, List and Deque both specify an encounter order, but "Collection", their shared supertype, does not. Similar to how Set does not define an encounter order, neither do subtypes like HashSet or SortedSet, although LinkedHashSet and SortedSet do. As a result, encounter order support is dispersed throughout the type of hierarchy, making it challenging to express some beneficial ideas in APIs. A parameter or return result with an encounter order cannot be described by either a collection or a list. &lt;/p&gt;

&lt;p&gt;To solve this problem, new interfaces for sequenced collections, sequenced sets, and sequenced maps have been developed, which have then been retrofitted into the type hierarchy of the current collection. There are default implementations for each new method that is declared in these interfaces. Sequenced collections represent a collection whose elements have a defined encounter order, sequenced sets represent a set that is a sequenced collection but does not contain duplicate elements, and sequenced maps represent a map whose entries have a defined encounter order. Each of these objects has a unique set of properties.&lt;br&gt;
All the various sequenced types can process elements in both directions using all the common iteration mechanisms, including enhanced for loops, explicit iterator() loops, forEach(), stream(), parallelStream(), and toArray(), thanks to the new reversed()method, which provides a reverse-ordered view of the original collection.&lt;/p&gt;

&lt;p&gt;Overall, the Java Collections Framework has advanced significantly with the addition of new interfaces to represent collections with a specified encounter order and a uniform set of actions that are applicable across such collections. For developers, the framework will become more understandable and effective by offering support for encounter order in a standardised and simple-to-use manner.&lt;/p&gt;

&lt;p&gt;more details on: &lt;a href="https://openjdk.org/jeps/431"&gt;https://openjdk.org/jeps/431&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>java21</category>
      <category>sequenced</category>
      <category>collection</category>
    </item>
    <item>
      <title>New way to Use Strings in Java 17</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Fri, 10 Jun 2022 07:11:52 +0000</pubDate>
      <link>https://forem.com/msmittalas/new-way-to-use-strings-in-java-17-2i1l</link>
      <guid>https://forem.com/msmittalas/new-way-to-use-strings-in-java-17-2i1l</guid>
      <description>&lt;p&gt;Before Java 15, Writing SQL, HTML, JSON or any Polyglot scripts in String were difficult. It was ugly and difficult to read.&lt;br&gt;
For example : &lt;br&gt;
Following HTML in Java :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F19tcr1phqns8ci7ddtbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F19tcr1phqns8ci7ddtbf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Following SQL in Java : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9evr75d07ks0baytzd5r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9evr75d07ks0baytzd5r.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;lot's of concatenation and escapes, It's difficult to read and write.&lt;/p&gt;

&lt;p&gt;With "JEP 378: Text Blocks"  introduced in Java 15 ( Java 17 LTS), We can use two dimensional block of text.&lt;/p&gt;

&lt;p&gt;for example, above code can be rewritten in following way: &lt;/p&gt;

&lt;p&gt;Following HTML in Java 17 : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbczt22xw5yglbl43c7de.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbczt22xw5yglbl43c7de.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following SQL in Java 17 : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7ogs2zs49f6j3mw8lzk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7ogs2zs49f6j3mw8lzk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This way ,It's easy to read and write strings in Java.&lt;/p&gt;

&lt;p&gt;More Details on :&lt;a href="https://openjdk.java.net/jeps/378" rel="noopener noreferrer"&gt;JEP-378&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Codding !!&lt;/p&gt;

</description>
      <category>java</category>
      <category>java15</category>
      <category>java17</category>
      <category>coding</category>
    </item>
    <item>
      <title>Easy to Debug NullPointerException with Java 17</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Fri, 10 Jun 2022 06:07:40 +0000</pubDate>
      <link>https://forem.com/msmittalas/easy-to-debug-nullpointerexception-with-java-17-4dj9</link>
      <guid>https://forem.com/msmittalas/easy-to-debug-nullpointerexception-with-java-17-4dj9</guid>
      <description>&lt;p&gt;As Java Developer, We have faced NullPointerException  throughout&lt;br&gt;
our Java Development career. Sometime ,it is difficult to find such exception at Compile time since its not a checked exception. for example, look at runtime error message in below code.&lt;/p&gt;

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

&lt;p&gt;Exception Message : &lt;br&gt;
&lt;code&gt;Exception in thread "main" java.lang.NullPointerException&lt;br&gt;
    at MyClass.main(MyClass.java:5)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Error message is not clearly informing which variable has an issue. &lt;br&gt;
We need more information on variable causing this exception and that's where  JEP-358   &lt;a href="https://openjdk.java.net/jeps/358"&gt;&lt;/a&gt;  comes for rescue.&lt;/p&gt;

&lt;p&gt;If We run same code with Java 17 , It provides more information on  which variable is causing NullPointerException.&lt;/p&gt;

&lt;p&gt;Exception Message : &lt;br&gt;
&lt;code&gt;Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "&amp;lt;local2&amp;gt;" is null&lt;br&gt;
    at MyClass.main(MyClass.java:5)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE: &lt;br&gt;
This change was introduced in Java 14 but JAVA 14 doesn't have LTS  ( long term support)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding !!!!&lt;/p&gt;

</description>
      <category>java</category>
      <category>npe</category>
      <category>nullpointer</category>
      <category>java17</category>
    </item>
    <item>
      <title>AZURE - EASIEST WAY TO CONSUME "COVID-19" DATA</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Sat, 28 Mar 2020 11:25:16 +0000</pubDate>
      <link>https://forem.com/msmittalas/azure-easiest-way-to-consume-covid-19-data-6hn</link>
      <guid>https://forem.com/msmittalas/azure-easiest-way-to-consume-covid-19-data-6hn</guid>
      <description>&lt;p&gt;Novel Corona Virus spreading all across the globe and Many Countries are requesting their citizen to stay at home for months. While everyone is trying to find some kind of things to do to avoid boredom during a lockdown situation, I decided to do something fascinating with Azure.&lt;br&gt;
It was a Saturday afternoon and I was browsing the internet and checking on the count of covid19 cases now and then. While doing this, I found many websites provide JSON format data of  covid19 and they refresh this data every single day. I decided to store this data in my Azure Table  / Cosmos DB for my future projects.&lt;br&gt;
To Store the covid19 data, Code has to  follow the below 7 Steps workflow: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Repeat below Steps  once every Day as those websites provide the latest data once every day &lt;/li&gt;
&lt;li&gt;Make HTTP Request &lt;/li&gt;
&lt;li&gt;Consume HTTP Response&lt;/li&gt;
&lt;li&gt;Convert HTTP Response to JSON Object&lt;/li&gt;
&lt;li&gt;using a loop, Massage each  JSON Document  and Convert it into Model class which represent a row/document in Azure Table/Cosmos DB &lt;/li&gt;
&lt;li&gt;Create Connection to Azure Table/Cosmos DB&lt;/li&gt;
&lt;li&gt;Store the Data &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As the World is moving towards the "No-Code" trend, I decided to consume this data and store it in Azure Table /Cosmos DB  without writing a single line of code. &lt;br&gt;
You must be thinking, How it is possible that without writing a single line of code, one can make HTTP Request to a website endpoint, consume Http Response, convert that Response into JSON, Massaging JSON  and finally store in  Azure Table / Azure Cosmos DB?&lt;br&gt;
The answer is the Azure Logic App. Yes!!!  Azure has a fascinating service called Azure Logic App which can create business workflow without writing a single line of code. With the help of Azure Logic App, One can schedule and automate many business processes. For more details on Azure Logic App, You may visit  &lt;a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview"&gt;https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-overview&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now let me explain  How you can use Azure Logic App to store covid19 data in  Azure Table/ Cosmos DB.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;create a Logic App in the Azure Portal. &lt;a href="https://portal.azure.com/"&gt;https://portal.azure.com/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7jCJyZo8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/G3DZKcCX/step1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7jCJyZo8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/G3DZKcCX/step1.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Logic Apps Designer page. here You can create a workflow  ( 7 steps workflow)  with just easy drag and drop.&lt;br&gt;
In the Logic Apps Designer page, We need to collect data once every day and hence We have to select the Recurrence trigger which will be called once every day.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UeNMNkoO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/xdqZzQ5y/step2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UeNMNkoO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/xdqZzQ5y/step2.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After selecting the Recurrence Trigger, the Next step is to Call Website Endpoint using "HTTP Action". For Data, I am using  &lt;a href="https://opendata.ecdc.europa.eu/covid19/casedistribution/json/"&gt;https://opendata.ecdc.europa.eu/covid19/casedistribution/json/&lt;/a&gt; .&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bs35e9l2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/FKqBb6nt/step3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bs35e9l2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/FKqBb6nt/step3.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Consume Response of Step 3 and Convert it into JSON using Data Operations --&amp;gt; Parse JSON.&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ko-JwXY3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/VNH3GvvV/step5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ko-JwXY3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/VNH3GvvV/step5.png" alt="Alt text of image"&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To Parse JSON, it needs a JSON schema. You don't have to manually write it, just provide sample JSON and it will create the schema for you. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wVlL3pcC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/mDzK04F2/step7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wVlL3pcC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/mDzK04F2/step7.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XU_yolPz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/L5jw8VTc/step8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XU_yolPz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/L5jw8VTc/step8.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IL2aoT3m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/vHdCSp8b/step9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IL2aoT3m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/vHdCSp8b/step9.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As our JSON data contains an array of documents, we need to loop through it, massage it and store it Cosmos.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e8IiS7BE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/Mp94HH7p/step10.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e8IiS7BE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/Mp94HH7p/step10.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DLWpmWXU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/7YMjvmb7/step11.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DLWpmWXU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/7YMjvmb7/step11.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Massaging Data: Map your  response JSON to new JSON document  and add "ID" field in the new JSON document&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OlE1Gmqj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/RZSyvKnY/step12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OlE1Gmqj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/RZSyvKnY/step12.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OanUnc_w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/QtTnfqRF/step13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OanUnc_w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/QtTnfqRF/step13.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connect to Cosmos DB, select Database and container ( table).  Select Modified JSON Document in Document field, provide partition key-value field.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dqQPjWj8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/1X172qQJ/step14.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dqQPjWj8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/1X172qQJ/step14.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kHayD71A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/C5CrgxMY/step15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kHayD71A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/C5CrgxMY/step15.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, Run logic App.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bIB23B9k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/4xXknjjB/run.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bIB23B9k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/4xXknjjB/run.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aCjWSUpN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/tRFMP23f/success.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aCjWSUpN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/tRFMP23f/success.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open Cosmos DB To  check that  data  has been stored or not &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oDrlhBtf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/wTXYq941/hurray.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oDrlhBtf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.postimg.cc/wTXYq941/hurray.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;hurray!!!!!!!!! It's working.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nzd5coK4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.postimg.cc/CMs2L8Zk/tenor.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nzd5coK4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.postimg.cc/CMs2L8Zk/tenor.gif" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this post will help you. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Be Safe!! Spread Knowledge, Spread Love but Not Virus &lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;em&gt;Enjoy Azure &amp;amp; Enjoy Cloud Computing !!!!&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>logicapps</category>
      <category>covid19</category>
      <category>azure</category>
      <category>cloud</category>
    </item>
    <item>
      <title>BEST WAY TO EXPLAIN CLOUD TO ANYONE</title>
      <dc:creator>msmittalas</dc:creator>
      <pubDate>Thu, 13 Feb 2020 08:56:40 +0000</pubDate>
      <link>https://forem.com/msmittalas/best-way-to-explain-cloud-to-anyone-42o7</link>
      <guid>https://forem.com/msmittalas/best-way-to-explain-cloud-to-anyone-42o7</guid>
      <description>&lt;p&gt;One fine evening, I and my non-IT Friend were sitting in a restaurant and enjoying dinner. I was explaining to him that nowadays, I am working on Azure Cloud. Suddenly he asked me to explain  "CLOUD". I was not sure how to explain "Cloud" to a non-IT guy. I am sure you must be in a similar situation before. &lt;/p&gt;

&lt;p&gt;I took some time to think and then explain  him this way : &lt;/p&gt;

&lt;p&gt;The term “cloud” has become overused. Every IT Company has a cloud and everyone’s platform is cloud-enabled, but if we cut through the hype, three basic models exist in cloud-based computing. These are&lt;/p&gt;

&lt;p&gt;Infrastructure as a Service (IaaS)&lt;br&gt;
Platform as a Service (PaaS)&lt;br&gt;
Software as a Service (SaaS)&lt;/p&gt;

&lt;p&gt;I could see the "question mark"   on my friends'face but then I used the meal preparation example. &lt;br&gt;
I tried to map the daily making of meals to the different models of cloud computing.&lt;/p&gt;

&lt;p&gt;1&amp;gt;You can make the meal at home.&lt;br&gt;
2&amp;gt;You can go to the grocery store and buy a meal pre-made that you heat up and serve.&lt;br&gt;
3&amp;gt;You can get a meal delivered to your house.&lt;br&gt;
4&amp;gt;You can get in the car and eat at a restaurant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--merN0k7V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn1.savepice.ru/uploads/2020/2/13/eeb957623b3a5cf26e8463e4078466a4-full.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--merN0k7V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn1.savepice.ru/uploads/2020/2/13/eeb957623b3a5cf26e8463e4078466a4-full.png" alt="Meal to Cloud Services mapping"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The difference between these options is about who’s responsible for cooking these meals and where the meal is going to be cooked.&lt;br&gt;
 In the on-premise model, eating a meal at home requires you to do all the work, using your own oven and ingredients already in the home.&lt;br&gt;
 A store-bought meal is like using the Infrastructure as a Service (IaaS) model of computing. You’re using the store’s chef and oven to pre-bake the meal, but you’re still responsible for heating the meal and eating it at the house (and cleaning up the dishes afterward).&lt;/p&gt;

&lt;p&gt;In a Platform as a Service (PaaS) model, you still have responsibility for the meal, but you further rely on a vendor to take care of the core tasks associated with making a meal. For example, in a PaaS model, you supply the plates and furniture, but the restaurant owner provides the oven, ingredients, and the chef to cook them. &lt;br&gt;
In the Software as a Service (SaaS) model, you go to a restaurant where all the food is prepared for you. You eat at the restaurant and then you pay for the meal when you’re done. you also have no dishes to prepare or wash.&lt;/p&gt;

&lt;p&gt;After Explaining "CLOUD" this way to my friend, his view towards Cloud changed a lot. The good part was he paid the restaurant bill as well :)&lt;/p&gt;

&lt;p&gt;I hope you liked the explanation. &lt;/p&gt;

&lt;p&gt;Ref : &lt;/p&gt;

&lt;p&gt;WEB: &lt;a href="http://www.google.com"&gt;www.google.com&lt;/a&gt; &lt;br&gt;
Book Ref: Microservice Pattern &lt;br&gt;
Book Ref: Spring Microservice in Book&lt;/p&gt;

</description>
      <category>azure</category>
      <category>aws</category>
      <category>cloud</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
