Azure for beginners | ShivPrasad Koirala | Skillshare
Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
14 Lessons (10h 56m)
    • 1. Lab 1:- Azure,Cloud,SAAS,PAAS and IAAS.

    • 2. Lab 2:- SQL Server on Azure ( DTU & EDTU)

    • 3. Lab 3: - Azure Functions.

    • 4. Lab 4: - Azure storage (Blobs, Table, File & Queue).

    • 5. Lab 5: - Azure Cosmos DB

    • 6. Lab 6: - Microservices & Azure Fabric in 90 Minutes.

    • 7. Lab 7 :- Azure tables, Partition and Row keys.

    • 8. Lab 8: - Block blobs, Append blobs & Page blobs.

    • 9. Lab 9 :- Azure Queues , visibility timeouts ,Peek & De-Queue.

    • 10. Lab 10 :- Cloud services vs App services.

    • 11. Lab 11 :- WebJob and background processing.

    • 12. Lab 12 : - Azure DevOps using Azure Pipeline.

    • 13. Lab 13 - Microservices using Docker and Azure.

    • 14. Lab 14 - Azure Virtual Network(VNET) and Network Security Groups(NSG).

14 students are watching this class

About This Class

In this class we will learn Azure step by step. This is the first lesson which is  lab1 and it covers the below topics.

Lab 1:- Azure, Cloud, SSAS, PAAS and IAAS

  • Define SSAS, PAAS and IAAS ?
  • How is cloud different from normal webhosting ?
  • Explain the 2 big O’s in cloud ?
  • What is a resource and why do we need Resource groups ?
  • What is the importance of Resource group location ?
  • What are app services ?
  • Which appservice will you choose to host a website ?
  • What is the importance of Service plan  and pricing tier?
  • How to upload a site by using FTP on Azure ?
  • What is the importance of “wwwroot” folder ?
  • How can you go to the console of Azure ?
  • What is the need to App Service editor ?
  • Explain the importance of publish profile of Azure ?

Lab 2:- SQL Server on Azure ( DTU & EDTU)

  • What is the problem of mapping work load with Azure configuration ?
  • Explain DTU and EDTU ?
  • On which factors does DTU depend ?
  • How to calculate DTU ?
  • How to measure the five factors which derive DTU ?
  • How can you create SQL Server DB on Azure ?

Lab 3 :- Azure Function Apps

  • Explain function apps ?
  • Explain the term “ServerLess” ?
  • How to create function apps using portal ?
  • For function app template in visual studio , what has to be installed ?
  • How to create function apps using visual studio ?
  • Consumption plan VS Service plan
  • What is the importance of Scale controller ?
  • What is a Web Hook / API function  app?

Lab 4:- Azure storage (Blobs,Table,File and Queue)

  • Differentiate between resource manager and classic ?
  • Explain the difference between blobs , files , queues and table ?
  • Differentiate between general storage v1 vs v2 vs blob ?
  • When should we select hot access tier or cold access tier ?
  • When should we choose standard vs premium ?
  • Differentiate between SDD vs HDD ?
  • Differentiate between LRS , ZRS , GRS and RA-GRS ?
  • How can azure storage explorer make your life easy ?

Lab 5 :- Azure Cosmos DB

  • What is the goal of Cosmos DB ?
  • Explain the word planet-scale ?
  • Explain consistency problem in Cosmos ?
  • Why is DR , BCP not the main  goal of cosmos , how is it different ?
  • __ consistency is best when Performance is more important than consistency.
  • __ consistency should be selected for high consistency and for most recent data.
  • Explain session , bounded and prefix consistencies ?
  • What is multi-api support in cosmos ?
  • Explain the hierarchical structure of Cosmos DB ?
  • How to connect to Cosmos DB using C# language ?

Lab 6 :- Azure Fabric  and Micro-services

  • Why automation is must for Micro-services?
  • What are the infrastructure issues when deploying Micro-services?
  • Define Azure fabric in one sentence ?
  • What is the use of Azure fabric SDK and Local cluster manager tool ?
  • Differentiate between stateful and stateless microservices ?
  • Explain the importance of configuration project in Azure fabric projects ?
  • Explain the importance of “StateManager” in stateful projects ?
  • Where is Web application URL configured ?
  • Differentiate between LTSC and SAC ?
  • What role does certificate play in fabric ?
  • what is the use AD user in fabric ?
  • Explain Azure vault ?
  • How to publish using visual studio to Azure fabric ?
  • How to use client certificates for deployment and management ?

Lab 7 :- Azure Table , Partition , Rowkey

  • Define Azure Tables ?
  • Explain the importance of Partition and Row key ?
  • Azure tables are same like RDBMS database , true or false ?
  • Explain the architecture of Azure tables ?
  • How to connect to Azure tables using C# language ?
  • C# Entity classes should inherit from _ to receive Azure records ?
  • What are TableQuery classes in C# ?
  • How to perform insert,update and delete using C#  on Azure tables?
  • How to do batch inserts using Azure API ?
  • What is the consequence of not writing point queries ?
  • How does duplicate data increase search performance in Azure tables ?
  • How does storing aggregate data benefit in terms of performance ?
  • When should we use compound key in Azure tables ?
  • What is EGT ,  can EGT be done across tables ?

Lab 8 :- Block  blobs , Append blobs and Page blobs

  • What are the different types of Blobs?
  • In which scenarios we should use which type of blobs?
  • Can you explain the working of block blobs ?
  • What is the size of individual block  blob ?
  • How many block blobs can be accommodated in one blob ?
  • Explain the hierarchal structure of account , container and blobs ?
  • Explain private , container and blob access levels ?
  • What are the broader steps to create blobs ?
  • What is the importance of “SingleBlobThreshHoldInBytes” ?
  • What happens when we specify “StreamWriteSizeInBytes” ?
  • Differentiate between “SingleBlobThreshHoldInBytes” VS “StreamWriteSizeInBytes” ?
  • When should we use  “PutBlock” and  “PutBlockList” ?
  • How can we get committed and uncommitted blobs ?
  • How can we download block blob ?
  • Explain the importance of “StreamMinimumReadSizeInBytes” ?
  • How to use AppendBlockBlobs ?
  • Can we update appendBlockBlob ?
  • Explain “WritePages” and “Read” methods of page blobs ?
  • What does “Seek” method do of page blob ?

Lab 9 :- Azure Queues , visibility timeouts ,Peek & De-Queue.

  • What is the need of Queues?
  • What is FIFO in Queues?
  • How to add message read the next record?
  • Does PeekMessage read the next record?
  • How to do a De-queue in Queues?
  • Explain visibility time out concept?
  • How is GetMessage different from Peek?
  • How to read bulk messages from Queues?
  • By default In GetMessage visibility time out ___seconds.
  • How to update a message?
  • What is the MessageUpdateField meant for?
  • What is importance of MessageId and Popreceiptid?

Lab 10 :- App services and Cloud services.

  • Different ways of publishing on Azure
  • Cloud vs App services
  • Impact on resource groups
  • Web role , Worker roles and Web jobs
  • Loosely coupled vs tightly couples deployment
  • Configuration files in Azuredeployment
  • Doing RDP in virtual machines.

Lab 11 :- WebJob and background processing.

  • Why WebJobs?
  • Types of Webjobs (Triggered, Continuos.
  • View logs of WebJobs.
  • CRON expressions
  • Always on importance in continous webjob
  • Storage accounts in Webjobs
  • Publish website and webjob using VS

Lab 12 :- Azure Devops using Azure pipeline

Chapter 1 :- Full Form of DevOPs
Chapter 2 :- Dev & Ops department delivery issues
Chapter 3 :- Defining Devops
Chapter 4 :- Myths of Devops
Chapter 5 :- Devops, Continuous Collaboration
Chapter 6 :- Devops using Azure Devops
Chapter 7 :- Creating Organization and Project
Chapter 8 :- Creating the Plan, workitem and task
Chapter 9 :- Creating a clone of the repository
Chapter 10 :- Creating a MVC core project
Chapter 11 :- Ignore using GitIgnore
Chapter 12 :- Checking code against task.
Chapter 13 :- Create build using pipeline
Chapter 14 :- YAML, Yet Another Markup Language
Chapter 15 :- Running the build YAML pipeline
Chapter 16 :- Making build Continues and automated.
Chapter 17 :- Checking continuous build
Chapter 18 :- Creating Azure VM server to host the build
Chapter 19 :- Creating the release pipeline
Chapter 20 :- Checking Commit, Build and Golive automation

Lab 13:- MicroServices using Docker and Azure

Chapter 1:- Issues with Monolith Architecture.
Chapter 2:- MicroServices Architecture style.
Chapter 3:- Deployment using virtualization.
Chapter 4:- Deployment using Container.
Chapter 5:- Creating the projects for Docker Demo.
Chapter 6:- The Docker File.
Chapter 7:- Creating MVC 5 Docker file.
Chapter 8:- Creating DockerIgnore file.
Chapter 9:- Creating MVC Core Docker file.
Chapter 10:- Creating Azure VM and Installing Docker
Chapter 11:- Creating MVC 5 Docker container.
Chapter 12:- Docker Build, Docker Run and Docker inspect command.
Chapter 13:- Creating MVC Core Docker container.
Chapter 14:- Running through important commands of docker.

Lab 14 - Azure Virtual Network(VNET) and Network Security Groups(NSG).

Chapter 1:- Crerating Azure Virtual Network.
Chapter 2:- ID Address and subnetting fundamentals.
Chapter 3:- Understanding Subnetting.
Chapter 4:- Adding virtual machines to network.
Chapter 5:- Configuring ICMP packets in firewall.
Chapter 6:- Configuring network security group.


1. Lab 1:- Azure,Cloud,SAAS,PAAS and IAAS.: Hello, everyone. And welcome to lab one off. Learn as your step buster video tutorial. And it is forced lab, which is approximately off 45 minutes. What I will be doing is I'll be going and I'll be hosting ah website on those your portal. So what I will do in this 45 minutes, I'll be doing the falling first. I will start with fundamentals. I will first talk about what they see as PS and Diaz. Because without this, you won't be able to understand what is cloud and what is as your And once these terminologies are cleared and I will talk about us, you're in cloud. Once that is done, I will help you in understanding how to go and read Stern on the is your portal and how to get your free credit limits. And once that is done, we will go and will create a simple website or a simple HTML page on. We will deployed on those your portal. Now, while I'm doing this demo, I will be also going to lot of small, small things. I will talk about resource. I will talk about resource groups. I will talk about a predator. I will talk about service plans. I will be doing FTP and so many things. So it's a promise. If you go through this 45 minutes, you would be at least in a position to go and host your first website on the is your portal . So let us start now before we start with us. Your before we go into us, your we need to understand something called us Cloud. And in order to understand cloud, we need to understand three terminologies CIA's PR's and years. Now you can see that I did not spell it as SAS passed on. And I did not spell that because very spell this word. I A s right. It looks very embarrassing, right? So you can use my trick against the CIA's be as and yes, light. So let us first try to understand these these three technologies so we'll start from right to left. You first understand these three terminologies, then we will define cloud and then we will define us. Your No. I mean you really go to a whole host of upside. So when you actually go toe some hosting provider and they say you want the host of website . The hosting provider has to give you a lot of services. He has to give you hard disk years to give you bhangra tears to a locket. The ram Here's to awlaki do CPU. He has to allocate virtual machines. Give you software's on so many things, right? If you see these services, we can do wide into three categories. So these all services we can divide into three categories. One is the infrastructure service. Another one is a platform service on the last one is a software service. So let's quickly run through each one of these layers. So the infrastructure layer is the metal part off your hosting. So metal part means it has ram hard disk virtual machines to Cebu, your routers, your networking. Everything is in this layer. On the top of it, we have the platform earlier. You know which has operating systems. Probably you need databases like this Will server Oracle unit frameworks like job are dot net Oh, are like angular, right? You need web sellers like eyes stomp. Got a packet? So is this. This is basically your platform, you know, which makes this metal alive. Remember any hardware which would buy right? You know, one Lee becomes alive or when he becomes useful. When you have the necessary software is like operating system and so on. So that is a platform part. And then the third layer is the software's clear. Where in we need we have applications offer, for example, probably You have a male software for your website. You have invoicing. Must be or you have accounting Softwares or you have a control panel. Right? So all that thing actually comes in the software earlier. So in short, no ven any hosting provider wants to give you service for hosting of upside. It is classified into three layers. One of the infrastructure earlier, the platform Lear and software live. Now, if you're supposed to do all of these things by yourself, it is quite a for hard work, right? So, you know, like for example, if you want to host of website and you say that I will do all of these things by myself, Then you need 200 data center. You need to buy the opening system license a friend. You need to get the hardware store CPU, the ram, the whole box right unit. We need technicians. You need to network guys. Units did have these guys. You need hardware engineers and so on. Right. So basically, you pay a friend all the costs, right? And you're not aware. Still have your site will be giving you How much are why right or how much money? So you'd like to engage with the web hosting provider in such a way that you'd, you'd you'd want It will be elastic. You'd wanted to be flexible. Uh, you want to pay for one? Lee, what do you use, right? In other words, you wanted to be on the mind. So in cloud, what happens is it follows the two principles off all so that two principles over and all. So all the first war stands for on demand on demand means I will say that. Okay, I just need one GB time. I wanted to be hard disk for 10 days. Right, So forces off. The first principle off cloud is that it is on demand. It is flexible. It is elastic in nature. So I can start with like, let's say, you know, a simple machine like 40 baram and 200 TB hard disk and two more if I If I go, I've and say Okay, now I want the Age of Iran machine so I can I can scale up and I can scale down right and I will pay one Lee for what I use. The second thing is everything is outsourced. The second old stands for outsourcing means everybody about who takes the backup who installed the software very procured it from right so that the resources part also declined over here because everything is outsourced to your hosting provider. So cloud has the too big goes. The 1st 1 is everything is on demand. It is elastic and the 2nd 1 is everything is outsourced so that you just concentrate on your website. You just concentrate on your business. In other words, you know we want things to be as a service again. I repeat descendants. You want to deliver the hosting provider in terms off services rather than buying things off front. For example, when you go to a hotel right to eat, you do not worry about the cook. It's not worry about. You know what is happening at the bag from varies buying things you say you just place your order, you eat it and you go on after that, washing the dishes, keeping the place clean. Everything is the headache off the restaurant, right? So heralds a few 100 deal in terms off services. So it is possible that I just want the infrastructure as a service or must be. I want the platform as a service and all. I want just a soft dresses service. So basically, if you want the hosting provided to provide us of flexibility, saying that which layer you want and from that which item you want as a service and for how much time. So that's what exactly cloud is all about. Cloud is all about on demand and outsourced. So now coming to a zero. So now that we know the definition of cloud So what is as your as your is? Nothing. But it is Microsoft's cloud. It is the solution given by Microsoft for cloud. So if you see like you can see that I'm logged into the azure portal, I will I will come to the steps of how to go and resistor toe your portal. But here you can see I can go and I can scale up and I can scale down elastic. That's a very important word. So you can see, like when I go and choose any kind of a service, you know, for example, we can see years. Uh, I can go toe any kind of service. I want toe add a service. So and so I want to go and just host a simple website. Now, when I go to hostess website, you know, I can go and define that what kindof plan I want. I can go and see that. Um I just want it to be free. You can see this is the thing which is free with the one GB storage. Right? Or I can just pay some money and say, Okay, I just I want one GB storage, but I need some domain names as well, right? Custom domain. Straight or I can s So let us say I start with free and my website goes great, right? And tomorrow found going upgrade. I don't have to send a mail to the hosting providers saying please upgrade and then negotiate, right? What I can do is I can just go and change my plans. So I can just go help. I can scale up and I can choose. Must be this service. You know that I will say Okay. I want a forecourt machine with 14 GB ram on 2 50 GB hardest state. So you can see like this is the most important part off a cloud that you can scale up. You can scale down. You can pay as you use, right? So if I going hostess service so he will only charge me for the time have used it. If I go and shut down the website, I will not be charged for that. So normally when you buy from go daddy or from other hosting providers, they take the money upfront from you that they are not elastic in nature. So they say that Ok, here is my standard package with this much hard disk with this operating system. With this, this does this That's it right now you use the same website or you do not use of upside your to pay it up front right. While in case off a cloud based solution like as your Amazon, you will pay one before. What do you use? That's a big difference. So that was a definition off cloud. That was the definition off a zero And that waas the understanding for Diaz Diaz and see us . So the first step is we need to get access to the is your account rate to those your portal . So go ahead, toe account that as your dot com fill in the registration now, in order to get access to the three services right, So you can see it gives you 12 months off free service with 13,300 off your credit. Right? And it also says that this is a freak free account. It does not automatically upgrade to a paid subscription. Now ₹13,300. Approximately comes toe are $200 approximately. Okay, so you need to provide your credit card in orderto get access to the US your services. So please do go and provide it and asked my constructed saying that there is no commitment . They will not be a bleeding automatically to pay subscription. So I don't think that the money will be deducted right, So go ahead just to yourself and get access to the free as your credit so that you can go ahead with streaming. Now, once you log into the site, are once you register on, does your side You get access to a portal like this so you can see now I'm actually surfing portal down as you're not come. So I get access to the site and when I log in, you can see in my messages. It says that you have some free subscription trial and this is the amount right now, One very important tape. You know, before you start learning as your as your has Lord off services, you can see that the left inside Look at those menus. You know, they are huge in numbers, right? These men is also have sub menus inside it. So do not try to learn all of this in one go. If you try to do that, you lose stamina and you will not end up anywhere, right? So for the coming one or two hours, try to follow me. And once you're inside as your project, you can go and hunt for those hiring services. Right now, as we said previously, that at the end of the day, the whole goal off cloud is that we want to actually go and avail services. We want to go and book services, and we want to pay. As for use, right, So as you're actually, what you have to do is actually go and say that which is so says you want. So you need to log into Azure Portal and say that I want a virtual machine off Windows Server 2012. I want a school. Several DBM is I want a nice server, right? So in short, you know, if you see out here, there is something called a resource is that's the first thing you can see. There's a dashboard here at the left hand side. This dashboard actually shows you the overall things. What is happening as your I will talk about this later on. Let's go to Resource is so against that, the left hand side you have a resource, so basically in as they are, you would be actually going and adding of the sore. So he said, Okay, I want to go and add Windows Server 2016 Virtual machine are I want to go and add the storage device. I want to go and add this Web project right. So, in other words, in azure, we actually first create our resource. Now, when you're working with bigger projects, you would be dealing with a lot of resources. You would be doing that 50 60 the sources at one time, so you can have a resource call. It's a server. You can have a resource, which is the database. You can have a resource, which is a Web server and so on. Andi, for better management of this resource is you would like to group them. For example, do you like to create a resource group? Call us the development and in the web development, you will say Okay, this is a web development for X X Client on it has the server it has the street of is so you'd like to group these resources so that you can do accounting. You can better manage them and so on. Right. So you can see over here in the portal. That is something called less Resource Group. So first thing is in this all resource is you will see all your resources. What is there currently in your portal on in the resource groups, you can go and create a group and put the resources into this group so that you can do better accounting. You can better manage them. So let us first going create a resource group here. So I'll say. Okay, this is a resource group. So I have clicked on. Add here and let us name this resource group as, let's say, web development Web development for blind one. So there is some client one out there and for their client one. I'm gonna go and put a lot of resources. So have group them into a group named Carl s. The development for Client one on the subscriptions are just wanted to have this free trial . I will use this. Now. You can see there is something called us Resource group location. Right. So what exactly is this? Now, when you take any resource, for example, when you take a server, then that server is actually running on some data center, which is probably us probably in UK. So you can say that Look at this server actually runs on and on the U. S. Data center. So you have the the flexibility to pick up the geographical location. Very one that we supposed to be located, For example, if I am from India. So I would like to take the data center, which is near to India. Right? So each one of these resources can have their own job. Difficult Data center. Now, in the resource group, we have the meta data stored the meta data store for all of these resources. So you would like to store that meta data into some data center. Right? So that's why we have this small thing. Your car less resource group location. So this is that very want to store the metadata off this resource group? Please note. This is the meta data, not the actual resource. Right. So I'll say Okay, I want to store it in us at this moment. Please fix the errors. Okay. Looks like the resource cannot have alphanumeric characters and so on. So let's say Web development, right? Web development Client one. Okay. On D c, create. Now, the time I said create. You can see that it tells me that the resource group has been created, So if I go to resource groups, I can see this web development client one. So now that you have created the resource group. Now it is time to go and add The resource is to this resource group, right? So how? Let's say that you want to go and host of upside. So what I've done over here is you can see that I have Ah, very, very simple folder here. And in this I've created vanished email page on DA in this html page have like, this is my first does your website. So let's say I want to go and hostess html page onto as your right. So for that I need to go. And a locket resource is right. So, to this resource group, I will go and do that. Now, remember a website, a mobile application of application. These are all applications, right? So far, the applications. You can see that there is a menu here. Collison ab service. So anyone to go and you know, you know, host of upside or host of mobile app or hosted a p A service. This is a minute what he will select on. So I'm gonna go and click on APP services. And over here I will go and say adhere now as far as to say add it actually gives me a lot of flavors of applications saying that Is this a simple of application? Is this web application with SQL Server is an APP service. Is this using WordPress site course? We can see lots off flavor out here, you know, you know, with which you can use here. So currently all said this is a very simple way of application. And click on this Andi, I will say here, create Onda. Let's give a name to this app now. Whatever name you give to this app, it will become like the app name dot as your website start net. So for example, if I give a name here are test my app You can see like all the names have been taken till now. So I said just my app and Mumbai Okay O r and India dot as your website start night. Right, so they say, Look at what is a subscription. The substitution is a free trial which I'm using for now on. I will add this resource to this resource group so you can see it now. I'll go and add this to this resource group. Remember we said that resource group helps you to put the, you know, put proper, take the resources and put them into ah ah, specific container so that you can monitor them. You can do accounting, right? It actually groups them into a specific logical unit right now, depending on what technology reviews must be. You want to use the Windows operating system or must be on to use Llinas. Right? So I'm gonna go and pick on windows at this moment after this. He says that. Okay, so this app for this app, how much do you want to spend? How much heavy resource is do you want? Do you want one GB Dan, Do you want to gp time? Do you want dual core? Multi core. But also you can see that is decided by this absolutes plan here. So I'm gonna go and click on absolutes. Plan I just moment. If you see here it is actually, if you see by default this'll APP service is using a standard plan at this moment. So let me go and create my own plan. So if I say click on this plan so it says so I'll say this is my plan. 123 Okay, um, Now it says that. Okay, so this plan is is applicable for which geographical location. So it ensure insurances that very want to store the meta data off it. Very want to allocate the service. Right? So I will say us at this moment, I will leave it. After that, we have this pricing beer despite in tier. Uh, depending on what? What, despite in tier defines that How much money do you want to spend on this app? For example, if you see that no, like, this is just a test app must be. You want to just use the one GB storage? If you say no. Like, I also need some domains than you can say one db plus custom domains. You know, if you say that, okay. I want you know, something mawr stronger. Must we can just go at the top and you can see Okay, I want them isolated virtual machine. You know, a locket to him with the 14 gbn arm SSD and all that and you can see that's apartment costs , right? It is in Iran are, But you can convert it to a dollar as well. Right? So this pricing plan actually just tells you that how much strong resources you want, Right, So it starts from a free and go still isolated. Now, I will not go through each one of these plans out here. You can read it. You can understand it, right? What we will do. As you know, we were already working. We're already using the free thing, right? We have just such a small amount of money, right? So let us go and select this free F one free story, zero month, zero in our per month. So I would go and select this so that I don't spend my money unnecessarily right, and I'll say, Okay, so I'm creating a plan which is actually a free plan. And in this free plan, I've said that I want to use this simple one GB off stories. Nothing more than that, right? And I'll say, OK, Andi, I'll say, created now. One super can created will actually create over the application off. It will actually create us a simple web application. Kind of for directory. If you see out here as soon as I said create, you can see that it is actually doing a deployment. You can see this. It saying deployment toe the resource groups it's actually creating a resource on are getting into the resource group. Right? And once this deployment is successful, it will actually give a message here that it is successful. Right? So against the deployment in progress, and after some time, I hope to see deployment completed. So you can see here you can see all the status year. This is dismissed. This is informational. This is completed. This is all right. So Ah, Okay. What happened? Uh, right. What happened to my messages? Like so uh huh is just gone. Right? Okay, but But I hope Okay, So that it is that it says that deployment succeeded, and it has been deployed to this resource on the group is Web development Client one. Right. So if you go to APP services now, you can see that we have this test map in India right on inside this test map. We can now go ahead and deploy our project, right, So I can click on this desk map in India. So if you go to this just map in India, you can see a lot of things out here, right? As I've said previously, go slow. Do not try to learn all the menus in one goal. Right. So over here, if you see the most important thing is that you would like to know. Um, what are the settings for? This means in other words, which free market is using? Does it have Jiao installed or not? So for that you can click on this application settings out here. So you say that it you know, it's ah, it's an established its I s Web server. And it has Doctor footprint 4.7. It has PHP and all that, right? So I'm not interested in PHP at this moment, I can just all 15 0 so that fighting also have often so against its integrated kind of a pipeline and all that. So again, this is all the settings off I s, you know, which you have been seeing from the I s mineral dis moments. And we won't see it this and have disabled the PHP version out here because I'm not going to use PHP, right, So that's good. So I have created the resource and we want to go and deploy now This website this home dot html into this might test my app in India. Right now, from these stabs out here, let's start with at least three taps. So the 1st 1 is overview in the overview, you can see that. See the resource group name. You can see that the status it is running or not. What is the location where this resource is hosted? F T B and so on. Right, so you can see an aural view off this resource, right? The 2nd 1 between just visited is the application setting where you can go and see that which kind off frame books version has been installed. And what kind off thing has been configured for this application, right? The 3rd 1 which is very important, is the deployment credentials. Now, we would like to go and deploy on this application which we have created right on this web which we have created. So for that, we need to go and create an FTP user name and password so you can see that there is the FDP user name year. So let me go in type of past four years, so I'm just going type of password, right? So that it is. And I will just see if this So I just created an FTP user name and password so that if somebody wants to go and, uh, upload things, you know, he can do it over here. Right. Um, if you want to get the ftp access, you can go and click on this overview over here and on this overview, you can see that the ftp you want it is given here. So this is the FTP you are. So let me go and try to do an FTP. So I'm gonna go and copy this directly over here. So I'm gonna go directly to the FTP on its asking me for the user name. So my user name is this one, right? When a password. So this I should be able tow go and see the fight. So they're the files are there. Now you can see that there is a director here called a site. So they're going to take on the site here. So in this side, you can see that it's a doubling of the root directory. So you need to go and upload your files to this double double root directory. Okay, so at this moment I'm not connected through a proper FTP. So let's go ahead and connect through a proper FTP client. Right? So let me download FTP declined. And there's connect to this as your website and there's host it. Right? So basically what you need to do is you need to go and upload your site in this double double route. If you do not approach in a double double route, you won't be able to see your page. So you can see that I have downloaded this cute FTP software over here on to this EFT abilities go and upload our website. Right. So our website at this moment is a simple home Radish TML peach much bacon. Just rename this to index dot html Pagenaud So that, uh you know, we can just get begin to see those see the site, right? Because index really simple page is the startup beach in the map. So now let's go and connect over here. So I will say a fiery new FTP site. So we already have the credentials so they have to decide the FTP. This is the ftp oral FTP. Use the name. Copy this password and as we have said that you should applaud in the double of the root folder so that it is. You can see the site folder inside the side folder that is double double route. So let us go and upload this website inside this so that this time would have been uploaded this HTML page onto this. And now let's try to go and browse the site. So I'm gonna go and browse this. You are test my app in India as your website start net. For some reason, it did not show up the index tarnished TML but that it is right. I think it's if you rename this to index start HTM that should be the startup. Let me check it. So I've just renamed this to index dot html Onda little c. Okay, so I will check out. You know what is the home page here for it? How we can make it as a startup beach. So that's that's the next exercise. But you can see that I can browse toe my website and it's working OK, good. But definitely when you're working on big projects, you know, you people don't use ftp like their site you would like to do it through your visual story or through your tool. Right? So let me now go and host on NBC application over here. So let me create any SP doctrine NBC application and let me hosting. So what I'm gonna do is I'm gonna go on open visions for 2017. Let me create an sp dot net core application must be or must be an NBC five application. Whatever. And let us try to host it on this Web app. So here is a simple NBC application I have created. I just took the basic NBC replication template, and I just pressed. Okay, so I have not called anything. I've not created any kind off cold or pages. I just took the default template What comes with your NBC replication? And I've created this project. So when I run this project, I get to see the So that's the home page, right? So the baby a seeing this home page in offline, you'd like to see it also online, Right? So let us go ahead and host it. So hosting is against simple your say build and we're safe publish, so you can see this bill and publish Minoso. Let's click on Bill. Publish on. But it seems that so one is that you can directly go and host on us your APP service. Or you can go into a FTP as well, right? So FDP have already done. I will not show it over here. Right? Let us do using the as Europe Service. So I'll say as Europe service, Elsa, select existing one and I will publish now, Once I say publish right, it actually opens of the screen here. And you need to be logged in with your your account. So you can your Microsoft account So you can see here. At this moment, I'm logged in with this quest. Want account, right? So if you're not logged in your toe, add account here. Okay, so it says that. Okay, so that's a free trial. And it is the resource that this is a resource group, right? And you want to host it in this test app? My India stop in India. Right? So I want a posted death. So I we select the steps, stop my India stop in India, and I'll see Okay, so you can see now it is preparing the profile. Onda, let me just hit publish first. It actually doesn't build by default. And once the bill finishes, it will start publishing the site. So to see what happens, you can see now it is trying to publish the public activity so that it is you can see it says published. Succeed succeeded on. If I click on this website, you can see now my sp dot net NBC court application is running on us. You're so that's the thing. Now let us go back to dashboard and little See that where these files have been uploaded. Also, you can see, like over here you're getting notification saying, You know, this has been deployed, it has been reset and all that, So let's go and see that where our files have been uploaded. So if you want to go and see the files out here again, there's one more important ah, men over here, which always use, which is the console. I like this. Let's click on console, and this console is like your normal command probably have so you can see like it has actually taken me to the double double root folder. So if I just go and say directory over here. I should be able to see all my fights. So slow directory. You can see all my files, my app settings or Jason about Artisan. My index s G m m, or my views and all. Everything has been installed out here. Right? So again, remember, this console is also a nice thing. You know, it's just in case you want to quickly see the fights. So remember, console the 2nd 1 which is important, is of properties, right? Andi, The one we have said application settings, right? And the 1st 1 is the overview. So overview, overview, deployment potential site have to be application settings to just see visa frameworks up and console. So for now, just remember these miners. As we said, Do not try to learn all of them in one go as we proceed, we will try to learn more things right. Also, over here, that is Ah. Ah. Nice thing called us an ab service editor. Right? This absolute editor is nothing, but it is online editor. You know, in case you want to just go and change something in the files you don't want to download you don't want to upload, right? So you can go and go to the APP service editor out here. It's asking me for the passwords. Will it be it's telling me to sign in that this strange? Yeah, because, ah, so it's quite a long busted. So me, I've kept such a long name. Your quest Born interview questions at gmail dot com Oh, gosh. So sad. I'm so they couldn't do that. I'm sorry for this email. I d actually, you know, like, if you look at the past history, I've been writing a lot of interview questions, right? So this accord was created at that time, so I just use this icon to create Maziar account and password. So what is this, a directive? This editor is nothing, but it's online editor in a very you would like to just go ahead and ended some files and save it right away there. So you can see now it has opened up. This looks exactly like via scored. So it is like via school online. Actually, in case you're new to be escort, I would suggest to go and watch this video of your score. Very, very explain what exactly is were scored. Right? So this in this year's so here. What I can do is I can just quickly go and edit. Like, for example, um, I can go and edit. Uh, that's indexed art. Html. I can just go and see added something right on. I can quickly go and see if this of that saved as well. Right? So, basically, if you will quickly go and change some some things out here online, you can do it. Now, remember, it's always a bad idea to change something production. But we all know that developers have that, uh, you know, out of the box solution. Sometimes, you know, they decide to find in production, so you can use it once in the white flight. So absolutely sedative console. Then we have application settings, deployment options. Right on. Duh. The old view. Right. So this was a very simple demo, you know, very be actually deployed on NBC application online, so you can deploy by using FTP, or if you want, you can also deploy by using, uh, the publish result. So if you see this bill published results, you have, uh, one is You have the FDP option as well. You also have the is your APP service as well. Also, one more great option off doing a publisher's by getting the publish profile so you can see her. Like what it can do is you can go and go to the overview here and in the overview. You can take on this more and you can get this published, published. Chris, I provide fight. What is this? Published a profile file. This file has the necessary credentials, you know, by which you can go and you can log into the site. So what I can do is, uh I can go here to my visual studio on dykan. Say, create a new profile and I'll say, import this profile light so I can go and say import profile. And I can go and point to that fight so that what will happen is I don't have to give the user name and password again and again. Uh, what happened to the important fight, but file So I'll just click on this import profile. I importance publish settings. Right. So now my publisher, things have been imported right on. Uh, you can see what here. I have multiple profiles. One is FTP and one its web deploy. Right. Um So now what I can do is again just a bill publish Light Onda. Uh, okay. Meaning between something out here chancen remember that if nothing had changed does not deploy anything. So that's again a very good idea. Uh, so Bill publisher and already saying it's not what you want to do. So now what I can do is I can go and I can, you know, select their profile So you can see it. Yes, He has already has his profile out here. So this profile I can go, and I can just same publish on this flight. So remember, you can also use the profile file as well so it can use FTP. You can use profile, or you can go indirectly publish it. So that brings us to the end of this session. 2. Lab 2:- SQL Server on Azure ( DTU & EDTU): welcome to lap to any lap to we will look into how to create SQL server on a zero. So in the previous lab we saw that how we can host a Web applications on as your in this, You know, we will see that how we can go and provision rd bms on as your so In order to do that, you know, the first concept you know, which we need to learn over here is something called us details and et deals. Without this, it's very difficult that you understand how toe how to go and provisions on schools. How how can you provision school? So Verona's your right? So first is you need to understand d two and D d to you. You also need to know how to calculate this d to you by using the detail calculator. So Michael Start has created something called his Did you calculator? So we will see that how toe go and calculate Did you using Edie to And then once we understand the concept or did you and Edie to you, we will then create an SQL server database on a zero and we will apply this detail and needed to concept on what we will also be doing is we will use our SQL Server Management studio. Remember, SQL Server Management Studio is offline tool which helps you to connect to SQL Server So we'll use SQL Server Management Studio and connect to the Azure SQL Server. So this is the whole goal of this 30 minutes video. First, we'll understand. Did you eat details? We will see how the calculation happens off duty. You will also see how you know how to use the detail calculator and there is also a command line which helps us to do that do to your calculation on. Then we will talk about SQL Server. Then we'll go and create an SQL server on as your on. Then we will see how to use SQL Server Management Studio to connect to the SQL Server off us Your So let us start now before we start. Did you before we define needed to you? Let's first try to understand what is that one big reason which has compelled us to come to us. Your what is that slogan which has attracted us to come to us? Your so that one slogan that one thing in which has attracted us to cloud is or attracted us to azure. Is this thing got less pay as you go pay for one, Lee, what you use nothing more, nothing less. So from that perspective, what Microsoft has done is, you know, they have given you something called us pricing tiers. So if you look at your even in the previous video, I have discussed about it. So they have given something called spicing two years so you can go to the pricing tier. And in this pricing tier, you know, they have given Lord off permutations and combinations. So they have said that. Okay, so you know your workload. Well, you know what he want, right? So here it is. You can get a simple virtual machine which is free with one GB storage. And depending on the workload, you can select something like isolated Ah, more stronger virtual machine, which is with four core and 14 GB ram. So, depending on your workload, go ahead and make your choice off your virtual machine off your conflagration. And depending on that configuration, I will charge you now. This sentence looks absolutely fair that you determine your workload, and depending on the workload, you decide your configuration. So you choose from one off these configurations. You know what our given right? And then for that configuration, you make the payment. So for every conflagration here, that is a payment given down below. Right? So if you ask me, this sentence is absolutely five. It says that decide the workload and then decide your configuration, depending on the workload, and then you pay for that price. But here is a problem. The problem is that how do you determine the workload? Because this concept of workload changes from application to application. It changes from person to person the way they view the application. For example, if you're talking about Web application, must be number off. Users are important to you, right? Or, if you are using SQL server or CBMs, must be number of transactions are important or must be. For some people, RAM is important. And for some people, how much is the processor use? This important? So this workload actually is not just a single thing, but it is actually calculated from law factors and depending on the services we use. For example, if you're using RD BMS than the calculation off this Lord can be from a very different perspective. If you're using a Web application, that calculation can be a very different perspective. Let us first try to understand that. Four rd bms for SQL Server Right? What kind off things are taken into consideration to calculate this workload. Now when you talk about a typical Audi BMS or SQL server, oracle or whatever rgb Amos right, there are five important factors which is remind the workload. The 1st 1 is the number of rights and the number of reeds, so the amount off number of rights and amount of number of leads are more. That means the workload is more, and if they are less, that means the workload is less right. The third factor is the amount of RAM consumed. You know, wildest, Yet I swear it is is written to the primary file and read from the primary fight. The fourth factor is the process of percentage used. So when you're reading the State Avenue writing the state out, the processor will work right. So how much is the process of working out on the fifth factor? Is that what kind off. How much is amount of data written to a lock, Fi, when you talk about are the BMS. There are There are two primary fights. One is a primary fight. You know where the actual data decides on, then? That is a temporary file. Call us a locked file. You know, we're in the rough. Two inductions are done. So in this interview, right, the transactions in this relight the recovery options and so on. Right? So what? Amount off data is actually pushed to the lock? Fi. So there are five important factors Which says that how workload for RGB Emma should be calculated. Number off writes RAM. Number off reads CPU and amount off transactions written to a lock fight. Now, how do I take all of these five factors? So let us say I have something with me. Somebody tells me, Okay. The number of rights for a given instances 1000 number of reads can be approximately 20,000 . A number of lamb I need amount of ram I need is to G B and so on. So on. By using all of this, you know who will tell me that I have to use API to veto processor or Peter V two virtual machine. Or should I use the P one or must be? Should I use the free? Right? So how do I now map? So many factors do this pricing tier right for that. You know what Microsoft has done is you know, they have created a unit called us. Did you database to injection units? This generalised induction units is nothing. But it is Ah, calculation, which which is derived from this five factors that this CPU number of rights ram number off reads on. Uh, you know, the amount of data return to a locked file. So if you really asked me, that's the diagram. So r d to is nothing, but it is. A unit in orbit is calculated on the base off these five factors. So the first important conclusion we can make about did you? Is that did you? Is a unit off measure for Ali bms. And it is calculated from five important factors. That is Cebu. Number of rights, Ram, number of reeds and logs written per second. Onda, um, the next important thing you know about did you is that did you say is that. Okay, For this conflagration, you will get guaranteed performance for this. Do to you means what? For example? You look at your logs it in four seconds. You look at your reads. You look at your rights. And then you say that you want to use 22. You fine. So for 20 to you, the basic configuration is okay after that, let's say that after a year your lord increases. Right then you say Okay, now I need approximately It said 30. Did you? So he said looking for 30 d do you don't have to do anything. You don't have to upgrade. You can still use basic. And in that basic configuration, we can guarantee you still the same kind of performance. Then you say Okay, now I need some 100 videos find. So for 100 years also again, you can still go ahead with Basic began into you the same performance. After that, you say Okay, now we need 1000 btu. Oh, for 1000. Did you? I cannot get into you. The performance you need to know. Upgrade yourself to standard. So did you. When you when you calculate your due to you and when you say that? Okay. This is my did you than for that? Did you? That is a specific configuration which is chosen. And then that configuration says that for this range off. Did you? I can get into you performance. So some arising from all of this. What exactly is a did you did you is a unit. Did you? Is ah is a zero unit especially for rd bms which guarantees that for that configuration you will get the necessary performance again. Let me repeat. Did you? Is a unit? It's Aldi BMS unit which guarantees that for the X level of configuration you will get the necessary performance. Now there is one more flavor of detail You termed as he did you. So when you goto as your and when you're creating an RD bms resource, right? Or SQL server resource. Whatever Ali bms you choose. So you select your due to you venue design Or did you for example? Even you say that. Okay, you have You want to a locket five DDO toe a database. Then those details are dedicated for the database. So let's say you go and created EPA scholars db one. And if you look at five d? Do you know other database can used the's five deals? But now let us see you have a instance where you have to data basis like DB one and DB two . So let us say that in the morning, db one consumes a lot of reduce and db two does not. And then in the evening, give it to consumes a lot of videos and db one does not. So rather than allocating dedicated deals, you can go and you can allow the locket, elastic videos, shared videos, the calculation of dues. Either it's a deity or a D do does not change its the same thing. Okay, so the calculation by using those five factors, they don't change. But Egypt use our shared among many data basis. Okay, so you create a pull off. Did you use Andi? That's dumb. Does he? Did you? So did you Is dedicated for a database While he did do is a shed full of details which is shared among multiple databases and also in Edie. Do you can define a meaning the max So you can say that. Okay, the minimum he did you you can consume from. This is four. Let's say and the maximum you can consume is eight. Why do you want to do a minimum and a maximum? Because you don't want one database to take all of the Jews. And the other database does not have anything. So you can also define ah, meaning a Max in the e d do pool so that all the databases get at least a minimum set of videos. So with all that knowledge I have at this moment, it is now time to go and calculated to you. So we know our workload. We know that. How many lakhs four seconds are written. We know that home. A steep use utilized number of reeds. Number of rams. Right? So how do we know and now go and calculated to you because, uh, you know is that formula you have to learn? Do we have to know some literature and so on? Right. A lot of things are there. Ah, so you don't need to do any one of these. You can go to this site. Call s DT. You calculator? Don't as your websites start that. So in this site, you know you can go and you can upload a CSP file. You can see that there is a file upload given out here s so you can choose a file and you can upload the CSP file. And in the CSP file, you need to go and put all those factors in which we have discussed right to you to go and put you know how much is a process of time? You know how much is the discrete, so much of the disc rights and so on and then uploading CSP file over a year and then say calculate. But now the question comes, Is that okay? From where do I get this CSP file? And how should I do things, you know? Because, for example, let us let us consider a situation. You know, where you have offline SQL Server, which is running, and that offline SQL Server. You want to migrate to us? You're so you would like to go and run some kind of a tool on if that tool can capture. You know, all these values, like number off, you know, log certain and processor time and all that right? Then I can go and upload that Since we filed was your and then decide that. What is my final configuration bite? So for that, you know, they have also given a command line utility out here. You can also and run a power shell script as well. So if you don't know this command line utility, you end up with some kind off things like this. So you can see that when you extract extract that command and utility it's actually is if I or our file if you extracted you come to something like this Now, in this, you know, there are two things. One is there is a conflict file and one is that is the XY. So if you go and if you open the conflict file so what happens is in the country file. So if you go and see the country file Oh, too many things are there. Opened conflict five. That is my Oh, okay, let me open originated Plus how revolution version look so that it is this conflict fighters out here. So this conflict finally say that I'm gonna go and capture all these counters right? Describes, disagrees and so on. And I will put a file in the C drive in the temple. Okay, so with all that, let me go and run the C XY. So this actually goes and this run se xy on. What does he XY actually does is it actually goes to your computer and it goes to your school. So, for instance, and it starts capturing the values. So you can see at this moment I haven't SQL server running on my machine. It actually goes and capture. Solve this, and then it goes and it gives out to file in the seed temp. So in the C temp directory, you can see that there's a file which is made. So this one is a recent one, like in just this one is a recent one plate. So now this file, if you open it. So if you open this file in your excel, it looks something like this, right? So you can see that that is a time here. And then there is a process of time in the disk reads and all that. Okay, so this file now defines my workload. This file has no captured my workload. Right? So now what I can do is now I can go to my school to this site here and I can say that. OK, I'm looking for Ah, to your machine. Now you need to go and define that. How much cools you want? Okay, the scores are not calculated automatically, so this you need to go and define. So I'll say that. Okay, um must be I need at least two core machine. It must be a one core machine. Let us say for now just to be just to be more miser. So I'll go into the file year and eso that is in my C drive in my temp. Right, Seamus? You driving attempt so I can take up the latest file like this 14 30 a. M. I'll take this and also calculate. So once I do a calculate, it looks at my performance levels. And then it decides my service Stay a tear. The service here is nothing, but that is map to your pricing tiers. Remember, the service years are nothing but the standard basic, isolated premium and so on. So that is your service tear. So it seems me that based on your database utilization, we recommend that you might get your SQL server workload to standard as one, right? So you don't have to worry too much about how to calculate a duty. You you can just go to this detail calculated, or as your websites dot net, capture your CSB file using the utility and then upload over here on from that you can you will get a recommendation saying that what is good for you now What I do is that I I am a technical myself. So what I do is that if you suggest me Standard s one, I try to go below that first just for testing purpose, right? If it works well, I just keep it to that level. If it does not, then I go and actually, you know, take the second ation. So what I do is that whatever is recommended by Microsoft, I tried toe go below that. Why do I go below that? Because I believe that you know, when these calculations happened right there, you know all the vendors and they try to give you a top number. Right? So if you say okay, this is off ₹100 that they will try to give you as 200 repeats, right? So always from the negotiation perspective. What I do is that I try to first go a lower and in case of the Lord and is not meeting my requirements. Then I go to operate and right, But be very careful with this approach. In case your, uh, project is very mission critical. Lot of people are using it. Don't take that risk. But in case of project is not so critical. Then you can come to the negotiation table. You can go below down. If it works, it is great. If it does not, then you can take the necessary recommendation. So now that we have understood the concept of duty you and Edie to you. So let us go ahead and create an SQL server database and let us see that how to apply these principles So you can see at the left, Manu, there is something called Esqueda basis. Here you can click on it and I'll click on add here on Let's give up database name. So I will say this is my DB one. Now remember that I had a free subscription, if you remember. Okay, that free subscription has expired. So with all my heavy heart. I have put my credit card out there on he has given me PS. You go. So what I will What I will be doing is as I've said, I'm a technical myself. So I'll be creating this account. I'll be showing the demo. I'll defeated. I guess I'll create this SQL server. I will use it for some time. I will show the demo and I will delete it. Okay, So even if you want to learn you can do the same way. Do not try to hunt around for free as your process. You know, it's it's very rare that you can get as your past for six months, right? So learning as your will take at least 34 months. So I would suggest go and put your credit card When you put money for knowledge Nothing. Nothing goes waste. Right. So I put my credit card and I have got this p s You go. So I'll say Okay, this belongs to this group. So remember we had talked about groups resource groups in the previous classes Onda. He also then gives you options saying do you want to create a blank database? Are like if you want to go and, um, you know, create from a sample database like adventure work. So I'll say I want a blank database at this moment. Now you can see here is a conflagration that do you want to use elastic pool. So if you say yes, that means you'll be using e d to you. So if you press this year's, it will actually give you the facility to create Edith You. If you say not now, that means this will create. Did you? So remember when you say just did you it is dedicated to our database. When you say Edie do it is shared among many databases. So how? Let us go ahead and click on conflict. The server, remember, you have one is the database. The other one is You need a server. Instance on visually Debbie's runs right. So this is my instance on DA. Whenever I want to connect to my database, I'll be connected to this instance. Okay, so instance means this one this the server name. This is the silver name. And inside this we have database, right, so you can see open my management studio. So when you go and actually connect. You connect to an instance, and in that instance, you can have one database or multiple ones. So that is that instance, I'll say. Yeah, this is my instance. Oneto three something and some user name and password you need to give here. So I'll just put your admin and some password here. What is this area? It says you cannot ah, have admin. Is it? So I'll just give it over here? Let's say shit. She wa Yeah, that's a nice word. Okay, on, Let me put a password here on day yet also ill put a password, right? Okay. Everything okay? This will be created. Invest europe in case you wanted somewhere near. Please go into the location if it is available and also select so that you can see now I have created my instance and it is now attached, you know, to my data bees. Now I have selected decisively to you. So it say that Okay, I will give you something like 100. Did you? You can see this is a standard one s tree. You can see this 100 btu, right? So if I click on this, it also gives you more options. It says that Okay, For this standard, the ranges from 10 to 3000 Did you? And it will cost you ₹1000 approximately per month. My 91 right. If you want something like more than 4000 then this is something a premium. So if I click on Premium, you will see that I'm getting a different kind off figure here. Right? So let me just go and select the basic one. I just want five d to you so you can see this is a basic five d to you on. I can also go and put a very less storage. I had this moment as I've said, I'm here for teaching. So I don't spend too much money. Right? Eso I've just minimize it to some small figure out here to G B. So you can see now then as your is talking to you about rd bms allocation. It's talking in terms of did you And if you remember I said that Did you say is that for standard? He guarantees that till 3000 d to you you will get the same kind of performance. But the time you say If you want for 4000? Did you? And if you are still on standard, your performance will Dettori it for that. You need to go and take premium. Right? So at this moment I'll just take this five. Did you think I'll keep it minimum? And I will say apply So that that's that's a scenario for Bure. DT you right? In case if I select elastic pool, that means et to you than the scenario changes. So if you look at this elastic DDO you will find now things are different. So I've clicked on elastic due to you I will add elastic it you pool Now you can see that he is asking for a pool name. So this will be pulled one right? And this full one I can attach to multiple databases. Remember, Elastic is all about sharing This did you was with multiple database. You can see on the comment at the top, right? So again, here you say so. Conflict area pool eso I can I can go and stay confident My pool here on I can see Okay, I am looking at Max two Max, I'm looking at 22 You and minimum I'm looking at 10 duty. Remember when I explained the fundamental of Edith Do I said that in E D. Do you need to specify the max and the mean? Now let us say that the maximum this pool has is 22. You on. Let us say if you have to databases than one database, if it consumes a whole 20 tt you the other database would stop. Right? So now with this, what happens is I say that minimum to minimum one database should get tended to you, at least right on maximum. Yes, you can try for 20 if it is available so you can see enough with this range. You know, we are becoming fair to all the data basis which is belonging to the elastic pool. Right? So for now, let me go and choose this elastic pool at this moment and desist. Select. Okay, select that. It is so also, I can go and configure my pricing tier. I'll just ensure that I take the basic one. I'm not really interested to take a big one. Right. So you can see now this is a very basic 50 e d do on this 50 e did to you Is ah shared in such a way, right? I've have also created a needed to you. Right over here. Andi. Ah, Let's elect us. Right. So that is my elastic pool I've created. And this elastic pool. Now I've assigned to this database, so I couldn't call us. Pull one on tomorrow. If I want, I can go ahead and assigned this pool one to someone else as well. Right? So that it is my DB one is created. Andi. I will just sit create Onda with this. You know, it should actually go and create an SQL server database. It should actually provide me an SQL server. Services should provide me a school server services to be light so that it is It is going and creating the SQL database. Let's wait for a minute and two once you know, the database has been created in the alerts. It will tell me that everything is created, so yes, validation is successful. That is I'm so happy to hear that right. Let us see what happens. Also, you can see that he's showing me that the deployment is in progress, right? So once you know the deployment is successful, it will actually show me My swill server has been created, right? So let us give it a minute or two until this deployment happens on. Once the deployment is successful, then in my SQL database, it should list over here, that database name. And then what we will do is we will go and connect to this SQL database using our management studio. And once we have connected using the management studio, the rest is easy, right? Creating a database, creating a table, creating a stored procedure. All of these things remains to seem so. Now I can see that the deployment has is successful. And if I do a refresh, you can see that my DB one is online. It's PS. You go right, I can click on it. I can see all the properties over here. Now you can see that this is my my instance One right. So I'm I I can connect to this so, you know, from SQL Server. So I will copy this on dumb. I've been Give it over here. You can see I have directly copied my instance. 123 dot windows dot net. Andi, I will say squeal. Several authentication. If you remember, I have put to use the name is Sheila and my password right at 123 on this should actually now go and connect to my online as your you can see here before connecting on vinyls your you know, just to make sure that everything is right and everything is more secured. He's telling you that you are not signed into us. You're so let's go ahead and sign in. So with this, you know, he knows that you are a proper as your user. So I'm gonna go and sign in. Um, so at this moment, I'm using this thing. Quest Born interview questions at gmail dot com. That's such a horrible idea. I'm using that. So let me use that quest. Pond interview questions gmail dot com. Okay, I'm sorry. You know, it's a horrible idea, but I just chose that I d at the start, I'm going to use it on Duh. I hope you will ask me for a password so you can see, like, over here. Also, there is a double security just to make sure that people are not connecting through Ah unknown SQL Server management studio. Remember, when you're connecting through SQL Server Management Studio, you are actually directly connecting to that port, right? So it's it's just making sure that someone known user is not getting connected. So that it is I've given the proper I think so. I hope that once this is done, he should allow me to log in, right? It's doing something. It's saying not responding. Okay, We'll wait until I get a success. So that it is It is validating. It is authenticating. It is authorizing. Okay, Okay. Oh, why? What happened? Isn't that I put some wrong passport here, is it, um, so that it is. It is valid. So you can see now also can add my client i p and allow me to connect so that it is connecting. So remember to expel several management studio. It almost human remains the same thing. But the only thing what changes is that you need to again log in details your account for the double security check. Right? So once it is connected, you should see your object exploded. So you can see at the left hand side. Just move it in between so that it is like this Big Blue But things are same. Almost the baby have done it in SQL Server so that you can see my DP want right? I can go into it a table year so I can go and create a new table. Absolutely seemed the way you have done for your normal offline SQL Server. The things hold seem so I can go and give some table name here. I can create tables. I can fire a squeal. You can use their schools. Several management story almost as you were using it offline, right? It's been slow because we're directly operating online, so definitely it's it would have a lag. Right? So let us say I create one table year with the I. D. On said this is an end of primary key. Okay? Okay, My mouse. So this would be named on something like envy. Right on. Save this said this is Steve bl one table. You can see almost all the steps of same the way you have done for SQL Server offline, right? So that waas the basic thing, you know that how to go and create on SQL server database on as your and what things you need to remember when you are actually creating or providing this rd BMS service. You know, you need to remember the de Dios. You need to remember the easy to use and so on so you can see almost same the very of done rightly added, selected all the things I've seen, right? Also, if definitely no one of the ways you will use this as your PBMs in your or SQL server as your body bms in your NBC application or she shop application is wire connection strings. So you can see that there is something called us a short database connection string here so you can go and click on this connection string on. You need to copy this connection string into your NBC application in the conflict file. You need to provide your user name and password, and then you can connect it in the same way. You can also see that if, in case you're connecting why Ajay BBC You know there are some other connection. Strings of those are also provided at the top, right? So that was this basic video. So in this video, we were trying to understand what it takes to create SQL Server Resource on as your now before we proceed to the next video. Here is a small request for everyone. You know the record. A lot of videos. We put it on Quest, born right, but we need to get the pulse of the audience. That which video cities they're looking at more. For example, if you're seeing NBC V record more on NBC, if you're seeing designed patterns with a core moral designed patent site, so do let me know that if you're watching those, your series on which video you are on so you can go to facebook dot com slash quest born. And you can put here that I am on your lap to my mom knows your lab three right as we go ahead. So that brings us to the end of this video. Now the next video is going to be on function. APS. That is something called its function option. Is your very sleek Very nice. So we'll talk about that. Thank you so much. 3. Lab 3: - Azure Functions.: so welcome to lap three. And in lab three, we will talk about something going less function APS. So this lab three is going to be approximately a 25 minutes of video and it's 35 minutes or video. First, I really defined You know what its function have what is important or function. APs Then we will see how to create function app using a secure portal. So there are various ways of creating function AP One is that you can create by using the azure portal, right, create function abusing portal. And second, how to create function app using visual studio. Right. So again, we'll see how to create using real studio. And also we'll talk about something called us in scale controller which actually helps you to scale up and scale down, up, you know, the resources which are used by function app. So this is going to be 25 minutes of video and in this, you know, we are going to go and see these things. So let us start as your is a great cloud service. And in this cloud service, you know, we can host big applications like Web site SQL Data basis. And when we host these big obligations, we need to host them in a virtual machine which actually costs us. Right. So when we host in SQL Server, if you remember, we had actually assigned a service plan and we need to provide a VM. If you remember when we hosted web application in the first video, we needed a VM, right. So when we're hosting this big things, yes, we need a virtual machine. We can decide. You know what kind of virtual machine we want, depending on our Lord and so on. But now let's think about a scenario. But I want to just host one function. I want to just host 10 lines off court. So when I host these kind off small functions, small routines, small, cold, right, I don't need a virtual machine. I just want to be in a when the chord runs. So whenever the court grants, I just want to pay for whatever I have consumed. That's very know, as your has provided something called less function naps so we can see that the left hand side there is something called its function naps, so you can think about functions. APS I'm nothing, but they are functions. They are small court small routine, which can be hosted on hosted on a ZR video out a virtual machine. Now, whenever he whenever you host anything without a virtual machine, it is also time that so powerless, so function abs are nothing but small, cold, small logic which get hosted on as your and for that we don't need to provide a big virtual machine. Onda. We can host it in a serverless manners, so let's go ahead and create a function app. Onda What we lose in this function, you know, we'll just go and display Hello world. So let's start with small things. Let us not try to learn everything in one go. So in order to write a function app or else in order to add any resource, you know, if you're getting confused, you can always click on this plus sign. So let's click on this plus sign on. Do we want to go and add a computing? Remember, if you want to add databases here it is. If you want to. One want to add Web application? Here it is, but when you talk about functions when you talk about logic. They actually consume CPU a lot, right? So that's why I have tricked on Compute on da In this compute, you can see that there is something called its function up. So let's click on function app Onda let us give a name to this function app not remember whatever function you create At the end of the day they get hosted on cloud so you can see that they get this name like my function dark as your website start net or hello world or as your website start net. Right. So I'm gonna go and create your my function. 123 Uh, you can see my function 12 threes also booked. So my function new. Okay, so my function new dot as your website start net on this u r l I'm gonna go and host my logic. Okay? I've using this space. You go. I will just go and create a new group. But remember that it is always advisable to create a uses group on club them into one resource group so that you can do accounting properly. And, um, now, in the hosting plan, you can see that it gives you two options. One is that if you wish, you can go the old way for a simple function. If you think that your function will be consuming lot off resource is you can go and create a service plan on you can assign a full blown virtual machine to it, or else you can go with the consumption plan. In this consumption plan, what happens is depending on the number of requests which comes to their function. It actually a science resource is so we come to that. But at this moment, you can remember that in the conception plan, depending on the calls made to their function, right. Uh, the function is allocated resources. So rather than using a full blown service plan, I will be using a consumption plan. Um, the location, I'll say that is us for now. Um, on DA now, for a function, you need two things. One is that yes, it will consume Ah, your processor. But it also needs some storage. The source code needs to be stored somewhere, right? So you can see that I am also creating a storage here. So I'll say my new function. Ah, storage, new function storage right on da that it iss So now I'll go and create this function year on DA in this function, then we will go in right cord so we can see now I'm creating and function app with the name my function new dot as your website start net so that it is you can see at the right hand side. It is saying deployment in progress. So after some time, you know the function will be deployed and it should be It should be visible over here. Um, you can also see now. Ah, it's still getting deployed. Actually, uh, let's see fish so we can see that there. My function is created, so I'll go to this function and inside dysfunction. Now I want to go and create Ah, function means this my function new is you know, in this I want to go and add a function, a logic, a code so you can see that I've expanded the my function new and you can see that there is something called a plus sign. Here I'll click on this thing years now as we said that you know, dysfunctions, you know, function absent their logic, But this logic can can wonder. Zannino winsome even happens. You know when some trigger happens so you can see it. Here it is saying that. Okay, these are some pre made functions here. So any host your function, how do you want to invoke it? Will there be some Web ap I or Web Hook which will actually invoke the function. For example, will there be some kind of an SUV request call which will actually involved the function? So in that case, you can take the first option. The 2nd 1 is a time where you know where in the function keeps running, you know, in a certain interval off time. And the 3rd 1 is for data processing. So other two will see later on. For now, let us go to the happy flow. So I'm gonna go and select on Web book plus a p I. Which means that my function will be involved. Why are on http request OK on also, you can see that you can choose different languages here. If you say that you want to ride this function in she sharp or you want to write using JavaScript f sharp or Java so you can see that a lot off other languages Also which you can choose from for a while to see shop. So I'm gonna say create dysfunction. And once you see, create what it does is it actually creates? Ah, you know. Ah, file. Corel s run dot csx You can see over here. Right? And in this you can see that he has put down some kind off she shop code. Let me go and delete all of this. I know that it is so tough to understand. So let me make it simple. Uh, let me see that I want to send a response back. So I go and delete all of this eso I'll say that this function will display Just tell a world. So what I want to do is it is not as England as it is a simple scdp response message against here. I've just removed a lot off court from it so that you can concentrate on the basic part off functions. So in this, I will say that I want to return a response so you can see your the city Quist is the object. And using this request object, I'm creating a response And this response I'm saying, hello, world right world. Let us onda. Um, so I'll go and say Save. I can either see save or I can either Sissy IV and run. So let me do a save and run. No one said it was safe and run. What it does is you can see that down below. There is a window in this window. It actually displays out here. If I do and expand, it displays out here log messages saying that your function is running properly or if there is an error. So I can see here that there are some other here. So I'm gonna go and say copy logs so that I can read this in a note pad so that BP sitting on or patio and let us try to read what it is what's written here. It says invalid class token. Okay, so there's some other problem there, so yeah, so we don't need this right? I'm also a 71 Andi, I'll clear all this logger, you know, just to check. So run. And now I can see that those others have gone from here. So if I expand, I can see, Everything is right now. As we said that this function actually gets hosted on as your on A You are all right. So you can see at the right. Inside there is something called us and get function. You are also I'll just click on this. I copy this. So if I go now to my browser, I can go and run this So you can see now over here that it is displaying hello world. So you can see now my function is hosted in this my function new daughter as your websites And in that it's hosted as an FBI So we can see that this is the A P I slash http triggers she shop one this to your c shop. One is nothing but this thing out here. The name of the function on you can see after that there is some kind of for Korea. This court is nothing but a key on this key. Is there for safety purpose to just check that it is not invoked by anonymous users, right? So that's a very simple example off creating a function app and hosting it in as your now if you want to go and write complicated functions, functions which have must be like in 100 or 200 lines off court, then definitely know this kind off on, ah, online editing on work, right Unit intelligence. You need toe build it. You need to test it offline and then upload it. So for that in in visual studio, we can do that in case we're using she sharp as the language. You can definitely do it. What you need to do is when you install your visual studio, you need to go and installed as your development of workload so you can see her when you actually go toe. You know, if you want to get the necessary support off hosting the is your functions, then you need to go and install this as your development kit. Without this, it is difficult. So once we install it, then you can go and you can create on project. So you can see here yet is my visual studio. So I'll go and create on project also quickly. What I would also do is I don't want to waste money. Remember I said eso, What I'll do is I'll just go and delete all of these resources just to ensure that I don't get unnecessary charges. Right? Because we're learning as your so if you do something once you're done with it, please do go ahead and deleted so you can see Ah ah yeah, some problem again. I can try to delete it. So that's still eat it. Okay, so everything cleared on. I will not get unnecessary necessary charges so you can see her once I have installed as your workload. Then you get this cloud Men, When in this cloud many you can see, you can do a lot off. You're quoting over here. But for now, our interest is dysfunctions. Right? So let me go and create a function. You're saying function something. My function. 123 Right, little see? Okay, so in this Now, let us go ahead and add a new item. Onda, let us go ahead and add off function plus so somewhere we should have as your functions that it is. So add dysfunction one dot CS Now, this is very interesting screen. Okay? This screen was also present in the on land as your portal in that If you remember, you know we had selected. We had those three really made templates and in that be selected web hook and a P I Right. So this small, this dialog box here says that this function is going to get regard by What? Is there going to be some kind of an event? Will the data come from a Q? Is that a timer? What is that an S GDP? So what I'll do is I'll select the most used one for now. Http, TRIGGER And I will say this moment this can be called by anyone. So I'm gonna just make it anonymous. If you select the function or the admin than the necessary keys has to be passed or the necessary, Um, Keyes has to be sent, You know, when you make the call. So for knowledge, let me make it anonymous. As we said, whenever you're learning something first learned the happy pop. Do not try to learn everything in one go like at this moment. If I want, I can waste your one hour in teaching you each one off this things and you won't learn the basics. Right? So for now, let me go the happy part and then we will try to get into details, so I'll see, like a stupid tree. Good here. And then I will say anonymous, and I'll say, OK, so that it is. Ah. Now again, Let me cut short all this thing. You know, it looks that is long off, I think. Oh, wait. And those keywords out here, if you definitely know when you're calling an issue to be function, it has to be It has to have a sink, innovate. But for knowledge, we make it simple. Let me just create a function one which displays out a simple, extra to be response message. And yes, um, on in this I'm not interested at this moment to do any kind of log and so on so I can remove this. So you can see now, as compared to the online editor, this is definitely worth right. And what I'll do over here, I'm gonna go and delete all of this, Okay? Simple one. I just want to go in the response and say it dumb. Hello. So hello is your hello from as your function APS functions. Okay, so you can see now this stays anonymous. And you can you can call this why I get you can call this wire a post, right? Also, I'll go on, build us that is forced buildings cellars ensure that we don't have any problems. Now, one of the one of the you know good things about writing functions using as your functions using visual studio is that you can test it off line. You don't need to really go online and then run and then check. Right You can just tested offline on. Then you can go and host it online so that it is inconceivable that started. Everything is succeeded. I go and try to run this. So I'm gonna go and try to run this. Now, remember, whenever you try to run, right, if you try to run this, uh, there's a possibility you can get one dialogue box which says that please go and install the as your Seelye tools as your function CLI tools. The CIA titles actually help you to run the web server. You know, they give you in ur el the creator environment. You know, inside which of function Abscam from. Okay, so you if you get this box, just say yes. Wait for 23 minutes and it was installed as your CLI tools. So you can see now my function is now running. You can see that you're cli tool is running and you can see that my function is getting hosted in 70 71 port So that it is so if I want I can go and call this function So I'll just say control See And I can go and run dysfunction from my local host so that it is You can see I'm running dysfunction And it is saying that hello from was your functions right? Great So everything is running over here If you want, you can also go and put a debug point You can see here That is a debug point out here if you really vision and put a debug point So if you hit enter it will debug has been so we can see now that is that it is debugging and you can go and to add watch You can go and do all the things right Eso everything good out here? It looks that everything is working So now let us go and published there. So I'm gonna go and publish this I'll say, published my function 123 So that it is You can see that I have hit build, and then I've hit Publish Andi. Ah, he says that. Okay, so you want to go and create a new as your function app, or is that something you've already made? And inside that you want to put it So I'll say I don't have anything existing. I'll create a new one. So I click on this as your function app and I'll say publish now Once I say publish, you know you you know you need to go and logging into it as your account. For now, at this moment, this mazir account out here quest Morning to your questions, right. So I have I have selected that and you can see that it is saying Now tell me, what is your resource group? Tell me, what is the plan you know and all that, right? So must be taken. Give a nice name Here, function app My new 123 right. And I we say publish, create. So now what this create feel does It will actually go and do everything. You know what you're done in the previous part of the video in a very be created the service plan. When we created the name you know everything it will do, It will also go and hostess scored onto us Your so you can see down below It is saying deploying step zero off four. So let's give it a minute so you can see that the function has been deployed. So if I go now here and if I do a refresh Ah, you can see that the function is now seen in the function APS and you can see this is function one year. Now, remember that this function has been hosted through visual studio. It has been published the visual studio, right? So you cannot really see the source school. You can see that it is actually pointing towards this deal. But he has definitely You can go and run it so you can go and get this function. You are ill. You can see now because we have said that this is an anonymous ah function. It does not have the key at the back end. Means anybody can call it right. So I go and run this function and I should see the output so that it is you can see. Now it is showing you hello from as your functions. So definitely when you're talking about intelligence, you know, you're talking about proper source scored you want. If you're function is complicated, you want to debug offline, then you know, using visual studio does make sense. So we have seen, like how to go and create a function using the portal. And we have also seen how to go and create the function using visual studio. Also, I would like to comment on this hosting plan. Now, when you actually host your function, absent or sometimes you know you want Do you want to just get charged for the time, the function, absence, you know? So you see that? Okay, very well. The function app, apperance. And depending on how much time the function, app plans and depending on what it has consumed, you charge me right on the second thing, we can be, you know, saying that normal function of is used left and right. So I would like to create a full blown virtual machine and I would like to put that function AP Insider Virtual Machine hosted right. So this consumption plan is what is the 1st 1 in a very in the function app will be charged , you know, depending on how much it runs. And in the 2nd 1 this AB service plan is well, you actually get a virtual machine and you will be charged for their virtual machine irrespective, you know, you know the function apperance are not ones, for example. Now let us say I select. Ah, this thing you know s one standard, So I will be charged This 4917 Einar Introspective. My function app is running or malfunction. App is not running. But if I select the consumption plan in contention consumption plan, I will be charged one before the timer function Apperance now Ah, the next thing which comes to mind is that so? How does as your scale up and scale down? So what happens in a zero is you know there is something Collison scale controller. So this function have receives a lot of even, you know, it can receive an extra DP event. It can get bulk calls from M s m que It can have a time of the event. So the left hand side. There is a even so this. Even this first sent to the to the scale controller on the scale, Controller says. Oh, it's only a single request. So he creates one function instance, and so the request. Then it's positive. It's it's possible that it can get an M S m que now in MSN Q. You know there can be 10 objects in a queue, so he will create 10 function instances. So the scale controller, you know, take the responsibility off. Scaling up the number of function instances are scaling down the number of function instances. And depending on that moment, you know how much function instances created Onda, what the function instant uses, you get charged. So in case of consumption plan, that is, ah, scale controller. But if you use a service plan, you have a virtual machine, so it all depends. You know how your workload is. If you think that your workload is not predictable, then I think it is good to use a consumption plan. But if you if you think that, yes, my workload is predictable and it is huge in size, it's quite considerable in size that must be. You can use a service plan. So, um so that was a small video on function naps. Now you know. So in the in this video, what we did is ah, we talked about you know what? His function naps. We created a simple function at by using the is your online portal. Then we created by using visual studio, and we talked about something called less skill controller. Now, definitely function. APS needs more more dedicated time to understand, right? Because there a lot of other things and function naps. But what I will do is for now, I will stop talking about function APS. We will also go through other menus out here, and then I will have one more dedicated session. Right? So must be lives on in lap seven or lab eight. Right. I will have one more dedicated session where I will talk more in detail about function naps . So this was like a introductory video on function APS. Later on down the line, I will talk more in depth of function naps, like we have various kinds of even 10 function. APS. We have time or function Naps. We have did have dysfunction APS and so on. Right, So we'll talk separately on that. So I hope that you enjoyed this video. Now, in the next video, we'll talk about Ah, something called us. Ah, the as your cost most TV. Or guess I will talk about something Collison as your cosmos TV. Thank you so much. 4. Lab 4: - Azure storage (Blobs, Table, File & Queue).: so welcome to love for as your storage. So this is a 25 minutes of video, and in this 25 minutes, you know, we will see that how to create a simple as your storage account. What are the different data types like blobs, files, cues and tables, you know, which are supported in as your storage. We will also talk about different configuration for stories like the one Veto blob Heart access, cool axes. We will also see you know that how was your provides different services like device services like standard and premium. You know where and we have a duty and STD. We will also talk about different disaster recovery mechanism or replication mechanism. You know, like a lotta Zahra's GRS And are you jealous? And also we'll talk about the night stool here, call it as your storage explorer, which can make our as your storage things very easy. So 25 minutes of video. So first, let us start with what exactly is as your storage as your storage is, Ah, sophisticated mechanism. You know, Valium. You can go and stole your data depending on different kinds of data types. Now, before I Goto as your stories. Let us try to understand that in our normal life, in our normal computer, when you say you want to go and store data into your hard disk, right, What kind of thought process are what kind off things you know doesn't end user Do, for example, last if someone comes to me and say is Agassi, please go and create a document then automatically picked the word document. If somebody says create a presentation, then I pick up our point. So depending on the data type, I first choose my mechanism my software, you know, by which I can handle that data type. So that's the first step. The second step is when I say I want to store that data type. When I would restore that fire, I store it in some kind of a physical drive. So this physical drive or this device you can be an STD, or it can be an HD. So depending on what kind of drive you have this date I store, the third thing is in order that you know, we do not have problems. Later on, we go and we back up that data. So we do have some. Must be some USB or we have a magnetic tape, you know, in which we keep a backup off the data so that we do not have problem. So in other words, we go through these three days, you know, when you actually go and store data normally. So you first identified the data type according to you. Take action. Then you go and you store that data dive on some kind of a physical medium, and then you actually go and you back up. You know that with that data, right? So now when it comes to store detained as your, it also follows the same three d life cycle. So first is you identify the data type, then you define you know what kind of device you want. And then the final you define how your disaster and backup would be. So in order to first I did, it was your right. You need to go and creating as your storage account. So you first create another storage account. And then inside that storage account, you go and you add your data types so you can see I've clicked on the plus New Year and you can see that it's something called a storage. You click on this and there is something called us the stories account. So first thing is, let's give a name to this storage account. Now, remember that whenever you are working on a zero, right, you will always find this small sign over here. This information sign So in guest, If you're confused about some fields that you can always click on the sign and read about it so you can see it says that this is the name which is given to the storage account, you know, toe identify uniquely right. So any time you have a problem, just move your mouse on this and read this one small paragraph so that you understand what that feeling is. So let's first give a name here to the storage accounts. I'll give a name your shiv storage account. Right. So see if stories account out core dot windows dot net. Oh, don't see me. That that is a shift storage account available there. Okay. See, I'm famously my store shiv. Okay, that it is. The second thing is, we have something here called lessened deployment model. Now, remember that really talk about the new as your which is which is which is which is there for past two years, right in that you know we have the concept of resource group. But if you go to the old, as you're like you know, which was in 4009 right? They did not have the concept of resource group. So at the time that they had the classic model. So in case you haven't old as your storage account and you are migrating into the new as your into the new version of us your then you need to search to classic audience. You can just keep the resource manager because this horse manager helps you toe group. The resource is it helps for better accounting. It helps you toe assigned security at the group level so that it gets assigned to all the resource is in that group and so on. Right? So I'm gonna go and click on this resource manager for now. So now remember those three days which I talked about. So first thing is that you need to go and identify the data types, right? So you can see that this is the account kind on duh. In this account kind. You know, we can store different data types like blobs, files, tables, cues and so on. So it says here that Tell me you know what kind of data you have? So there are There are basically two categories in this one is there is something called It's a storage and one is that is something called us a blob storage. Um now, as you are in general, has three kind of data types. So against year, that is something called It's a blob. That is something called a file that is something called the Tables and Q's. So let us go through each one of them first. So what I'll do is I'll switch back to my word document out here. Onda, let us try to understand the different data types which are supported by was your okay. So as you're supports, four kind of data types. The 1st 1 is the fight off file means just a physical file, which can be a word file, a PowerPoint presentation, excel file and so on. Right, So this is one kind of data type, the second kind of data type of support is off cues. You know, sometimes we want data, Toby, like first in, first out. So if you are looking for that kind off data types, you know, then you can go and select use. And then we have Binali data like a like a e x er must be a huge image file. Right. So in that case, you can select the blob data type. And in case you just have a name value pair, you know, columns and rows, right? Then you can You can select people. So over here you can see that they have created a storage and a blob storage. So storage means that in this you'll be storing blobs, file stable cues, all the four data types. But if you select blob than in this one, the blobs will be stored. Okay, so both of these accounts are different. So in case you just want general purpose saying that I'm not looking really for blobs, but I have to also store tables, have to also store files. Then you can see like, the 1st 1 But if you say no, like I'm interested toe one lee store raw data, binary data. Then you can select the blob storage. Now, also quickly. We have this general purpose V one and then we have the general purpose veto and then we have the blob storage. And if you see a when you are on V one, you would see that some things are not senior. But as soon as that switch to V two, you can see I see something called less access to your cool and hot. If I switch to Blob, I see I see this access to your But if I switched to be one, I don't see it. So what exactly is this access to you? This access to us is that how how much is your data access? For example, if you select heart, you know, that means that this data is access to frequently and must be that we can do some cashing on da, you know, increase your performance right If it is school, you know, that means that this data is not access to much. So must be we can disable cashing we can look into a less ram kind of thing and so on. So in case if you're selecting the blob storage and if you're selecting the storage. We too, right. You will see that That is something. Call. It's an access to you, but that is not present in V one. But please note that if you're selecting this veto and blob, you are charged accordingly. Remember in as your for everything what you select right, you will be charged. So please know that whenever you're selecting something select, you know, ask for your need. Now you must be asking So what is the difference between a story everyone and veto right on blob. So fasting stories. Everyone is the most normal one in this You can store block use files, but it does not have the access to year. Also, it does not have the facility off archiving and also the trooper this less so In case you're looking for a very, very basic thing than definitely generally one is good general purpose. Everyone is good. General purpose veto Also, stores exactly seemed like the one, but it has this access year. Also, it has the facility off archiving. If you read as your online online Doc's write, it says that if you know, rather than selecting blob storage, they're encouraging people to select storage B two s. So I would suggest that rather selecting this blob storage in case you want to store blobs and you own the cool and heart feature, you can go and use this storage we to so started. Everyone is general purpose, but it does not have the access to year. It does not have archiving storage. We do. It is again general purpose. But it has school. It has access to year and also it has the archiving feature. So now again, let us continue with our three D flow. What we have just what we have described previously. So remember, this is the first D in a very we have defined the data type. So what I'll do is I'll just see, like the general purpose V one, because I don't want to get charged at this moment. The second thing is we need to now go and select the this type so you can see there is something called its performance. And in this we have standard and premium. If you see like standard, that means that you will be getting an edge d d drive. And if you see like premium, you will be getting an STD drive. Now, in case you're not aware of the difference between s duty and edgy, let me explain. You Innogy drive up. You know you have a mechanical arm and that mechanical arm actually reads the data from the disk. So it is. It is a bit slow as compared to STD while in SLE we do not have any kind of physical moment and we mostly have chips on through the chips on the mechanism of flash. Read the data and we store the data. So definitely the agency in terms of efficiency is less than STD. But remember that Reggie is it comes at a cheaper cost, So his duty drives are cheaper as compared Toa STD. Okay, so here again, if you want better performance, you will select the STD that is premium. And if you say no like, I just want ah tohave a basic thing. You can select STD. So we have defined the data type. We have defined the drive now this time to go and define the disaster and backup so you can see there is something called the application and in this we have a lot of options like a lattice Zola's GRS and R E g r is so that is a little start to understand that what all these three options are in terms off data backup and disaster. Now, when you talk about disaster recovery, one of the most important thing and disaster recovery is that how do you create your backup plan? So, um as we know that a zero is, ah, cloud service. And at the end of the day, when you say you are a cloud service, you have to be available in a lot of geographical location, right? So you can see here we have this something called as your regions and as your is available in these geographical areas, what you see on the map. So we have a zero data centers in these ideas. So now when you say that you want to create a backup and recovery plan, a proper data replication plan, you'd like toe have the facilities saying that, Okay, my data center is in us. But I would like to make a replica copy into India so that in case if something happens in us, right, my India copies still there. So you'd like to actually um, have data backups and recoveries across the geographical location. So from that perspective, you know, they have given us options here a lot in Sarah's GREs and so on. Right? Eso Let's try to understand these options. So yet is the block diagram or, I'll say, a diagram which explains, You know how a lattice, lattice, gerez and Rtgs work. So let's first talk about a lot is now when you talk about backup, right, That would be to kind of backups. If you remember in our data types, you know, we said that we are seeing there are two kinds of data types. One is we're seeing a gentle storage and another one is we're very specifically for blob, Right? So here, a Z also classifies do tend to two types. One is the general data and another one is a blob data. So if you say general data and if you select a lattice right, if you say a lattice, then the backup copies are created in the same data center. So, in other words, for example, you have India China Data Center So in that in India Generator Center, if I select this option year hilarious that is locally redundant storage than what it does is it actually creates a backup in that same data center, so it creates three copies off the back up in the same data center. But if something happens in the data center, then your backup is lost tonight. The second kind off option. What we have here is ah, grs. I will talk about the largest later on GRS injuries. What happens is the backup is done locally as well as it is done in some other regions. So, for example, if you have a US Texas data center in that you know you can have So here you can have backup one backup to backup three. Then again, you know, because off GLS, you also have back of four back of five and back of six. So geographically, you know, they're located somewhere else as well. So, in other words, year you have six backup copies, three locally and three in some other regions. Now there is a total option. Your car less are generous. This are a generous here stands for read access Jury London storage. So if you see this allergy, Eris is seemed like Jenna's, But it has some extra things here that you can go and also read from the backup. So while the back of its happening, you can also read this backup. So a lot of stores locally. Three backup copies. GRS Store six backup copies. Three locally and three in the U. S. Data Center or some other geographical data center. Region wise, they're far away, and Ari Jerry's goes further one step than generous. It does make six copies, but also you can read from the backup copies so you can read from these copies as well, and also from the from your main copy as well, and also from the backup copies. Also, we have, ah, separate option here. Call it Zahra's, which is very especially for blob data type, so you can see your there is something called Zune Redundant Storage Zahra's, which is specifically for blob data storage. So if you choose generous right, then blob gators can be implicated either in some other geographical location or either in the same region center, you know, for example, I have indoctrinated a center having the opponent data center. Now this both are in the same region, so by salaries you know, that will be a backup data copy here as well, and as well is that we were back. Operate a copy in pony. Also in salaries. It is possible that the data copies can also go into some other location. So salaries for blobs L A is for local data. Jaros geographically different. While allergy Erez is geographically different as villas, you can read the data from those back up late. Now, remember that if you're choosing the higher and options like Sarah's and GRS, you'll be charged for it. So please note that if you're making a choice than ensure that you really need it, right? So for now I will not do it. I will just select a lattice. And uh, it also says that do you want to transfer this security? In other words, by using SSL, I we say no and ah, I will create this in one resource group here saying resource one location I will keep at this moment uh, same central us. Right, Onda, we'll talk about this work your networks late wrong, so you can see that I have covered all the three D's fusty. I've defined my data type that I'm gonna go and store in this files blobs right. Second, I've defined my this type. I've said that I needed a dg disc. So a standard one. And then also I've defined my disaster and recovery. So all these three days I have provided Now I can go and create my storage account here my store shift. So I'm gonna go and hit on Create over here so you can see that I have said created on Ah, once you go and say create, it will actually start creating the necessary services at the background so you can see at the right hand side. It says deployment off this group is in progress. So you can see now there my storage account This So if you want to see the storage account , you can go and click on all resources and you can see my store shift. Onda, um, you can go here now and then you can start adding things. So, for example, if you want to add a blob than you need to add a container so you can go and you can add a container here on day In this, you can go and upload blobs. You can see that if you want to add a file, you can go and you can add a file. So fight, share. We can give some name to it. A look at some one could off one GP off hardness. And in this I can now go and I can start applauding Feiss right In the same way. I can also go and start creating queues. I can go and start creating tables and so on, Right? Not definitely. When you talk about creating these things like file skews and so on, right, You need a better management studio. For example, if I want to go and create a table, it is difficult because in table the structures are in row and column and so on. So if you see it at the table, you know, you will see that in this to create a colum except that they have not provided could user interface. You can see I have this stable out here, right? But you know, to the stable, If I want to add data, then I really don't have anything, right? So for that, you know, we have a nice, uh software called as the Microsoft as your storage exploded so you can get Microsoft Storage Explorer from this Lincoln of which I have shown on the video. Right? So you can see that link. You can go to that link and it can get the storage Explorer. And even if you Google, you will get this Microsoft or the external download. Right. So you can go to a story Explorer and you can directly connect to your storage account. And then you can start doing things so you can see it. I'm connecting to my story exploded. So my i d my respond interview questions at in through questions. That's human dot com, whatever it is, right. So I need to take that. And I need to put it in my eyes, your storage explorer. And then it gives a nice interface, you know, by which I can go and create tables. I can go and create cues. It helps me also took ready and so on. Right? So, in order to connect, So the stories account you need to go and you need to add a connection, right? You can see at an account. So if you click on add account, you need to signing, so you can see that it asked for a sign and go ahead and signing over here. Once you sign in, you can see at the left hand side. I can resume do on that. So you can see that he has is showing me that small like in there. You know, from where I can go and I can see this is my store shift. You can see her, My store ship on inside this my stewardship of disappointment. I have created some fight, Sheriff, remember, I've created a file share right in the same way I can go and create cues. I can also go and create tables, right? So I can go and I can create a table here. Now look at this. This is stable. Uh, let's say I think I created already a table called his tested. Remember from my you I from my own land portal. I created a test. So in this test, now I can go and I can start adding data so I can say OK, uh, some kind of identified here. We'll talk about tables, cues, blobs in more detail, literal. Right. At this moment, my goal is to just explain you that how as your storage is created and what are the different factors you need to take into account, right? S so do not worry about this partition key. Rookie. I will talk about it everything later on because I think we need separate dedicated videos for table skews, blobs on fights. OK, but for not just understand, you know, So I'll add a property. You're saying this is a name. So in the seven store shift, right, And said so in case if you're looking at Manu plating the data creating, you know, the objects like blobs, files and sheds and files and queues, right? The Microsoft Azurix stories Explorer is awesome, right, Great. So that brings us to the end of this video in this video, My main goal was to make you acquainted with something called Microsoft Storage on DA. What are the different data types? You know how to go into the conflagration, how to go and to find your recovery plan, you know, and the different options you know, which are needed while you're creating the storage account. Now, the next thing, what we look into is something called as your cost most TV because now that we have started with the stories things right, let us also go in our cosmos TV. Actually, I was planning to cover Cosmos db you know, in this lab in this current lab. But then I found that, you know, if I directly go to cost most DB, you know, I would be doing injustice to as your storage. So that's why have first taken the basics of agile storage. So in the next video, I will try to cover Cosmos TV. So I hope that you enjoyed this video and next video is on as your cosmos TV. Thank you so much. 5. Lab 5: - Azure Cosmos DB: so welcome to laugh. Five. This last five is a 30 plus minutes off training and in this 31st minute, 30 plus minutes off this training and we will try to understand what it's cost Mostly be. What is this thing called? Its consistency Levels in cost Mostly be. Then we will go to the azure portal and see that how we can create cosmos TV, how we can create documents or we can create databases, collections and so on. We will also look into that. How can we handle fail over? So if that is a fellow on how to handle it And then finally we will see that how we can you see shop to connect was your cost Must be first thing you know, before I started to today let me tell you in 2014 around we had something called us document to be so this cosmos TV is an improvised version off the document to be okay So let us start this tutorial. So before we start anything else, let us first define what it's cost Mostly be cosmos to be is a planet scale No SQL Jason database with multi a peer support. Now this definition looks long, you know. So what we'll do is force. Let us try to define this word. Cosmos cause most means universe ought to be very specific. It means a well ordered universe. It means something big on that's what Cosmos to be intends to do. It intends to give you, ah, planet scale databases. So now that this first try to understand what this planet skill word means, Andi, what I type of problem does this planet skilled Davis tried to solve. So here in the situation, you have your database somewhere in us on. Then there are users who are using this database across the geography. So I went Any user who is in the U. S. Location access is this database. He gets the data faster, as compared to the users who are in other geography, like India and Nepal, UK or source on. So the performance for the users other than the U. S. Location is not up to the mark. So the solution for this is to bring the database near to the end users geography. So let's say if I'm from Mumbai, then I would like to access data from the Mumbai Data Center. So in other words, you know what we will do is, you know, in whichever places we have all users interviewed set up there second regional basis or redid abi's on our primary database. Or we can also tell him that as a right database is in the U. S. So when someone writes in this U. S. Database, we will send out replication toe databases, which are in other geography. Now, please note. Do not compare this with CD in our or BCP because cdn B c P. D. R is a byproduct off course must be. But the main intention here is to bring fresh data life data near to the users geography in case off D r and B C P. We do not read the data from the database. It is one we used. You know, when there is a failure in the main system, while over here in case of cosmos TV, we are going to go and read database from the secondary data basis. So do not confuse this with D. R and B C P plan. So again, I would like to clarify the vocabulary, the main database you know where the data would be written. We will term that as primary database or as a right database, and the other databases will term them as three data basis or second treated Abi's because this is the vocabulary I'll be using henceforth in this tutorial now one of the biggest problem toe achieve a planet scale database. Architecture is consistency. So here is a diagram. It'd representation off. What exactly is a consistency issue? So now let's say you have a U. S. Database your right database, and from this right database, you are actually single synchronizing toe Indian database, which is in India. So now let us say, if if you write something to this, U. S database must be takes one or two minutes to replicate this data to the Indian database. So at that moment before the synchronization finishes, when the end user reads a data from us, he would see a different data as compared to a user who reads from India. So in other words, at some moment off time, you know when the synchronization has not finished, the data would not be consistent. Now this system does eventual consistency. Eventual consistency means that we do not do anything special as such, we just leave it to the network. We just live into their transactions to the locks off. Whatever we're having at this moment. And because of this, at some moment of time you'd get inconsistent data for the end users off different geography. Now, sometimes this consistency is okay. You know, if your application is not mission critical and so on, must be that this is okay. But now think about that. Do you have a stock market application? So in case of stock market, if the values are inconsistent, then it then it would really create problems. So for this issue, we can switch to a more hard core consistency. Carl s a strong consistency in strong consistency plan. The read clients will not be allowed to read the data which is not committed. Toe all the geographical read areas means what you can see. That here is a small die grammatical presentation of the same eso. This is this piece stance for a primary database. This s times for one off the geographical second related basis and the s two is again one off the second predicted a basis. Si two is a client and see one is a client for the respective second rigidities. Okay, And you can see here, you know, data is getting committed on regular intervals on the primarily Ravi's. Okay, so let's assume that first thing that is a value. Is it going toe A. There is a value at 9 a.m. Then at 10 am, somebody come. It's value be into the primary Rabies. So the private database, As soon as the value B is committed, he starts doing the synchronization. So let's say at 10 AM itself, you know this information a message is sent to is sent to both off s one and s two. So the value be is now they have started synchronizing the value B two s one and s two. So at 10:15 a.m. The S one sends a message saying I am done with the ablation. And let's say at 10. 30 s to also say that I'm done with this information. Now remember that in as your cosmos TV, it does not really take half an hour. Dropped it, develop this. This is just an example. So please know that this happens literally in seconds. OK, but I'm just giving it as example so that you can understand it. So in other words, the value B which was committed in the primary database is committed toe s one and as to at 10. 30 So at 10 30 it is confirmed that everything's OK. So now what the primary rivers does is once he gets acknowledgement at 10. 35 AM, he says to everyone that everything is successful, right? So now until this 10. 30 If no, let's say Cito tries to read the data, he will see the value A and not Will you be okay? Even if I see one tries to read the data, let's say at before these comets happen he would also see the value A not only he, but if even somebody tries to read the data from the primary Rabies, he will also see the value A. Now, this is consistent. So even if the value B is committed at 10 AM But all the clients who are reading from anyone one of the really obvious either this primary, either in the secondary, their all seeing a consistent value. Okay, now then, the value B is committed to all the edibles that is approximately at 10. 35 AM right after that, if somebody tries to read the data from primary, he will get value, be even against, even see, to try to read the data. Hell, to get value B and C one also gets when you be so in a strong consistency. We do have latency. We do have performance issues, but it is consistent. Any client who reads from any judge original area at that moment will see the CIA. Same data, right. So this is termed as a strong consistency. Now, both of these consistencies have their own real offs. So if you're selecting eventual consistency, you have low consistency. So at some moment of time, all the clients who are in other geographical areas in different geographical areas can see different data. Right? But then you have high performance because nobody waits for anyone in case off strong consistency. It is highly consistent. But then your performance issues you have latency latency means because, you know, all the clients will not be seeing any kind of uncommitted data. So any data which gets committed on the primary deliveries it takes some time to propagate toe all the secondary databases. Until then, all the clients see still data, so over here you will be having Latin's is you'll be having performance issues, so both of them have their own strong point in. Both of them have their own negative points and the choice should be made. Ask for your application. Criticality. If consistency is playing than you do, you should be selecting strong If performance is important and consistency is nor playing must be. You can select eventually. But wouldn't it be grade if we can have more consistency? Or we can have more flexibility, which we can select between strong and eventual. So between these two extremes, if I can have more choices, then it would be great, right? So that's what in order in as your cosmos TV. What they have done is between this strong and eventual. They have given you more three choices off consistency. So one is the bounded consistency. Other one is a session consistency, and the 3rd 1 is a prefix one, right? So let us understand these three as well. One by one, bounded stillness, inbounded stillness. We will see data which is some hours old, for example. I can go and I can set the statements to two hours inbounded, still less so. All my clients will be lagging behind the right database by two hours. Right? For example, let's say that you have committed some data at 11 a.m. As value equal to a on at 12. You have again committed political to be so even after the committing off. This after 12 value call Toby. Still, everyone is reading a so you can see her. When a client reads from the secondary database, he still sees the old stale value off A. Even if somebody is reeling from the primary database, he also steals, sees the value off a right, so this is termed as bounded stillness. So in border stainless, there is a lag on. Do you are okay with this leg? But the data is still consistent. In other words, other inabilities from the primary database are any other secondary database. They all see the same value. If you said the bounded stainless time musical 20 then it becomes a strong consistency. Let me again repeat their sentence. If you said the bounded stainless time as equal to zero, then it becomes a strong consistency. The other important consistency is a session. Consistency in session consistency. What? So what it is what other job? Difficult databases. How much their up to date. So, for example, I look at this, you know, here we have the U. S. Database. It takes two minutes to synchronize to India, so readers who are reading from the Indian database would be following the eventual consistency. But the users who are reading from the U. S. Database means from where the Comets have happened, right, those users would see the recent data. So over here it is kind of inconsistent. But for the user who is writing the data to the database for him it is consistence because whatever he has committed, he can treat it. Okay, so this is more from the perspective off the clients who are committing the data that they should see the fresh data. But for other users, you know, even if they see the date of the eventual lag or with a time lag, it is okay. The next one is consistent prefix in gases and prefix. The data is seen with the same order by which it has been committed to the right database, for example. Now let us see on the primary delivers The value was set us A B C. D. So, Vince and then later the simulation happens. Whatever the time it is five minutes, 10 minutes. Right. But the data when deserved by the client, they would see in the same sequence. So the order will be maintained. So remember, between the strong consistency and eventual consistency, you have three more choices. So remember, first in strong consistency, everybody sees the data. Same ass artists. Well, an eventual consistency. You can have things which are up and down, but then none of the plans will be waiting. Bounded consistency is having some kind of for time period or some kind of four prefix in session consistency. The client Okamitsu data will always see the fresh data. But other people are other clients who are in other geographical areas can see still data, depending on the time which it takes for replication. Then we have prefix in prefix the sequence by which the Comets have happened in the same sequence. It will be read right. So now you have the flexibility to choose between strong and eventual and to make more better choices. Right? So, in other words, you know, when you say that you want to make a choice off a consistency, it really depends on two factors that if you want to be strong, consistent or his performance the criteria, for example, you can see if you say that you want to be strong consistent, right then, please note your performance will be down. You will have lack and see right, but your consistency will be high. But if you see eventual, then eventually the consistency will be low. But your performance would be higher. Availability would be high. So whenever you're making choice off these consistencies, you should be very sure in what your goal is, what kind of database you have, what on your application, how critical it is. If you remember 10 minutes back, I gave the definition off your cosmos. TBS. Our database. It's a planet skill database which is stored in Jason format on it has multi a peer support . Now what does my DPS support means? Monkey? A peer support means that that the data is stored in Jason format, but you can use any A p A. But you're comfortable with. For example, I can go and say selects star from table name. Right. So I can use an SQL FBI to get this database to get this values right. Or I can use a mongo ap I can use a graph API. I can use a table e p. I can use a Cassandra ap A. So so The other good thing about the baby is that he does not tell you up with the type off a p a you want to use, but he gives you multi GPS support. A lot of times I've seen people saying that, Okay, this database eyes supporting esque Well, because they're joins that of this and that could create Right. So that's why you store in a school server. Didn't see okay, some of the data stored in mongo db because, you know, we have key value pad, and I can just look up so you end up with having different databases at the back and, you know, because off the nature of the data or whatever it is, right. So over here now you can go and you can choose saying that I want an Escalade P I or I can I want among the FBI or which kind of a P I want. So remember Cosmos to be is ah, planet skill did abyss. It's a planet skill Devi, which is like Noah's school. It stores data in Jason Format and has, ah, multi a peer support. So that was a 20 minutes theory on as your cosmos TV. And I think it was worth investing time on the Terri part because the consistency is so confusing that many seasoned as your administrators not know which consistency to choose, and they end up being heavy bills, right? So that's why I spend my 20 minutes of time explaining you the different type of consistency. So if you want to go and add as your cosmos TV, you can see at the left hand side we have a menu, so you can either click here. Well, either you can click on the plus new Andi. You can just type your cosmos so as your cosmos TV that it is right and I'll click on create. So as soon as I click on create it says forcing like give account i d. This account I d is nothing but a unique name by which your cosmos database will have a new are. So I'll say this is my cosmos. 123 eso you can see now my you earlier will be my cosmos. Want to treat our documents? Start as your dot com. Okay, if you remember While explained that theory I said that as your cosmos db supports multi a peer support so you can go and select You know the AP which you want here. So at this moment I will select a school again. The subscription is bs You go. I do not have any kindof recreated resource user group at this moment. So let me create a resource group here this cosmos. So in this I will add all my cosmos data basis. Andi, you can see that the most important part. So we're saying that our right location will be central us and I'm seeing enable geo redundancy. So this will actually go and enable cosmos to be on the various other data center locations . Right? So that is going click on create and you can see now as your cosmos to be is creating can see the small sign over here indicating that as your cosmos TV is getting created so you can see deployment in progress. So let's wait for sometime until the Gospels Debbie gets created so you can see now there the deployment is successful and it seems that the document db now remember as we said, you know, as we started this video, I said that as your cosmos TV is evolution off document db so you can see it says deployment of document BB is successful. So if I go to now to us your cosmos TV, you can see that the resource has been created. So let us go inside this resource and let's say I want to go and create a database off a cosmos. Now the structure of cosmos TV is as follows and the top you have database. Then we have a collection, and then collection has the Jason rules. Right? So let's click on our collection out here, Ondo. So you can see in this ad collection Uh, so that is going put something obvious name here db one. And inside this TV one night we create a collection called this Collection one. Call one. I will not say unlimited. I would say fixed. Remember, always we be a miser, right? Do not try to select something which is at the higher end. Right? And, uh, Andi, I'll just go and say OK, all right. You can see there is something Collison, are you? I'll talk about that later on. Unique keys and so on will talk about it later on and express. Okay. And let's try to deploy this collection so that you can see now the collection has been deployed. And inside this collection, I can No, I can Now go and add items, right? So I can go and add Jason data inside. So remember, at the top we have database. Then we have collections and then we have documents. So now I can go and click on new document so you can see that by default. He gives me an I D. So if you remember, I said everything. What? You store inside cosmos to be a car document. D B is a Jason data. Right? So I can see the ideas, wants you to do one, and then I will say the name is ship light. Remember, you can have different different decent structure, Roy. So it's not necessary that you're the store in the same structure. That's what The flexibility off No. SQL is right. So you can see I'm going and saving the first record. The first document so that it is one's it. Is it a one I can go in again, Creek, click a new document. I can say this is 1002 and I can see now this has name Shiv. And this has one more property here Collis country. So country India, Right, you receive. So you can see Now look at the structure and the stuff we have database. Then we have collections and then we have documents. And every document is, uh, you know is nothing, but it's in. It's in Jason format right now. One of the other things you know, which we discussed in our classes. So we discuss about consistency, right? So this consistency is set by using this replicate data globally, so you can see the small menu out here replicate data globally so you can click on that. And now you can see this nice screen out here, and it says that So tell me which are your right regions and which are your read regions? Remember, I talked about right region and read region, right? So I can go here and I can say that. Okay, so at this moment, you can see it says you're right. Region is central, U S. And the read region is east us. But I do have the flexibility to go and choose. You know what I want? As read regions on the propagation will start happening automatically. Okay, Now please note that the name is planet scale as well as the money is planet skill So So be very choosy in what you're doing. If you're choosing to many locations, you'll be ending up with heavy bill. So it's very important that which locations you want to replicate, right? So that is one right region and that is one breed region. At this moment, you can also see this default consistency over here So you can see that the consistency which we discussed in the previous 20 minutes of the video So you can choose strong. You can choose bounded stainless. You can choose consistent perfects. At this moment, I will choose eventual. I will choose eventual because I do not want to spend too much money like it's a demo, but you can see like, for example, if you put bounded stillness, it gives you saying that. Tell me the minimum time the lack should be If you put session and consistent prefix so you can choose anyone off them. I'm gonna go and choose eventual so that I get a lesbian. But if they get data globally in that I have just chosen one bright location and one dream location. So you can see now it is abating. My default consistency here so that you can see that my default consistency is updated. Now, let me go back to this replicate data globally. You can see at this woman there is only one right region. If you wish to have floors, floors means that if this right region is unsuccessful, then you would like to have another read region to become a right region. Right? So for that you can go and click on this manual. Feel lower. You can go and click on the automatic feel, right, so whichever you want to select. So, for example, let's say I go in on this automatic fail over. So it says that. So go ahead and say like, for example, and this woman I have just one breed region. But I can again I can go and see that. Then there is a failure into this right vision than make this read region as a second priority. So over here, for example. Now let me go and select. Uh, let me go and see. Okay, let's say that I have different right regions here. So let's say I have one more right region, right? Let us say I'll just save this. Please note that the more regions you select, the more bandages you will get heavy bills. So this is one leave for the purpose. All learning, right? As soon as the learning finishes, I go and delete all my resources which are connected to such kind of a heavy build late so you can see it is a bidding. Let's give it some time on then I will goto automatic fail over so in automatic filler Then I will see to read regions so I can say, OK, that if that is a failure in the first right region, then I can go and give clarity to my read vision and say that which of the read region should become a right region. So let us see that option if some bleeding. Remember as your cosmos TV is a planet scale database, right? So when you are a breeding, any settings, you know he has to replicate all across the geography. So that's why it takes a bit off her time. So they're my regions have been created. You can see it's clearly a note here. Each region is billable, you know, not only on the throughput, but also on the story. So even if you're not doing anything, you are meat that is going on. So please ensure that you make appropriate choice. So I'll say, enable automatic fail over. So in other words, if this right region feels, I want East us to be the first clarity and south Central us to with second priority. But if I want, I can drag and drop so you can see I can click on this small dot You can see there's a small daughter sign out here. We can select this. Why isn't it getting selected on the left to reorder the list? You're trying that so click on this and darkness. Uh, it's horrible. What's in the U I Why Drag and drop the read regions to the order tip. Drag this on the left to the order. Okay, so I'm dragging this to the left of the order. Oh, that it is. It's done now, so whatever it is, you know, So you do have the option to go and change the orders from here. Right on. You can go and switch to automatic feeling, right? So remember not only the read, but also, if you want, you can make the right regions as well as, uh, automatic field would enable. Good. Now, the next thing what we would like to do out here is we would like to go. And you some programming language, like she sharp or something in it to go and connect to this as your cosmos TV. Right. So let us see a small example off how to go and connect to as your cosmos using sheesha programming language. So, in order to connect to the cosmos db, you need the keys so you can go and click on this key section out here on from here. You can go and choose the keys. Right. Are you need to use this kids in your shop language So you can see here the court off she shop looks something like this. So forces the end point. You are also the endpoint. You are like this moment is my cosmos 123 dot documents. Whatever. Right. So I would go and connect with your that I need the primary key. So I would go and choose my primary key. I can copy it. Right, And I can put it side out here so that it is okay. Uh, on that's it. Now, remember, our online as your cosmos DB at this moment has a structure, often idea and a name. So what I'm gonna do is I'm gonna go and stick to that. So we haven't i d And we have a name, right? So you can see what I'm doing is I'm creating first object of document client on it is document client. I'm passing the u R l on the primary key so this key will help me to Well, it did to my house. You're and then I'm saying saying Okay, so we have created an collection here. So if you remember one is that you can go and you can create a collection if you wish. Light s so you can see we have the collection. What was it? A collection name. So let's go to date Exploder. Our collection name was D B one. Call one, right. So Devi one and call one. I'm sorry. So that school here d V one right on the collection was called one. Right. So in this, you can see I'm saying, please go and get me this x type this excess. Nothing but the Jason class, The Jason data. Right. So you can see that I've just kept the same kind of a structure. So please go and get me the Jason data off does your cosmos TV and we can then go and look through that. And I would like to display the name I d as well as I would like to display the name right . Extort the name. Okay, Right. So at this moment, what I've done is you can see that I actually removing that region so that region is still going on. So once this region is done right, you like to go and execute this program. And we would like to go and see the output so that you can see that that region has been removed. So now if I go into on this program, I should see two rows. One is 1201 shift and other one is once you deserve to share. So if you remember, if you go to our data explorers so in the dead expletive, remember, we had to documents light, so we had 1001 which is having the value shiv. That is, once Rizzuto, which is having the value ship. You can see there are a lot of other properties as well. But these properties, as are added but as your cost most TV Now remember that whenever I'm taking these trainings at this moment off a zero, right, I'm not concentrating too much on the programming FBI at this moment. Why? Because I'm planning to have separate topics to just go and crazy as your cosmos db to quit as your tables to quit as your blobs. So you'll see that in the later sections off those your training even see a lot of she shot with a zero but I just moment. My goal is that to make you acquainted with all these concepts off your which are very confusing, right? So So at this moment, do not worry too much. You must be thinking that all. Tell me that. How do you clean a stored procedure? Tell me, how do you do that? Absolutely, I'll tell you. But at this woman, let us first try to cover the Brecht offers your because as your is a huge thing, right. So let us try to understand. What are the different options given bags? Your and then programming is easy. We had she shall. Programmers, you know, it's we have been doing she shall for a long time. So that is something we can do it more easily. But these concepts like consistency levels assed your tables function abs. These are so new things for us that we forced you to understand those concepts on. Then the programming part is easy. So good. So please note that we are going to have that in the later sections off the training. So that brings us to the end of this video. So in this video, we were trying to understand What exactly says your cosmos TV? What are the different consistency levels which are available in as your cosmos on how to go and use She sharp to connect with your cosmos TV. Thank you very much. 6. Lab 6: - Microservices & Azure Fabric in 90 Minutes.: welcome to lab six micro services and as your fabric. So in this video we will be seeing how to deploy micro services application on your fabric and gives you a new to micro services. I would suggest to please go and watch the micro Services video, which is that in design? Baton section. Now, this video is a very, very long video. It is a 1.5 hour off video, so and the video is not only long, but it is also very complicated in terms of technology. So my suggestion here is that you know, please watch this video in 2020 minutes off gap. So watch for 20 minutes, have teacup and coffee again. What for? 20 minutes. Have a nice sleep. I would be OK if you watch this video in two days. You know, in two days If relax and just watch this video, I'm sure after you watch this video, your concept off as your fabric would be crystal clear. So in this video, my goal is forced to discuss about the issues with Microsoft Michael Services deployment. Then we will talk about why do we need as your fabric and how was your fabric addresses the complicated deployments off micro services. We will talk about What kind of tools do we need for creating micro services? Application on fabric will talk about state full and stateless. Micro services will talk about security and fabric using active directory and certificates . We also get introduced to as your world. You know, as your world is there for security purpose. With us, you're in a ZR. We'll also talk about how to go and publish using visual studio on. Also, while we're doing all this will talk about lt s E and s A C model off the server products. So this is a long video, as I've said, watching 2020 minutes each. Andi, I'm sure that you would be after the video. You would be well versed with us, your fabric. So know little. First, try to understand that What exactly is the need off as your fabric? Why does as your fabric exists at all? So there are three prime reasons. You know why? As your fabric exist, the 1st 1 is micro services. The 2nd 1 is micro services, and the 3rd 1 is micro services. Michael Services is the main reason. You know why? As your fabric is in existence. So I would suggest that please first go and see the video Micro Services, which is in the design Brighton section. Well, I have talked about what is Michael Services? What is how it is different from service oriented architecture and so on. Right. So in that video, I said that Michael Services is nothing, but it is an architectural pattern, you know, varying. You create self contained models, independent models, Richland. In their own process, they have their own database and the talk with other models, you know, using http or some protocol so you can see her. You know, let's say that if you have an e r p system so una europea system, you can have accounting, you can have invented you can have payroll, you can have hr and so on. So we can host these micro services in different process. So, in order to host them in different process, probably you will have different physical boxes, are probably He will host them in the same physical box, and you will separate them by using containers. Right. Um, but now, with so many boxes so many hardware's. With so many processes, you have ended up into a complicated infrastructure. Or I would rather say you have ended up into a cluster environment environment, a cluster of computers. Right? So now at one point, you know the development is complex because we're developing micro services, so we have to develop them in a standalone manner. We have to add a communication layer like http, so that board the models can communicate on on the other side, your deployment also become complex. Right? So the complexity has just become exponential. So I remember Michael, services should should and must have automated deployment. If it does not have an automated deployment, then it is like, you know, driving, you know, some kind off a Lamborghini in a traffic jam drawer. Right. So you will actually be spending more time in managing the infrastructure rather than addressing the core issues off off your customer. So now with all this, let us go more in depth in tow. What exactly are the problems for managing this clusters for managing micro services and clusters? The first big problem with the cluster environment is security. Now this cluster environment will be used by a lot of stakeholders we will be having Developers will be having administrators. We will be having end users, right? So for example the first thing is the developer Now we do not want any unknown developer coming and deploying on the cluster is scored one Lee developers who have the access you should be able to deploy So we want a secular deployment. Second, while deploying as well I want the falling things I would like to say OK, that should be some kind off a check which says that Okay, this cluster is healthy so deployed application on it This cluster is not healthy, so do not deploy on it, right? So I want sort such kind, often automation as well. The second thing is I would like to also monitor the whole cluster saying that which cluster is working well which cluster is having a health problem? So I want some kind of fun monitoring environment You know where the elements can go and monitor You know how my clusters are working and again this month Monitoring also should have security involved into it Also between the club between the nodes. So these are the Lords For example, the HIV is hosted on a separate box. The accounting and inventory are hosted on a separate box and they are talking. Why are some http channel? Right. So each one off these Nords are the application should talk while a sick off the card channel I do not want, like somebody should plug in his own micro services and start calling my accounting application right? It should be a trusted cluster. So again, when each one of these notes stocked with each other, there should be a secure channel. Also, I would like to have fe lower so I can keep one north of it is just empty on. Let us say the payroll system nor comes down. It should deploy the payroll into this box and start walking right? So if you see when we say managing this cluster for Michael Services, it involves a lot of things. It involves a secure, deplorable deployment. It involves monitoring this whole system. It involves the North Shore talking secured manner. It involves, you know the failures should happen automatically and so on. And that's what exactly as your fabric does as your fabric is that management lier, it is a management layer, you know, which handles all this thing for us. So as a developer now, I don't have to worry. What is that at the back? And I will take my she shop cold or I'll take my NBC called whatever it is. And I just said deploy. And as your fabric goes ahead, he looks at the best nor the healthy nodes, and it goes ahead and deploys it so you can think about that. This is your fabric is a management layer between the stakeholders you know who are deploying Michael services who are monitoring micro services and your cluster. So now that we understand the concept was your fabric? Now this trying time to go ahead and start doing some demos to start seeing that how other fabric development looks like now, Definitely. If you want to do as your fabric development, you need to have in as your account. You need to go and deploy it online and so on. But think about it off. Fabric athlete needs two or three north, so you will be actually be creating 23 notes. In other words, you will be creating 23 virtual machines so that would really cost you a lot, right? So what Microsoft has done, you know, they have given you an environment. You know where you can go and deploy your clusters locally so you can create our classes. Locally, you can test your components, you can test your micro services and then you can go ahead online to the online is your right. So for that. For for as your fabric development unit, two things one is you need as your fabric has decayed, so you can go and search for as your fabric as decay. So, somebody on the Microsoft site you can see this small insulation years in install as your fabric s decayed. So what does This was your fabric. Sdk do this as your fabric has decayed gives you Ah, wonderful template in visual studio. So if you open visual studio, it will actually give you a very wonderful template by which you can go and create as your fabric projects. Right? So my visuals really is opening. I'm sorry for this. So until that open So this is the first thing we want. We want the as your fabric as decay. The second thing what we need is we need as your fabric explorer This is your fabric explorer. Ah is again out a small application in which actually creates local clusters for you. So once you install the as your fabric explorer, you will get such kind off set up such kind of insulation you can see And if you start this installation, you can see it is saying over here welcome to service fabric Locate lost her manager so you can see a There's a small I can hear and I can I can decide that I want a five Nord local cluster. I want a one note local cluster when I say a fine old local cluster means there will be five instances or five separate processes inside which I can deploy my application one nor means just one single note, right? So I can go and switch to these these kind off configurations. And if I click on this manage local cluster, you can see that it actually opens up a window and it shows me over here that these are your cluster so you can see a disappointment. I've selected five nor cluster, So that's right that it has given me five notes for me, right? We will come into this thing later on. But the whole point here is that by using the as your fabric explorer of the local cluster , you can create your as your fabric application. Locally, you can deploy them locally. You can check everything and then go online right on. The second thing is, we have also installed as decay. So by installing the sdk now we get a small template here. So if you click on new project will get a template for the is your fabric development. Uh, it's opening, so remember, we need two things One is we need as your fabric as decay and one is we need as your fabric explorers. So you can see here. This is this project template and this project template has come because we have installed as your fabric s sticky. Right, So by using this will be doing the deployment. So these are the two things you need in order to do as your favorite development. Now, before we move ahead with the demo, I would like to inform you that there are two flavors off as your fabric projects. One is you can create a state ful fabric project on the other. One is you can create a stateless fabric project. So what's the difference between both of them? So as we discussed that we have a cluster of notes and in these Nords, actually, our application gets deployed. Please note whenever I use the word nor nor means a computer, a virtual machine, a box, right? So let's say you have no one in No. One. You have some account application running. It has his own database. It has his own source, scored its own process, right? And you also kept a standby north so that in case if this nor goes down, this application starts running inside. No to. So now let us say the accounting application is running in North one, and there is some problem in north one so automatically, as your fabric will switch to know to, it will deploy to know, too. And your application starts running on no, too. Right now, when this which happens, if you want to maintain the state of the application, then you have to create a state full as your fabric application. And if you say no, not like you are not interested to make in the state, then you can make it stateless because remember, in Nord one must be. Some users are contracting with the application at that time. They have their own session variables. They must be having their own, you know, cookies and acceptable, which are which are there for that request and response, right? So in case you want to maintain that in the note to, then you're to create a state full as your fabric application orders. You can create a stateless as your fabric application. So let's go ahead and create a so your fabric project so you can see that this is a service fabric application which has been installed because off the sdk which we have been stalled . So I will go and create your something like, you know, app my APP, right? Onda As we have said that we have to two kinds off two flavors off micro services. One is stateless service. You can make a state full service. Also, you can have service with a spit artnet course stateless service with sp dot net code, and you can have state full SP .net called. So these are the four important templates which probably will be using there are three other templates. We'll talk about that later on. So at this moment, let's not discuss about them. When I discuss about the actor pattern, I will talk about the other three things right for No, just keep it aside. So let us go ahead and create a simple stateless service. This does not have NBC does not have anything. Right, And let us see. Okay, So what? Our goal is to install this service, the stateless service in our local cluster. Remember, we have a local cluster off five, nor right, So this local cluster is can be browsed on this 19080 port. And over here you can see these clusters, right? So we want to go and deploy our application, which we have just created into these clusters. Right? So now if you see the application which has been created, there is a she shop project you can see here. There's a seashell project and there is some other project here. Call us my app. Now, This first project, what you see out here has a lot of conflagration off how Togo and deploy your project into the cluster so you can see this. My art project has lot off XML fights and these XML files have you know, all the detail of how to go and deploy this app into the cluster environment out here. Right? So one part of the project, you know, talks about how to deploy into the cluster and the other part is valued. Actually, write your cord and your logic, which you want to execute on the cluster. So first, let us go ahead and try to understand what is president in this conflagration project. So, as I have said, this is the configuration project and this is very resource School is right. So in the confirmation project, you know, they're a couple of XML files will start from this manifest XML. So, in this manifest XML, we provide the service name we provide that should it be deployed on a single on partition , right? Or should it be deployed on a session? Ways partition? You also provide here, You know the number off instance counts So little safe your five notes then do you want five instance? Count right away. Are do you want you know, that it should be depend. It should be created on demand, you know. So if one note goes down, then only create another instance and put it on the healthy note. Right? So you wanted Um no. When you go for deployment in also if you look at this current moment, we have the local cluster And in the local cluster we are given to three options. One is that I can create a single node cluster or I can create a five note cluster. Right? So you can see her. There is ah local one Nordic similar in American provide para meters for the single node cluster. The local finally can provide perimeters further five note cluster in case you want to deploy online which I will show later on. You know you can use the cloud dot xml So this is for us You're the online realize you're and these two are for your local clusters. So in this again we can provide perimeters which can help us to configure the clusters. I will come into what kind of parameters can be provided over here. Then we have the published profiles because at this moment we have five environments we can publish on Local one we can publish on local five or we can publish online in this published profiles. You know, the most important parties, the security. So you can see her then even your publishing honors your Then you need to go and provide the certificates. You need to say that. What kind of security? You're looking forward, like you know. So, like, do you want to use that as your active directory and so on? And finally, the final folder is where we have the scripts. So this script is nothing but a power shell script so very quickly, I will not go into power shall now. But Power Shell, um is ah is ah is a scripting language provided about Microsoft for doing admin activities . For example, you on the back of a file you want to back up a database you want toe restarted so right and so on. So you're at this moment. This script is a standard script which comes with the project, and this will help us to deploy our source school. So our source school is stateless. One this project into our local cluster. So that's where the goal of this power shell script This. So now let's go to the stateless project here. So, in the state of project, you can see that there are a lot off class files out here. Um, now the program Garcia's is where actually the mean, ah, that everything starts actually, right. So you can see it first goes and it actually starts the service. Right? And the service is actually this stateless one, which it'll actually start, right? The 2nd 1 is it also goes and starts the even sources, you know. So whenever that is that our messages which you want to send, you understand other messages. You want to send informational messages. So this even sources where there are some configuration saying that Okay, it should be sent toe. Ah, you know, a visual studio, even source. It should be sent to an even viewer. It should be sent to unlock file and so on plate. So I would say that do not pay attention too much on these two files. At this moment, they are pretty much standard, but the most important one. Very well put Your code. Is this stateless? One dots here. So let us go through that. So in the stateless one dots years, you know, there is a run MassINC method and in this is is very well go and you will put your core. Now remember, this is a micro service, and Michael service will get installed into one of the Lord's right. And here you can see what I'm doing. What we're doing is way had looping. That is that there is an infinite loop over here on this infinite loop is actually counting attrition, the number of attrition that has been completed, and it is writing it to an even source. Right? And this even source can be anything at this moment, this even sources conflict with visual studio. So when I had on this program, I will see it in my, uh, you know, in my output window. OK, so you can see there is a loop here. This loop waits for one seconds. One second. It keeps counting, and it writes that counter into the even source. Okay, so let's go ahead and run this. Remember that the whole goal of this project is to make you understand what is the difference between a stateless micro service and a state Full micro service. When you're seeing actual micro services that real time Michael services cannot be loops like this, you know, they are going to be NBC applications. They are going to be a web applications, right? So they're gonna be some useful applications. So at this moment, this demo is to make you understand how Michael Services are deployed, how they look in a cluster. Andi, Um, you know, what is the difference between state full and stateless? So this is just a demo. But after, like, you know, 10 15 minutes, you know, we will come to the real demo. Very will deploy NBC application. Right? So a disappointment. Do not try to focus too much on these templates because I doubt in real projects, and people are using anyone off these templates. Okay, so let me go and start deploying this. So when I start running this, I would like to run this in the local cluster. Right? So when I run this, it will actually go to my local cluster. So let's go ahead and open our local cluster management. You I so you can see it. I've right clicked on the task bar and I've clicked on managed local clusters. When you click on manage local cluster, it opens up the browser so you can see a This task requires application to have elevated expressed elevated permissions. In other words, you know, it is saying that please run your visual studio as in admin. More so I'm gonna go and run my visual studio in run as admin more so go and see it on as administrator and it was again open the project and let us again try to deploy the project so that my visual story has opened. I will click on my app. So again I have opened my project in the admin administrator mode here I want a very important thing to remember. Is that the project? We should be the first project to start is your project of configuration right, so you can see it. I did not say that said this as start a project. I've said that said this has started project because all my configuration where is a cluster? Everything is in this project, right? So that's why I give this a startup. So I'm gonna go and run now. So they're my application is running And my expectation is that this my app should get deployed onto this cluster out here, right s older to see what is what What will happen So you can see here. The first thing is, he's running the power shell script. Can you see this PS one? So it has ran the power shell script very quickly. Okay, that just went off. So and you can see now it is creating the application. It is deploying it to the fabric and so on. Right now. If you remember, there was a counter value, and that counter valley was displayed on to an event source. Right? So there's even source at this moment is configured toe the visual studio. You can also see It says that there are no issue Tiburones because this is not an NBC application. It's a simple, stateless service, right? So nothing else so that it is, um So let us go and see the diagnostic. Even so against here, all the diagnostic given sort out here and I'll just clear everything. And you can see the counter is now saying 32 33 34 You know, so you can see when I click on the diagnostic given you can go to the diagnostic even from somewhere from windows and diagnostic. Right? So you can go and click on the diagnosis given taken. See it or hear Now, once this, uh, gold is running that that also means that it has been deployed on my cluster. Right, So you can see it on my cluster. My app has been deployed, so you can see that also, you can see it has deployed it on north four. Remember, we have five notes it has deployed on north for it is running on note for it is healthy right now. Let us see. For some reason, you're nor for go down goes down. So let's say I'm gonna go and deactivate and remove this right? If I say deactivate and remove this, you know what will happen is these values which are here. It is a state. It's a state stateless service. Right. So these so what will happen here is if I go in and deactivate this or if I go and pause all this side that this nor it will try to deploy on no tree or note for note one depending on you know what kind off cluster map I have, right? So I can see that this is a single note for it Will try to then go to north three. Must be depending on the upgrade. Domain upgrade domain means. What is the the sequence or what is the priority off the north, Varied will be deployed. Right? So let's say I go ahead and I remove this. Deactivate I remove everything, right? So I want to say yes. Go ahead and deactivate the snowed and deactivate and remove this. So what will happen is the first thing is, as soon as this North for has been deactivated by default, the fabric will come into action. It will take our application and we'll try to deploy in some different node. Right? So you can see that this has been it has been disabling. It got disabled and it just crashed, right? The program crashed because it said that that isn't any note existing, right? So again, I'll try to run my project. It's eso let me try to again. You can see that it crashed and again I somehow set him. Please keep debugging right. And I expect that a new cluster note should be added here. You can see now it is now running on north. Zero can see that. So it has now started running on north zero now when it started running on North zero, right, It did not mean to interstate. You can see over here it is again started from and just make a pause here. You can see after when the service was deactivated, it had count. It had counted till 1 38 But because this is a stateless service, right? When the know when the application was deployed from one note to other node, right? It just restarted all the value. But when you create a state full service, this will not be the case. So let me do like this. Let me go ahead here and create now a state Full service. Right. So we'll do the same thing. The will try to run the state full service. Onda, try to see that. Does it mean in the value So let me go here. Service Fabric application, Ignace estate, Full service. That's okay. Also, let me go to my cluster here and remove everything which has been deployed. So the application which has been deployed. Also, let me go and restart this note for activated. You can see the application has been removed by by itself. I did not say rightly can remove it. I will come to it. You know why? Why This application has been removed will come to that so that you can see my state Full service has been created. Let us go out and see that. What is the difference off cold in the state full and the stateless. So when you go to the state full service One of the things what you will see is that that is the state Manager dictionary. Can you see this? So he has actually created a state manager dictionary and whenever he's adding that counter , he's adding it to this dictionary. So this state manager out here is the person you know who helps you to create a state full service of anybody. You say that you want to create a state full service, then you need to go and create a state manager dictionary, and you need to go and write the values in that dictionary so that in case your service is going from one note to other node, The deed ice preserved for that session. Right? So let's see this works or not again. One more thing, which I want to point out. I said that the application was removed by itself, right? So why? Because there is a small setting out here. If you go to the properties, it seems that if you're debugging debugging this application and once the debugging stops, you know, what do you want to do? For example, you can see her properties so you can see what it says. So when the debugging stops, do you want to remove the application? Can see that, or do you want to keep the application? So, in case if I've kept this application than the application would have been running or there . But what I've done here is I've said that once the debugging has stopped, you know, please remove application, right? If you want to go and deploy the application fully, then you can use the build and deploy or publish by by doing publish. It will actually go and deploy properly in a release. More right. So now let us again go ahead and run this and let us see that does our state full service works or not? So again, you can see here it is running the power shell script. Okay, so you can see like it is running the partial skull for deployment. It is uploading the image to the image store image means your binary files, right And all that. And again, I should see all the values in the diagnostics over here, so my diagnostics would start running. You can see creating. And so on on over here as well. We should see that the application is getting deployed right slowly. Okay, so that is application. The application at this moment is running on. Uh, this is very interesting. Can see here it is not running on one note, but it is actually running on multiple notes. Right? Because the time you say the state full, that means that he needs to now ensure that your state is maintained and synchronized. Right? So you can see that he's saying that on the primary node at this moment, it is running on the primary, nor that it's no to, But in case that is something problem, I will switch him to North zero on North three. If remember when it was ST Fel? It just deployed it on one. Nor because it doesn't have to worry about the data preservation. Right. But here now he has to worry about data preservation. So what he has done is he has activated one primary node in which, actually, it will be running on at the same time, he will sink up the data using that state manager with secondary notes. And in case there is any problem, he will switch to the secondary notes. Right. So now let's go back to visual studio. I'm not sure why I am not seeing Okay, I just stopped it so you can see here. So I'm sorry. I had paused over there. The diagnostic, even you can see how the counters are getting implemented. Right? So let's go ahead and bring down no to So at this moment, it is running on Noto. I'm gonna go and bring that no two down. I will just say deactivate this deactivate and let's not say remove data. That's a deactivate. And pause it so I would go and deactivate. No, to underscore. Morgan scored two and deactivated are definitely once this happens, right? It will strike to switch to North Zero or north three. Right? So you can see this is disabled Onda. We can also do a refresh very quickly. If you see at the right hand side, there's a refinished eight off 15 seconds. Right, So it actually doesn't auto refresh, as you know. But in case if you want, you can just go and refresh the browser. Or you can refresh by clicking on this thing over here. Okay. So you can see that is disabled. Now let's see what has happened. So if I go and see or hear uh, let us look at the primary nor can see it's still too. That's fine. I don't know why it is still too. Let's look at my diagnostic events. This one's are the old ones, isn't it? Let me do like this. Let me not only disable it. Let me de acted me. Let me the start. It must be Let me try to restart. I don't know why they did not switch the north. Still totally start. So I'm trying to restart my node on one side. Tried to restart my note. Yeah, that's good. You can see her The note to is getting restarted. But look at the counter values it is. It has still may intended 1 60 to 1 63 So even if 11 of the notary starts, you know, it did not forget the data, right? They try to do something more horrific, you know, let me deactivate and remove the date. I'm not sure what will happen now. So deactivated. Remove everything. You know, like I'm just bringing down No. Do completely not even disabling it. I'm just just removing it. Right. Let us see now if he if you meant institute. So I should get a message for start here saying that the note has got deactivated. Okay, that it is. The North has called deactivated, but he can see still the counter has bean. Ah, counter has been retained and you can see this red signs out here. I can just quickly do a refresh. You can see now his trying to switch from this primary. Noto Another North we can see that has become idol. And it is now trying to switch to know too. But while it is doing that switching, you know, it did not change the value right, so that you can see the No. Two is not down. And the primary node is no, no tree on DA just quickly. If I go to my visual studio, if I go to my visual so you can see the counter is still maintained, Right? So remember that in a state full service, you know, it retains a state while instead less service. It does not read in the state. So this is great. But now, when you talk about creating sidious, uh, Michael Services, it cannot be this kind off counters, right. It will be like NBC application or a Web application or some kind of for process. Right? So let us now go ahead and create an M V C project. So I'm gonna go and create a file new project on the list cleared service application, and we will say that this is application 12 years Now you can see again for NBC Project. It's supporting at this moment sp dot net core so you can see how you can You can say that . OK, so do you want a stateless s p dot net core, or do you want to state fully spit out Nicole. Now remember here the stateless and street full is not from the perspective Off the session variable Split knows. Please note our guys. This is from the perspective off the application state. So for now I'll just still X stateless. So remember, I have only explained you stateless and state full. Now this one is with the A S p not template. Right? So I'm going press Ok Onda, let us see that How can we deploy now? SP Doctorate applications Once you say ok, it starts up the sp dot net core So you're I will just say no authentication and so on. So now in this case, what will happen is we will get one project which is off the fabric Innovate All the perimeters are on the second project. We will get off the M V c application. Okay, so you can see her in the solution Explorer, there are two projects. One is off the fabric so we can see that, uh, slow so you can see a one application is off the fabric, which is all the perimeters And the other application is the NBC core application. I know where the controller that our view that our models, in case you're new to NBC Core, please go and see the learn, envy sick or step faster Video series in November. Explain in basic or and you can see over here that this is the conflagration. Always remember, your fabric project should be set at startup, right? Because that's a person who will actually going deploy things it will knows which is the cluster and so on. Do not make this as your starter project. You know, it will just on us a simple embassy application. OK, great. So I'm gonna go and rebuild the solution. Now, please know that web applications actually run on a port. So if you say you want to host this web one NBC project, it should run somewhere on issue. To be local host someone like 81 toe 8120 something right. And also what we want is we do not want them applications now to run standalone. Be warned that this web application should run from inside as your fabric from one off the node. So, in other words, we have the fabric on the top on this application is deployed into one off the nodes, right? That's what the goal is. So the first thing we need to go and provide that where we want to run our web application , right on which port we once again see here we can go and specify any port here like 999191 I have specified right. So now I will go and I will deploy this application so I'll just say publish. You can see now you get two options here in the publish box one is a local cluster. Other one is in case there is online cluster. I will say it's a local cluster and the local cluster is off five north and I was publishing. So once I say publish, it will actually start publishing on my local clusters. So let us go and browse to our manage, locate cluster and let us see that our web application is getting deployed. So you can see now I think Ah, still looking. So you can see it is getting deployed out here. It will take a minute or something. So once that happens, you know, we should be able to We should be able to see our application. Well, we'll hear the web application, right? Okay. So you can see the just ring application succeeded. Probably succeeded. Good. Now let us go back to our browser, okay? 7. Lab 7 :- Azure tables, Partition and Row keys.: so welcome to lab seven. And this lab seven is a one hour video, one hour exclusive exclusive as your table video. Right? So already in last four, I just talked about that as your stories, and in that I just defined that what is as your tables. But I did not really go in depth. Right. So this is like a one hour exclusive exclusive as your table in this, I will talk about what is your tables. You know how they're schema less, you know, and how they have a structure which is off a key value pair and Sean. So I will go and define us your tables. I'll talk about partitions. I'll talk about Rocchi's how to you she shop to connect was your tables. We will talk about point quit is hard partitions, duplicate records, aggregate data, compound keys, aegypti transactions and then also will talk about a lot of us. Your table design patterns which you can follow like interact intractable design pattern, inter table design pattern delete pattern, long tail pattern, you know, and so on. Right? So this is an exclusive one hour as your video is your table video and I know that one hour video is very tiring. Right? So what you should do is you should watch like, 10 10 minutes. So relax. Watch for 10 15 minutes. Positive video. Go out. Relax. Watch for 10 minutes. Right on was the video because I feel that this video Once you watch this video, you would almost know everything about us. Your tables. So let us start now before I deep dive into as your tables. Let me go like this. Let me first go and demonstrate, you know how has your table looked like? Looks like on Then I will go and put down a definition Arraras your table. So what I will do is I'll create in us your table. I will add some rose to it on. Then we will come out with their definition, right? So for creating as your table you need to go in, create as your storage And any time you're confused, you know from bad to go and click. Where from the menus, right? Just click on this, create resource and put a search here, for example. I'll just say table Andi Ah, than in the table. I can you can see that I'm getting a storage account table. Q rights. I'll just click on this and I'll see create. Remember, we covered all this in last four. We talked about What is this account I we talked about? What is a classic deployment model? What is a resource? We talked about the different drives. We have standard and premium, right? So I will not go in depth into talking off these things, you know, because already I've discussed all this in love for So you had I would just give name your shift storage, right? I just keep this as we won standard. Remember, we talked about a lot. Is at our is all those things we talked about in the first as your storage video. So here I will just take a lot is because I don't want to get charged too much. Let us give a resource name here. So And said he saw Swan on DA. He says 123 must be then and I'll say create. So the first thing is we need to go and create on as your storage account. And then in that as your stories account, we can go and at tables we can go and add cues and so on So you can see that that our shift story has been created. So let's click on the storage and let us go ahead and create a table so you can see we can create files. We can create a blob. Right? But we are interested in creating ah, table service, stable service that it s stables. Um, now that is going at a table. So we'll add a table. Name your called as Ah, hospital management system. Now, wait a minute. Now you must be wondering that this is a table. So in case if you're designing our tables for hospital management system, then the table should be like, Ah, patient table. It should be doctor stable medication table. So why is this name hospital management? Why? I will be giving a database name year, right? Why am I giving a database name here? Now, please note that in case if your mind is comparing the name off table with the table off SQL server or oracular at IBM is, then you are mistaking over here. If you want to map the database and tables concept you know with as your tables, then you need to think in such a way at the top level is tables as your tables. So, for example, over here, at this moment, if you see, I have created this Ah hospital management system. So this hospital management system is actually a database on in this, you know, we will have tables which are actually created the partitions. So if you think about it, the database is nothing but the table and your RGB Emma stables is nothing but the partitions, so you can see now have created table lately. Go and add some records. Once I add some records, you would understand what I'm speaking here. Right. So this is the tables created here. So in order to add records, what I will do is I will use the ah as your cloud exploding. Remember? Ah, if you installed as your development kit, you have this as your cloud exploding. So I'm gonna go and refresh here so you can see out here. Ah, that is a shift storage inside the safe storage. We have tables on in the tables. We have hospital management system. Right? So now let's say you want to go and add a patient records I would go and open here to add a patient record. No, please, not. I'm using this cloud Explorer because we do not have a good user interface here to add records, does your table. So that's what I'm using this cloud explorer out here. So first thing you can see over here is that there are three already reserved feeds you. No one is a partition key. Another one is a Rocchi, and the other one is a time stamp. Right? So let me go in at a record here. Let's say I want to go and add a patient record on the patient record. I want to add patient name. I want to add the patient medication. I want to add the patient's age simple. Right. So I'm gonna go and click on add out here, Adam Entity, The first thing you will see that when I go to add an entity, it says that the data will be stored in a name value pair. This is very important to note here. Point number one to note that data is getting stored in a name value path. So this is not really a column thing, right? So now, first in partition, partition actually divides your data into different categories inside the table. So, for example, in this table, I want to store patient records, right? Or on. I would like to also store doctor records. I would like to also store billing information So the patient is categorized by some kind of a petition which I can say patient partition. Right. Let's a patient Okay. Inside that tradition, every role will be identified by the rookie. So I also copy 1001 So that is a patient, which is P 1001 It is lying in the patient partition. Now this partition is what you can compare with the RGB Emma stables. Okay, I will add a property here that I also need a name off the patient, right patient name. I will say shiv, I will also need the patient age. So I'll see patient age. Let's say 40. I would also see say that I want the medication given to this patient. So let's say he has given tablets, right? And you can also see their data types Basically two types, like in teacher bully and double right I've taken out this woman Everything a string. So I go install this so you can see now in the table. I have stored one record called us the patient record, and it is lying in the patient petition right now. Let's say I want to store one more record here called as the Doctor Striker. So let's say I want to put the doctor name and I want to put the doctor address right so I can go in again. Adhere. So now this is a doctor Partition. I look at this. This is a doctor Partition on this is that city 1001 I'll add a property. Remember, Everything is a name value pair. Okay. Everything is a name value pair. Dr. Name is It's a test, and I will add that Let's adopt fees. The doctor fees is that Put it as number here in teacher 64 bit. You know something 100. Okay, I'll see. Okay. Now look at this inside one table as your table. That is the hospital management system. I have two partitions. One is a doctor partition, which actually stores the doctor records and the other one is a patient partition restores of patient records, right? In other words, as your tables are skim Alice, there is no scheme. Eyes such there are partitions and there are name value paths. So this is very different as compared to the rd bms tables. You know what you're thinking about? So your RD BMS database is nothing but us. Your tables, your rd BMS stables is nothing but the US your partitions does your table partitions. So in case if they're mapping, um, IBMs with us your tables, which is actually unfair. But I'm sure that with that word table coming in again and again, you like to map it then please map it in this way, the RD BMS database is the is your people's and your RGB Emma stables is the as your table partition. Okay, I can again go and add one more record. Let's say this time again, I want to add it to the patient partition patient partition. So I'll say I want to add a record p 1002 Now, remember that if you want oh, keep the consistency right. Then please, nor Dario to keep the same property so you can see I'm putting the patient partition. And I need to put the property exactly as it is the patient age. The patient named the patient name on medication. I can see I have made a mistake in the patient age. Then I need to please know that I need to also make a mistake in the new record as well. Right? So I'll put your, um from the patient name. So this time the new patient name, I'll add one more property. I remember my patient age. Is that the spell Mistake? So I'm gonna make the same spell Mistake here. 30 right. And I will add a medication on medication is let's say that waas tablets This time I'll give him sit ups. Right? Sit ups. So now in the patient partition, we have two records on the doctor petition. We have wonder I got so if I put before you Ah, holistic view off. How does your table architecture is at the top? We have the storage account. So when I created that shift storage that is a storage account inside that I can have a table. Example. I created the hospital management system in that table. I can have partition so I can have partition one like patient. Or I can have partition to like doctors light on. Every partition has a partition key, and they have a rookie to identify the rule. The number of fields are one. Partition can differ from the other petition. Okay, so that's why we say that as your table Czarsky Melisse. Now, one more point to remember is that a storage off as your storage maximum can be 500 TV. One table in as your table can be maximum 500 TV on if you are. If you want to perform transactions right, if you want to perform transactions right then projections can only be performed within a partition means for example, I can one be performed injections within this partition. But I cannot go across other partitions. Right? So I just wanted to make sure that you know the architecture off. How was your tables will look like at the top you have storage, then we have tables, become happy, can have number of tables and then we have partitions and rookie on then on each one of the partition. Records are different in structure, but they live in the same table. So now that we have seen a demo as your tables, we have added some records. We saw that how the structure looks like it is time to put our definition around us, your tables. So, as I've said, when I started this video, I said that first I will demo you and then I will put a definition on as your tables. So as your tables can be defined by the three s, the first thing is, as your tables are, schema lists. So one partition record role can be very much different in from the other partition in the number of feels even in the same partition, you can have different number off eats, right? So it is steam Alice. Second is the values are stored using key value pair. So if you remember, whenever I was adding a record in the table, it was also always seeing me Tell me what is a key? What is the value on as your tables do not take s will did not follow RGB Emma's concepts, right? You need to actually call the FBI. So it is no SQL. It is esque, Willis. So as your tables are nothing but their way to store data in a structure key value format, which is skim Alice on follows. No SQL concept. So that's what exactly is as your tables. These three s pretty much sums up. What was your tables are meant for or what has your tables are? Actually. So now that we have created the people on the A zero storage, let's see that How can we bring this data inside programming languages like C Sharp or Java ? Right. So let's do, at least with C sharp language here. So if or she shot, the first thing we need to do is you need to go and install the windows a zeroed or storage newgate package. Right, because this windows are zero storage has all the client library to access blobs, file stables and kills, right. So go ahead, toe, manage new gets right, click and say, manage new get and ensure that you have the windows as your dot storage installed in your program. If if the windows are zero, storage is properly install, you can't. You should see something like this in your references. You can see her. This is the references here. Right? Great now the next thing is so now let us save you Want to get this patient data into our program? We want to read the collection off the patient data into a program. Right? So in the sheesha program to receive this patient that I we need to have some kind off object structure which is very much similar, like the patient partition data, right? In other words, I need to first go and create a class here. So I'm gonna go and create a class here so that this class object will receive the patient data. Right? So I'll create a class here called this patient. Now these classes need to inherit from the table entity. This table entity is a class in which belongs to the windows as your storage windows. As you're not stories or table right on in this In this in the stable entity. If you see right, if you see this class, this class already has 23 ready made properties here. You can see partition key, Rocchi and time stamp. Right? So these properties you don't need to create manually they're already ready. Made available in the table. Entity. Okay, so at this moment for the partition key for the rookie on for the time stamp. I already have the property site. Now, the next next properties, which I need is I need the patient name. Right. So I'm gonna go and create a property, huh? That is the patient name. So prop tapped Aftab patient name. Also, I need to go and create the other properties, like patient age on medication. So you can see that I have created the other two properties as well. Please note that the patient is wrong, right to spelling is wrong. So because I kept the spelling wrong, I have just in the properties also have kept it wrong at this moment. Are also mapping will not happen now once you have created the class right now, the next thing is we need to go and first connect to the storage account. Because please note at the top. We have the storage account, so remember the structure. So if you remember the structure at the top, we have the shift stories, the storage account. Then we have the table on inside the table. We have our tables, right? So the first thing is, I need to go and create an object off the cloud storage account so you can see it. I'm creating an object of cloud storage account, and you can see that that is some kind of connection. String here with specifies that how you can go and connect to that table. Right. So the next thing is, I need to go and somehow get access off the ah ah, access off. I need to get the unique connection. String off the ship stories. Right. So you can see your down below. You know, there is a connection string, so you can see that there is key one that is key to, so I'll just take the 1st 1 year. I'll copy it. Okay. Andi. Ah, basted here. We're just going to paste it here. Okay, so the first step out here is that create a connection with the storage account. Right on. We give the connection string here, and we say cloud storage account or parts, and it actually gives a reference, you know, to the it gives it a friends to the first. It gives a reference to the stories account online. So basically that cloud storage account, this cloud storage account object here. The storage account object here gives me a reference of ships storage. Right. The next step is that we will go and we will say that in from this storage account. You know, I need to get access to the table. Client object. So this is the second step. So this is step one. You have created a connection to the storage account and step to you will access the table client, the Cloud Table client. Right. And then inside the stable client, you will say that I want to get access off the table hospital management system. Right. So then you will Kredi Step three, you will say get reference toe the hospital management system. Now, remember, because we can have a lot of tables inside. Right? At this moment, you can see that we just have one. But I can have Ah in this cloud Explorer. I can have hospital management system. I can have therapy system, right? So many other things, isn't it? But at this moment, I just want to get reference off the hospital management system. So now that we have access to the table object, But from this table object, we just want to get the partition data off patient or must be the partition date off. Doctor, we do not want to fetch all the records. Right. So for that, we need to go and create a queries. We can see that the stuff for is we will go and will create a query. A very well one. Lee, fetch patient partition. Right. So to create a query, we will say table query and we will create. We will try to get one with a patient data so you can look at the way I'm creating the objects I'm seeing Table quickie. I want to only get patient data and then you can say, OK, um must be I can first simplify it rather than putting an and out here. So let me to simplify this cold out your pity molders. Let me simplify for you so you can see what I'm seeing. People credit patient Where table quickie. The filter condition is that partition key is a called a patient. So I'll say a partition key partition key partitioned p a rt idea the site Physical toe patient. Right. So you can see here for the table crazy. The way relight the queries in the where clause We used this constant out here table Kredi right, which has a generate filter condition in the general filter condition. You have to put the key name, your put the value and then is it equal? Is it greater than so? You can see everything is out here. Okay, Now this Kredi I will go and I will run it on my table. One which have created the top Right on. I will look through the patient records and over here I would like to display the patient name right on. Must be I would like to display the patient medication, right? Patient medication. Um, also like, I would like to do a console. Don't read here so that, you know, I can see the records. Right? So if you really see, um there are 45 steps. Actually, 1st 1 is step one. You create a connection and you get connected to the storage account. Second is the second. The second and third steps are one step, you know, very actually tried to get access to the table. Object, right? Eso you try to get the access to the hospital management system or whatever. And then from there you can then go and create equity and fire it. For example, you can quit. E You can create a query on the partition if you wish. You can create equity in one of the other fields as well, right? And then the last step is you will go and you will start looping. Step five fire the quickie and looked through the collection. Right? Great. So we are almost done here. Let us see this works or not. So I'm gonna go and run this inn a debug mode, so I'll put a debug point here right on this connection string on. Remember that disconnection string You should always put in the app conflict file or in a Web conflict file. You shouldn't be hard coating like this. So let me go and run and let us see that this works or not. So they're the application is running. So first thing is, it is creating a connection with the storage account. Then it gets the reference off the table hospital management system so that it is You can see the reference After that we create the Kredi, and then this Grady is executed on the table. That's the final step, right? So once the table once acquitted, gets executed, you can see that he's displaying shift. That's a first patient name. After that, he is displaying Roger, that is a second patient name, right? So if you see, that is output, right? So in order to go and get data, we need to first create a reference to the storage account. Then get the reference off the table on the table before the equity and then we get the collection. You can take this collection you combined to a grade you can display on HTML table and so on. Also, to see how to do insert, update, delete operations. So in order to do insert operation or delete operation, we need to do the following. The first thing is, we need to first prepare things. Okay, Prepare means for example. Let's say if you want to do insert, then you would create a new object. You would fill it with some data right after that. You know this prepared object, right? So first is prepared the object on which you want to do the operation like insert, update or delete than this prepared object. You will attach it to operation. So for example, if you want to do insert operation, then you would attach to an insert operation. And finally you will send this insert this operation, whatever it is instead operation or delete operation to the table. So, for example, now let's say I want to go and add a new record. Right? So to add a new record first thing, I will go and I will create an object of patient. So let us say this is a new patient. New bad. Let us fill this with some data. So new bad dot Patient name is equal toe. Let's a new bat one Let us also we need to give the partition key. So the partition key is patient, right? Remember, this is a patient record, so it will go in the patient partition. We will also go and fill in. The patient ate something so so you can see over here. I'm feeling the that guard right. Ah, and then this record I would like to go and do an insert bite. All right. So that it is I feel the patient record after this. I need to attach to an operation. So what kind of operation? So I want to do I want to go and do an insert operation. So table um, operation. So now over here you want to do on insert operation? I can have a quick look at my notes here. So, table operations, I'll create an object of Operation eso. I'll say this is an insert operation. Right on. I'll see Dema operation dot inserts. So you want to go and insert this entity which is new patient, right? So that it is. And then this operation we need to go and send it to the table object which we have got the reference. So if you remember, we have this Step three, but we have the table operation, so I can go and see table one dot execute execute the operation, which is the insert operation. So, in general, you know, when you say you want to do an insert when you say you want to do on update or delete first is you prepare the object. So, for example, because this is a new record, I have created a fresh object. If this was an update out, I got it from the collection. After that, you create the operation and you to insert update whatever his operation, and then send that operation for execution. Right? So let us go and run this. So I'm gonna go and click on this. Let us run it so that it is executing. So it creates this new patient object and then inserts it so you can see what I'm saying. Table one don't execute. Something is bad out here. Let's do a view detail, send a bad request. Why? Because, uh why has it sent a bad request? Okay, properties need value. So there are some values which we did not provide. So which values did we miss? Oh, we did not provide the Rocchi, Remember, Rookie is important so good that l A is good, right? So, Rocchi and say this is be 1007 Remember, Rocchi and partition key are compulsory. So good. Remember that every time you get a error, that is good because with every villain so that it is I'm doing insert operation. And this time I hope it's successful so that it is it is successful. So if I go now to my hospital management system on. If I do a refresh, you can see that That's the new patient. What has been added Great in the CMB, we can also do the update part. So what I will do is let me go and comment the part off insert first. So there is a part of insert so again for the update part. The first thing is you need to go and prepare the object or get the object to be updated and then attach this object with the operation and then execute that operation, um, population using the table. Right. So, in order to get the object where you can really do is you can go ahead and first create a table operations against year. I'm cleaning a table operation on. What I will do is I'll try to get the record, which we just added be 1007 So you can see that I am creating a retrieve operation. And I'm telling to the table that please retrieve the results and then get me the result, right? And then I can go and see. Uh, you can see that the new record, which I added wa snoop at one. So I can go and update that entity so I can see it. Update entity, Patient named toe patient name. Do something else. Right. So something some other name. Okay, Onda. And then after that again I can go and I can update. So basically I can go and see so that it is Remember the steps here to attach this object with the operation. So one is that first you get the object, right? You change something. Second is you Go ahead and you say now that you want to do a replace operation and you can see that I have attacked the entity with it and then I can go and I can see a table one dot execute this update operation So now So you can see here now the name is new Pat one and they should change. So you went on this? So remember the process is always seem. First you get the object but I do prepare the object. And then afterwards you go and you attach to the operation which is update which is insert and then you go and you update the operation on the table. So if you see now, just the additions happened. You can see now the value is new Pat here. But if I refresh, you can see it is something else, right? So that means adaptation has been successful. So that was the insert part. That was the update part. Now I would like to also go and run you through how you can do the delete operations or delete option again remains the same. You have already retrieve the object unity. Just go ahead and create a delete operation. So this I will not demonstrate. We have already demonstrated it. So I just put it here in the court so that you can see it later on. So if you want to delete same thing, you will retrieve the entity and he will say deal it and then say execute. Also, there is one more thing here. The batch process in gifts. You want to go and add batches side. So what you can do is you can create a batch operation. You can keep on adding data and then you can say execute batch. So again, this one, this court, I will paste, you know, in case you want toe see it later on. Okay, so this is again a batch operation, so you can see that the a p a off your tables are quite powerful. You know, you can do batch operations. You can do update you can do delete you can to insert and so on. So that brings us to the end off 30 minutes of demo. So in this 30 minutes of demo we looked into as your tables, we look into partitions. Rocchi's we saw how to write a sheesha program and so on. But what I found is that more than understanding as your tables, you know, one of the things I found is that when you start dealing with huge amount of data, you need to be aware off some of the best practices, or else you will end of it very, very bad as your table design. Okay, so you have the 10 important best practices you need to remember when you talk about as your tables. The first point here is think about search first, remember? That was your table. If you look at the nature of us, your table, it is a D normalised format. It is a key value format. It is a flat kind of a structure, right? So as you're table was created mainly to make your search faster. So first, think about that. What are your inputs to your program on how you can make it faster. So for that, the first point to remember is that always fire point queries point queries means whenever you fire any Kredi, please provide the partition key and the rookie if you do not provide the partition key and if you just provide the rookie than it will do as your table scan. So, for example so let me just switch to our cord. So if you remember our code over here, for example over here we just provided the partition key, right? But we should be providing both the partition key Onda Rocchi. So in other words, you know, this Kredi could have bean Taylor something like this I can say table query dot combined filters. Right. So the 1st 1 is that it's a partition key on then. The second filter is that there is a rookie, so always fire point quickly so you can see I'm creating and combined key over here. So I will say that table operators dot on so this one on this one. So yes, I will say, Rocchi on in the rookie, I will say be 1001 Whatever. It s right. So remember that always fire point queries any query which is coming to us Your table. Please know that you need to have the partition key and the rookie. If you just provide the rookie that it will actually do as your table scan. So that is the first point to remember that. Think about search first and always whatever crazy you are fighting, tow us your system as your table system. It should be a point equity. The second point is data storage is cheap. So do not worry about duplicate data. Do not worry about redundant data because many of the developers come from the rgb Emma's background, you know, So they learn normalization. They learn first normal form. They learn second, normal form. They're Gurusinha. Teach them that. See that normalization is most important to London. Did I so bad and so on? So somebody in that mindset, you know they have this thing saying that let's not have duplicate data. But really, if you look at things around right you know, the hard disks, USB They are so much cheap that we do not really have to worry about duplicate data. So in case I was your table also, it says that create duplicate data with multiple keys and aggregate data. Right Means for first thing. If you look at a zoo, your people's costing off data size, you can see her like, you know, for one terabyte per month, it is 10.7 GB. So, but G b so that's like around like 60 $70 per month, which is very cheap, right? So do not worry about duplicate data. In other words, if you look at the is your table structure, the rookie is that is the cluster index. The rookie is by which he actually goes and narrows onto a role. Right. So the Rocky and the partition key are like those indexes. You know what we have in our d b m s. So let us say I'm adding a date out here often. Employees. Right. So here's an employee table right on this employee table. I'm having e 1001 Onda, let us say that s so This is the employee cold you can think about right then This employee has a name, right? So she have the employees also has an email address. Right? So here is the email address. Okay, Share at yahoo dot com. Whatever. On also, the employer has Salad e. So I will have a salad here as well. Right. So let's see it 1000 or something. Now I can see her that we have this employ partition in that we have the employee code e 1001 So, using this, I can go and I can search very quickly the record of shift. But now let's say somebody says I want to also go and search by email address. We can see this email over here. Right? But this email is not a rookie. It is not the partition key. Right on. Searching by email would make a so your table scan. So what do you do in this kind off situation is you will go and you'll add a duplicate records. So must be I will go and add an entity here, and I will say that this is e m e m P search by email. Right. And you're the partition key would be the email address. So I'll say This is my partition key. Now look at this. We're having duplicate records, but because the rookie is like a cluster index, it's like Index right, real economic to records by which a duplicate eso at at one place I can go and use the rookie where we have the email address on. There is another situation where I will use the rookie, which is the employee code, right? So other things will be all same here. So this is the MP cord. An M p called his e 1001 The name is Shiv and the salad e is 100. I can see I have added a duplicate record. No, look at this. This is very important. I've added a duplicate record here off employees, but by using one off the rookie, I can go in search by using E. M. P code on the other partition, I can go and search by using email address. So this point over here says that create duplicate data with multiple keys. So in case you have to three such criterias, right? Think about it on D. C that you can if you want. You can go and create multiple kids with duplicate data. Also, like, you know, do not shy away from creating aggregate data kind of partition, for example. Now, let us say that at some moment of time you want to find the count of the employees. You want to find the salary of the employees and so on. Right. So what you can do is you can create one more partition. Your car last E m p stats. Right on The rookie here can be eso. Let's say that this is, uh, you know, stats. Okay, Stacks is rookie. So one of the stats I would like to add here is how much is a count off employees. So at this moment, I have one. Now that I would like to add Is that how much is the average salary? E right. Average salary. So at this moment, I have only one record, so 1000. Now, you can see that this is very interesting. That is one MP statue over here, you know, very in I have stored the average and account. So every time I other employees record, I'll be adding one to the email address search and one I'll be abating the stats. So the agg 8. Lab 8: - Block blobs, Append blobs & Page blobs.: so welcome to lab eight and in lab eight, we will exclusive talk about blob. So this is a one hour video. So in this will first try to understand what of the three different types of blobs that is blah, glob, append, blah, page blobs and in what scenarios to use, use them. We will also talk about blob access levels, you know, like container access levels and blob access levels and so on. We will see. We will see the demonstration off all of these three types of blobs and why we're doing this demonstration. We look into some very important properties like the threshold in bites, the right and read size in bytes. We will talk about how Tokyo chunks by using put block how to create how to commit them by using put block list. And then we'll also see that how we can use page blob, you know, to do right pages to do, read and seek. And finally, what we will do is we will go and compare all these three blows by using six criterias. So, Labit, one hour exclusively blobs, blobs and blobs. So let us start. So before we start with practical. Slater's quickly go to some theory and then the demos, and I'm easy to understand. So in the previous video, we talked about tables. You know, where we said that tables store in the name value pair there schema less and so on. But then we have scenarios, you know, very would like to store binary data. Bandit data means data like images, video, speedy efs. So in simple words, blob, binary, large objects. Now Bannon editor as compact, so simple Table later is huge in size, so it has to be treated differently. So that's where, as your has created a different architectural when it comes to store blob data. So the way the block storage is organized is it is as follows. At the top, we have a storage, so the first thing is, we need to go and create a storage account. And inside the storage account, we need to create something called us containers. And then inside the container, we go and restore the blob data. Now, the block later is huge in size, right? So when you talk about videos and images, they're huge in size. So if we can specify the nature of the operation to as your that was your can organize accordingly, Andi make it more efficient. So that's why blobs out of three types, depending on the nature of your operation. The 1st 1 is a page blob. The 2nd 1 is the blob blob, and the last one is the upend Blawg. So let us quickly understand that which type of block to select under what scenarios you will select them and how do you make the decision? So first thing, it all depends on the type of operation. For example, if the operation is only append a friend means, for example, let's say you are just doing a logging operation. You're just taking in print shorts and just logging at the last. Then you can use a pen blobs if you want to do a random read, write means if you want to just going right randomly on the on those your right. Then you can go and use a page flop. If you do not want to do a random read right, you do want to do a read right, but it does not random. It is more sequential than even use the block club, so basically depending on the type of operation, you can select these blobs, so if one Lee append a pen blobs if you want to do a random read, write and search and so on page blobs. If you want to do it sequentially, read, write than block blobs. So let's first start with block blobs in blood blobs. The finally data is divided into 44 nb off size. So, as the name says, block the Binali that gets divided into 44 nb off blocks, for example. Now let's say you have a local file year, which is off eight MB, so it will divide it into 44 M V. That is two blocks, and each one of the blocks will have an identification number. Now these block blobs, when they are actually sent to a zero right, they can be send in any sequence. For example. Over here, you can see this local file has been broken down into four pieces, so this is 1234 But before the final comet, you know they can be in any sequence. They can be one for 23 but when the final come, it happens. At that time the same sequence is maintained. Or else you know the integrity of the file will be destroyed. So you can see here that when this final come, it happens to them To the blob, right to the blob, which is inside the container. It is again 1234 So, in blood blobs that data is divided into four. Emphasize Andi before the committee know the data can be scattered in any sequence. But when the data gets finally committed toe the blob, it's always in the proper sequence. Andi, these block blobs finally gets stored into the men Blob. And the main block can have 50,000 block blobs. So that is a maximum. The the the main block can have 50,000 blah blah. So in other words, every blob blob is now off four MB. So for NB into 50,000 means the the Blob, which is having the block blobs, can be off maximum 1 95 GB. Right, So just quickly recapping about black gloves first thing in blob blob, the data is chunked into four n. Besides, the data before the comet, you know, can be in any sequence. But when they're finally committed that in the proper sequence. The next thing is that the blood blobs every blah, blah, bizarre foreign. Besides, and the main block block block container can have 50,000 blobs block blobs. That means 1 95 GB. So this was a terry part of our block blobs. Now, if you look at block blobs, you know they divide the data into small chance, so they're very good for streaming purpose. So let's say you have a video on that video you want toe save it, or the images you want to store it or you want to stream it right, because it it puts them into chunks and these chunks and then again properly sequenced back right at the source. Blub, blub, Czar ext are very good candidates, you know, when you have streaming data like videos are before us and so on. So now that we have understood blood blocks, that is going quickly do a demo wherein we will go and will create a storage account. We will create a container and then inside the container, the less you she sharp language and create block flops because normally, when you have when you will be uploading these blobs, you'll be using some kind of a language, some kind off website or some kind off application. Right? So we will see now that how to go ahead and upload blood blobs using she shop. So let us first go ahead and create an account inside account. We will go and will create a container inside the container. We will upload the block plops right again. If you're not sure about where the menu is to create the blob. Just go ahead. Click on this, create resource. There's a nice search button out here, so I'll just say blob, right, So that it is you can you can see that it says the storage account. Remember all this blob fight table que whatever I have taken till now, our everything belongs to us. Your storage right time We're going to take on the storage account and see, create all this is standard. We have done this previously, so I'll just say here, shift blob. Okay. She was my name's And just push it love for now so that I do not collide with other names. Um, all these things we have discussed previously, the resource manager, the classic account kind and so on. Right over here. You know, I would say that. Please select a storage we to account because in burrito account, all the different types of blobs are supported, right? If you select, must be storage everyone than probably page blob is not selector is not is not supported, right? For example, if you storage blob storage probably the page blob is not supported. So there are some scenarios out here in a wearing. You know, some of the block types are not supported, but in storage we to almost all the types of blobs of supported. So I'm selecting this. I'm taking standard. It's not hard to the school. Remember, If the data is access frequently, then you need to actually go and select one of these. All this we have discussed previously I will not go into this Now I will add all this to resource blob so I'll create a resource Your colors resource blob on Dennis to create. So the first thing is, we need to create a stories account inside the storage account. We will go and will create a container. And then inside the container we go and we will create the block. Plop right so that you can see my account is getting created. You can see this. Oh, rogue missile would here. So you can see that our storage account has been created. Please note the name issue blah, but this is a storage account. You can see I'm highlighting over its storage account inside the storage account. We need to go and create a container. Remember that hierarchy? There is a storage account. There are containers and inside the containers we push our blobs. Right. So I'm gonna go and click on this plus year. I'll say my container. Now you can see that there is a small drop down here saying public access level. This public access level defines that. How much? Read access, please note. Read access you want to give for the anonymous users. Anonymous users means users who do not provide any credentials who do not have any credentials. How much read access do you want to give? So if you if you say private, that means that no anonymous access is therefore read on DA. You need to log into your as your account to get access to this blobs and containers. If you say blobs. One Lee, the blobs are having access and not the container. So when did the blobs have a read access for one D blobs inside the containers, but not the containers outside. And if you say containers, that means everything. So both the containers also you can browse. He can also browse the blobs inside the containers. So basically, this container public access level means at the container level. You're giving access to the anonymous anonymous users to read it. And when you say blob, when with the particular blob only can go and read it, right. So at this moment, I'll just keep it at the blob level, right? And ah, what is this thing can continually lower cases. That is strange Final to save my container. Okay, that is a strange validation. Lower case is okay, so I'll just say OK, so you can see here. I have a storage account and I have a container on this container on. We can access by using these access keys. Right, So you can see that is access key, the connection string. So now let us go to the Goto Sheesha program and let us try to push blood blobs into this containers. So we have. She blocked the stories account inside that we have my container and inside this my container, we're now going to go and push block clubs by using sheesha program. So now here is a simple vin form application have created so you can see her that this is a simple been from application. It's a simple of informed form on DA. You can see that there are three buttons here. Blob, blob, upend, blob, page blob. So in each one of these buttons, I will be writing out, sample cored and demonstrations for each one of the types of blocks blobs. So now you can see the first thing. What I've done is this you have done the table says Well, the first step is, I went ahead and I used new get and I downloaded or added reference to Microsoft Azure. So please go to new get, and the first step is you need to go and add references toe Microsoft azure so you can see here the Microsoft with Microsoft Windows as your door storages added right here, once you're done with that, so the first thing is we need to go and connect. So Step One, we will need to go and connect to the storage account. So the storage account. So that's the first step. The second step is on. In order to connect to the storage account, we need this connection. String this connection string. You will get it from the from the from the blob. So if you click on shoe Blob, you can see that there is something called its access keys. So copy this connection string and based it here, Right on as a best practice. Normally you will put this connection string in a conflict file. And you should read it from a conflict file. But for now, have hard coded it. Steptoe, you will get acts, you'll get ah, reference to do the block client. Right. We'll get reference to the block client and then step three from the blob plant. You will get referenced toe do the container. Right? So from here we will get reference to the container. So if you remember our blob name Waas Shoe blob. So Okay. What happened to my mouse? Yeah, So our blob name was shoe bluff. So you can see that's presenting the connection string on inside that we had a container called as my container. So first thing is this is standard for everything. You are accessing tables. You are accessing cues. You are accessing anything, right? You need to first get reference to the storage account. And then after that we have got reference to the block client and we have got reference to the container. Also Why I called you can create the container also means why I code you can you can go and you can also create the container. Okay, Have at this moment I have done it by the portal. So the only thing which I want to create at this moment through the program is the blobs. Now, as we said, there are three types of blobs. So you can see the name space, the classes here. So this is the cloud blob so that it is cloud blob. So sorry. One is a cloud page blob, right? So that's a cloud page blob! Then we have the cloud blob, blob, blob, blob! So that it is on. Then we have the cloud upend blawg. So all of these three classes are used you know, to create the appropriate blobs. So this demo is about blob blob. So Step one, we get access to the storage account, Steptoe, using the block client, we get access to the container and then step three. We will use this container of object and get access to the blob. Blob! Right, Andi. Then using this blob blob, we will try to upload some kind off a binary content, for example, You can see here. I'm trying to upload a pdf. Okay, so step for use the container, Use the container and get access to block. Blob Object! And you can see I have created a blob Blob! Call s E Book on inside this block. Blob! I'm uploading. Uploading, huh? Pdf. So it's a feisty process. First, get access to storage account, then get access to the container and then inside the container, create a blob blob. And then, using that blob blob, upload your binary content in that blob blob! So quickly read trading and the top. We have shoe blob! This is the account, right? So the account storage name is Shu Blob in that we have a container called Les my container . And in that My container. We have a blob with the name E book, which is off type block. Plop. Right. So we have at the top the storage account name, which is Sheila Blob. Inside shoe blow my container. And in that e book, right? So let's go ahead and run this just quickly. This able pdf is approximately off 13 nb size. I'll tell you why. I have told you the size, right? So what I'm gonna do is I'm gonna go and run this project here. And while I'm running this project, I would like to go and run. Fiddler Tool. This fiddler tour tells me that how is the data sent to the server and why do I need this? I need this because remember, I talked about that. Um, the block blob breaks your day trying to four nb pieces and then really, in just them and so on. So if you would like to see all that, right. So at this moment, I'm not doing anything. I'm just uploading 13 and be size. And my expectation is when I upload this 13 and besides, it should break into 44 MB, Right? So let's see what happens. So I have land the feeler to like the back end and that it is running. Okay, so it is running out Here it is listening on. Let us run this, Ondo. Let us see what happens so that it is. You can see that I've created three buttons and click on Blob Blob and, uh that it is it Get access to the container, then it gets access to the block blob. And I'm seeing upload file so you can see now it is taking some time out here, but in my filler tool, I can see the shoe blob right out here. Onda Uh, when you see the shoe blob, you can see that it is actually uploading in one goal. You can see there are other things out here, but it is not looking to that. But you can see that there is only one request sent. And in that one request he has sent the complete 13 nb in one goal. So the question comes, is what has happened? What? Where is that four And we break up and so on, right, and you can see out here also, the program has successfully executed and the file has been uploaded. So the first question comes, Is that Why didn't he break this into 44 m v? Why did he uploaded in one big 13 nb slot right? Because we did not instruct him by default. What? Count on the cloud blob does this? It says that took a bite if all I tried to push this in one goal But if you want Oh, push them into multiple pieces, right Then you need to go and specify me something called us Single blob Upload pressure in bites. So at the block client level, we have something called us default request options. So in this I'm saying that the single blob upload special value is one MB means What it says is that if anything crosses one nb if any of the data crosses one nb start breaking them into pieces At this moment our file sizes 13 nb So as soon as he sees 13 nb, he will first look into this special bite He will say 0 13 MBI is greater than one nb Please start breaking them into four for MB, right? So let's see now what happens So I'm gonna go and clear all my sessions out here on day. Let us try to run this. Let us see again. I will go and start my capturing. It's capturing. Started on Let's London So this time I would I should see that it's broken down into 44 nb off size, right? So let's see now what's there over here. So you can see now That's the first request, right? And if you look at this force request can you see here it's four MB. Look at this data Here it's four and be OK. Eso I'm gonna go and stop capturing. It's done year. I'll stop capturing. Let us try to analyze the state. I will stop capturing right here so you can see a There are four requests five request 1234 and five. So the first the total file size is 13 and be so for embi plus four nb eight MB Then this is again for M B. This is again one MB so you can see it 14. 12 and this is 13. I think the last one is a block list, you know, So it is not actually sending date out here, so you can see her. This e book pdf waas sent in three block blobs right for him before him before MBI and one and be four block blobs. Right? So basically, we need to go and instruct. Willing to go and instruct the block client that what is that special value, you know, after which, you know, he should start the breaking up. So if this special value is not provided, there is no way the block global actually break into blocks. It will try to applaud it as one blob. But now we can have scenarios, you know, very in we do not want four m v Chung's we want must be 18 b chunks or must be We want to make one and B chunk, for example if let's say the end user sales, my internet is very slow then probably the other than breaking the blocks into four MB. You would like to break it into 11 nb right. So for that there is one more property in which we need to set and that is stream right size in bytes. So on the block blob! I can go and I can set you stream right sizing bites. Okay, So what this says is that this all rights that four and B chunk into one and be now so you can see this is one nb remember it is in bytes, right? So that's why 10 to 410 to four it's 11 nb now eso if you see over here So this stream right sizing bites It says that it sets the block size for writing to a blob Blob. Right. So what should be the size it is set? You remember Do not confuse this with the pressure. The special is an upper limit with say that once this limit is crossed then start creating the blocks on this Suggest that what should be the individual block size again? I repeat, this is a special at the block client at the top level at the container level which says that what is a special after which the blocks should start getting created right on. This says that what should be the size and it decides is not specified. And if you are exceeding the threshold and by default it is for M V. Right? So now let us see that does it. Go and create a four MB. Ah, 11 nb blocks. Right? So I'm gonna go and run this program out here. I'm gonna go and click on this block block, right? And I'm gonna go and run this. So let's go out here on. Let us see what happens now I can see here. Look at this. Look at this. A book, a book, a book. You can see when I click on this. The 1st 1 you can see that this is one M b. Can you see you look at the size here. 10 for mine, right? One MBI. And remember, the whole e book is off 13 MB. So this is 123456789 10 11 12 and approximately 30. Right, So 13 nb it has it has divided. It has ordered and therefore in besides into one nb. So in case if you think that your internet connection is if you're India, the center's Internet connection is slow or fast, right? Whatever it is, you can go and you can All right, this on you can make the upload more efficient also like you can see absent upload from failure. You can also say upload from file a sink. You can also see applaud from stream so that our upload from by Terry Right? So we have 34 flavors here, like upload from Beit upload from file upload from stream, and each one of them also has applaud from file a think or applaud from stream missing. So you can also go and use the a synchronous method. If you use as England's method, it will not block the skull. It will just go to the next call. Onda still asked incredulously at the background. The upload will happen but now you need further more customization. For example, if you see over here the maximum special where you can have is one MB So in case if you want to create a chunk off, I want to keep be or 10 10-K b right? You cannot do it. It has to be minimum one nb So this is the first drawback here. The second drawback your is which is more important than the size is that over here the chunks are created automatically and uploaded. But what he found to do like this I want to create a block. Ah, blob, Blob off. Let's say 10 chunks and I want to go. Go like, you know, first I do fight chunks. Then I paused and I resume. So I want to give a resume. Pause, continue kind off thing. So for that, you know I need to go and create the blocks manually, right? Upload them manually so that I can plug in the feature off, pause and resume. Right. So for that, you know, on the blob level, there are two methods which is given when it's Collison put block in this put block, you can see that there is a block i d. And there's a block data, so you can give your own idea whatever you wish, And you can give your own data what you want. And once you're done with this, you can then go ahead and use the put block list so you can use put block toe. You can use this put block toe, add the blocks and then you can use the put block list. You know, toe, go and commit the list so you can see there's a put block list on this block list. You actually have that. You have to give the list here saying that what is the sequence by which you want to come It so put block toe, add individual block items and then finally put block list to make the final comet with the sequence where you want. So we need to use both of these methods and you can go and you can create your own manual blocks, right? You can customize it. You can pause it, you can resume it and so on. So what I've done is I've created one ready made cold out here because this will need long off courting. So what I've done is I've created this applaud matter and in this upload metal average in all the court, what is needed for creating the block list and and so on. Right, So we'll be using the same file the pdf file on. Let us see that how we can do the the creation of the blocks and uploading it manually. So here this four step is in a very give the foot block. Name up on the block. Name right. The blob, blob names or block name will be a book, right? What is the block size I want to create. Let us say one MB. Then the next thing is, I'm giving him the file name and I'm reading the file. And so here I am, reading the file length, right? So the complete file and divided or the file size divided by the block size. What I've decided is the block count. So, for example, if my violent is 13 MB on, I'm saying okay, like, I want to get one nb right. So turned in by one plus so that 13 blocks will be created right? Then I'm creating a string here and in this string I will go and I will create my block ideas. Now, this is a very important part. If you remember in the first thing you know, when we were using this automatic method, I cannot give my own block ideas. He actually creates his own block, i d. But now that we have taken off the whole customization process, I can go and I can create my own block ideas over here. So here I have a list of string of block ID's. So what I do is I start reading the file so you can see here that I'm I'm reading the file until the file size and I create those chunks here. So I'm saying Okay, whatever is a bite life left there? I'm just creating the block size out here. And then every time a block it's created, I'm adding it to the block I d. So you can see I'm adding it to the block. ID's to the block. I d collection. But I can see this block idea out here is using the base 64 conversion. Now, remember the block I d cannot be like simple string, please note. So here you can see my name is Block I D. And whatever is a number. So whatever its account at that moment, So that is my block. So, like, I can have block one block i d one block. I d toe right, But I need to go and convert this to be a 64 so you can see her. I'm converting it to Bay 64 then I'm adding it to my collection, okay. And then I'm using the put block. So whatever is the i d. I'm using that I d and I'm reading the file stream on. I'm also adding the hash and hash Just is for the US here to say that Please verify. You know, if whatever date I'm sending is properly matched or not, or it is, the integrity is maintained or not. So in other words, here I use the put block matter and I add my blocks. And then finally, when everything is done, I'm saying put block list so you can see this. Why loop out here? It's actually going and looping until the whole file is completing. Right, Completed reading, right chunk by chunk. And every time I'm reading a chunk, I'm using the put block on. Once I'm done, I can go and now say put block list. Right. So again, this one out here will have the same kind of output. This will take our 13 MBI file size and divided into 13 blocks. So So let's see how it looks like. So what I'm gonna do is I'm gonna go and comment all this thing out here. So this is all commented? Not needed, right? This everything is there internally. So over here, I'm gonna go and use that upload matter what I've created this court is that inside this visual studio. So I'm gonna go and upload the court. So wherever the video is running at the left hand side, you can get this code, right? So I'm gonna go and passing the container right on. I'm gonna go and passing the file name. So the file name is the same e book. So what I'm gonna do is I'm gonna go and pass in the same file name here, a book on little See that if he goes ahead and if he creates 13 emphasize our 10 13 blocks , right. I'm gonna go and clear all of this. I'm gonna go and clear all of this out here a lot of things out there and have been cleared . Okay, so let us see how it looks like. So I'm gonna go and run this, assuming that everything will go right. Okay. Uh, I'll say block blob. Right? And I run it so once, I'd run it. Let us quickly go to the fiddler out here and you can see now that it is, you can see our blocks getting created. And this blocks are actually getting created manually. Please note. I'm not using the upload file at this moment. I'm using the put block list. So over here, 13 juncture get created. 123 456789 10 11 12 13 and 14. I don't know that affording chunks. So that is right, actually, 14 chunks because my file sizes 13 points, some X and B. Please note my file size is not exactly 13 13 Mbita starting point except me. So there are 14 blocks on that is right. And if you see in my court out here, I have said here that basically it is if you look at the block the block size so whatever divided plus one. So that's why for the last remaining bites, you know, we need that one extra block size, but you can see a that Yes, our file has been uploaded on. It has been uploaded in 14 chunks. Right, So there are two ways to do it. One is you can use the readymade matter out here, upload from file upload from Valtteri, upload from stream, and so on, or the other ways that you can use put block list and you can use put block to do it manually. Take control so that you can do pause, resume and so on. Now, if you want to also go and look through a block block, for example, I want to go and look to a blob blob. And I want to know that how many block blobs are that in this blob here? So what I can do is I can go ahead here and get all the block list by using download block list, Right? And if you look at this download block list, it also has a input perimeter here saying that what can be the block filter, for example, Do you want to see all one Lee committed Blog's. Do you want to see all blocks or do you want to see uncommitted blocks? What do you mean by uncommitted blocks blobs uncommitted. Browse means for example, you had called the put right you call the put method. If you remember, we had done this previously. You called the put matter. But for some reason you did not call put block list. So there was no come. It happened. But it is there on those your account, right? So if you want to go in quickly such kind of uncommitted list. You can also go and query, right? So at this moment, I'm just going in creating all the block list. It's either committed or either uncommitted. And remember, we have 14 block blobs in this A book, right? So I hope that we we get to see all the 14 So let us go and see if that happens. So download block list and helps you to go. And pretty that how many blocks are there? So you can see this is that it is is the first block, right? This is the second block, right? And you can see the length here in the length it is one m v. Look at that. 1048576 It is invited his one nb second block, third blow for blow fifth logs so that it is. You can see all the 10 blocks I'm creating, So if you want to go and quit e that how maney block list are there in a particular block blob unit to use this download block list and quit it. And also, if you want to go in quickly the committed uncommitted, you can pass a perimeter. Andi, also get the committed separately and uncommitted separately on if you want to go on and Ah , download this complete block, block, block, block. Right. So what you can do is you can say blah, blah, bdart, download, file a sink. Or you can also use download file here. So blob, blob taught Download file. You can also use download, file, download to file so I can see it in the C drive. Let's say I'm going to say my pdf right on. I want to download that. Remember, the 13 MBI is the size. Let us see. It works or not. And at this moment, let me just also quickly go and clear everything out here. Let us see that. Is it downloading in chunks or what is happening? Right. So I'm gonna go into moral sessions. I'll start my capturing right here and let us see that if it is downloading in chunks, I do not expect him to downloading chunks because ah, I'll tell you why. So So that it is download file. Let's quickly check. Is it downloading in chunks so you can see that he is not downloading in chunks? You can see this minus one year on. I can see that he's trying to get the full block out here. Right? So if you just quickly go back again, you can see that 13 MB. So in my C drive, that is a my pdf. So if I go to my c drive yer there is a my pdf. And if I go to this my pd of and if I see the size out here, that is 13 and be so you can see like he just took all the block blobs, all that. All that 13 or 14 blah gloves combined it and send it out. Right. But what if I want to go and download it in chunks, right. What if I want to go and download it in chunks? The wave you have uploaded in chunks than what you can do is you need to go and give one more property here the way we have right bites in the same way we have your read bite so I can see a stream read, read bites, read minimum read size in bytes against your minimum breed size in bytes. Onder. When you use minimum breed size in bytes, Right? If you if you really want this minimum breed size in bytes to be effective, then you have to go and use open Read a sink, right. You cannot go and do the normal what I've done previously. So you can see it. I'm seeing open a blob scream and say opened. Read a sink and I'm gonna use the Oh, wait. Remember a sinking await engaged. You're new to this giver of a sinking of it. It is specifically for a single sculls. So if you want to know more about a sink, innovate Please go and see this section. You know where I've explained what is a sink? Innovate. But if you haven't await here, I need to go and defining a sink over here. So I'm going to find on a sink again, Like in this video, I will not explain what is a sink of it. You can please go and see this video, which I'm flashing on the screen right away. So now if you see it now, in this case, I'm expecting, um you know that this pdf should be downloaded in 11 chunks means 11 nb chunks right So I'm gonna go and remove all the sessions from here and let us see that this works or not. So I'm gonna go and click your and see upload. And I hope that I get to see all I get to see Chung download so you can see it. Now look at it. Can you see that he's downloading in chunks of one and we look at this size here 1111 nb 14 chunks. Whatever was the was the block block by which we uploaded. Those are downloaded and it is my new PD off. So if you go and see this my new pdf that it is and that side is also off 13 empty. So you have the facility, you know, to go and upload in block blobs. You have the facility off downloading in block clubs. So that's why you know, I send in the first part of the video when it comes to streaming it. When it comes to streaming binary blob data, it is always block block. Okay, so that was all about block block. Now the next block at the next blob will discuss about it's a pen block, so Let's talk about weapon blob again. You know, when you are actually working with blobs, do not forget your friend as your storage explorer in one of the previous videos, we have explained thi 9. Lab 9 :- Azure Queues , visibility timeouts ,Peek & De-Queue.: so welcome to Lab nine, and in lab nine, we will be talking about as your cues and to end. So this lab nine is dedicated for us, your cues. So this is going to be approximately a 30 minutes of video, and it's 30 minutes of video. I have six important agenda, which I'm going to cover first is I will start with the basics off your cues, and I will talk about in the FIFA style off reading. Then I will talk about two important of ways of reading when it's called us a peek message and other one is called us a get message. So that is a get message as well as there is get messages. Then we talk about something called his Dick. Use So dick you is a different process, you know, which is very more sophisticated than reading, so we'll talk about that. We'll talk about the visibility time out, and then we'll talk about message. Idea and pop receive tidy on how both off them help us to create decouple updates in as your cues. So this is going to be a 30 minutes of video completely dedicated to us. Your cues so let us start. So let us first try to understand. Why do we need cues? The main purpose off cues is to decouple two systems. Means what? For example Now think about it. You have system one and you have system too. So System one is making a call to system to and system to his responding back. But the system took and one Lee respond back. If it is up and running, if the system to is down then this call will terminate without a response. So what we can do is we can tell of the architecture over here we can we can put a que in between right? So the system one can go and write it on the Q and the system toe. If it is up and running, he can read from the Q. If the system to is not up and running whenever he comes alive, he will actually read and process this data and send the response back to the Q. So by putting a que in between both system one and system to do not have to be running all the time, right, and that helps us toe decouple to systems that helps us toe communicate between two systems in a more decoupled manner. Now the data structure off Jews is is faithful. It follows the FIFA architecture before means first in first out, for example, you can see here that there are three chunks off data which is written data one data to and data three. So forced Data one was written, then data to was written and then data three. So did generally. Whenever the client Christ to read data, he would force three data one and not data three again. If he tries to read, he will read data to And then he will read Data three so forced in, forced out. So whatever you write first will be read first. So that's how the architecture of the Q is. So now let us see how we can go and create and Q. So the first thing is in order to create a Cuban to create a zero storage account. So if you remember in the past videos, you know, when we created the table when we created a blob like force, created a storage account, right, so you can see that I have created a storage account here call a shift shiv account. And then inside this, I can go and I can create a cube so you can see that is disk users. So I can go and click on this, and I will. Let's create a que here. Carl s my kills so that it is You can see now my Q has been created on inside this Mike, you. Now we can go and we can add message and we can Then Doofy full first in, first out, right. So now let us go ahead and write a simple she shop code and let us see that how we can go and push messages into this Q out here, right, So that you can see I have created a simple console applications. Or the first thing is, we need to go and add your name space. Remember, I've been saying this all my previous videos, so you need to first go and add a secure package. Right? So I'm gonna go and add as your package so windows as your storage so that it is cell installed this on as a default step. You know, you need to first go and create first go and create a connection. So from the sheesha program now, the first thing what we need to do is we have done this in done this for blobs. We have done this for, uh, tables. Right? So first thing is we need to go go and get access to the azure storage account you can see . And also you can see I've pasted the connection string this connection string I have received from this access. So if you remember from the access keys, we can get the connection strings of this connection string I've pasted right out here. Right, Onda? Um so you can see it. I'm force creating. I'm forced referencing the storage account in that storage account. I'm referencing the client Cloud Cloud Q. Right. So that's a class we need to refer. And in that I'm refering Mike, you. So if you remember, we have created this mike you out here. So that's what I'm refering. I think it is plural. My cues. Fine. So many to Quinn changes to my cues. And in case if this cube is not created, we can go and we can say that please go and create this Q. If it does not exist. So let's first start with how we can go and write a message. Right? Simple one. I want to go and write a message. Toe the queue. Right. So in order to go and write a message, you need to go and create an object off the cloud Que message You can see a I've created an object off cloud Que message on in this you can go and you can put a message here. You can see this is like Justin. Hello world, which I'm putting now remember, you can put a message which is a bite content draw, content, string content in teacher, right? A lot of things you can put out here, so But I'm putting at this moment a simple string. So first I'm putting a message. Callers. Hello, World on the next message and putting it as Hello, world one. So I'm I'm pushing two messages inside. This Q one is hello world and other one is a Hello, world one. Right. So, uh, so let me go and run this program out here, So let's go and run this program out here, So let's see if this works so that it is it created as your storage account got access to the cues and then we started adding the messages. So I added, Hello world I've added Hello World One. So now if I go to my A zero out here, I should see both the messages so that it is You can see Hello world and hello World one. So now that we know how to add data and accused, let us try to understand how to read data. Now Reading data from cues is big complex or I can say there are two kinds off read flavors in queues One is you can say read without processing the data which is time that speak and the 2nd 1 is read with processing the data averages storm does dick you So there are two styles of reading. One to speak on. The other one is becue. Now, if you're using big style of reading in big style of reeling, it will always retrieve the current message. Remember, when we talk about cues in queues, the retrieval happens using the FIFA style first in, first out, right, So for example, over here you can see first data one was pushed then data to was pushed, and then data three was pushed. So if somebody doesn't peak one times 10 times 100 times right, he will always read data one again, every bit the statement. If you peek numerous number of times, you will always get data. One. If you want to get data to, then you need to delete data one to retrieve data toe. If you want to get data three, then you need to delete data to on deleting. A message from a Q is an indication that you have finished processing that message and you do not want it in the queue again. Repeat two important points. Forster's queues followed the fearful state, right? So if that is the first point, the second point is that if you want to retreat the next message, then you have to delete the current message. And deleting the current message means that you have finished processing the current message, right, So if you're doing a peak rate, you'll always get the force data. And if you want to get the next data than after the peak, do a delete. So let's go and see Example First off peak and then we will come to the Deco style of reading. So now, in order to do a peak message, we need to use the Q object. The difference of the Q object on in this. You know, we have, ah, function called a speak message. Right. So over here, I can see where MSG is able to peek Message, and then I can do a console dot right line and I can display this message as a string if if it is buying it e than you need to read it in a bite A and so on. Right. So you can see now I'm gonna go and comment this below lines off court because we are not intending toe add more messages. Now, remember that we forced added hello world. And then we added, Hello, world one. So when they speak, message will run right. It will display Hello world. Remember FIFA style. The reading is in FIFA style on If you execute this speak message continuously, it will always read Hello, world until you issue a date, right? So I'm gonna go and run this, um So let's see what happens so that it is my peak messages running Andi, It is displaying out Your hello world can is here now. Even if I go and execute the speak message multiple times you can see her have again, Randa. Deeper point. It still shows me Hello world. So if I put it here again, it still shows me hello world. So until I don't delete the current message, it will not retrieve the next message on deleting a current messages indication that you have finished processing again. I repeat, deleting the current message indicates that you have finished processing, right? So that's what the use off peak messages. Now, this was a peak style of feeling. Now let's try to understand the other style of reading that is dick you. And in most off the practical scenarios, you will probably use Dick you and not peak message. Now, in dick you style of reeling, you will be reading the message, processing it and deleting it. But when you're doing Dick Ewing, you need to respect a golden slogan off queuing. Every message in the queue is processed one Lee once and by only one client Again. I repeat this message. Every message is processed one we once on by one we one plant. So in other words, what you need to do is very well, actually starting processing it, you have the first lock it, so you lock it so that it is not visible to anyone else or else somebody else can process it on. The message can get process twice. So the so indeed going. First you will lock the message. You will read it. He will process it and you will delete it. And why you're doing this. You should ensure that anyone else should not be able to read your message or do something , or else your message can get processed twice. So this is Tom, does Dick you? So in order to do Dick, you we should not be using the peak function. But if we should be using something called, It's a read function. When you're reading it from the Q, it gives you ability to go and say that make this message invisible for one minute or 10 minutes or whatever it is by default, the message is invisible. For 30 seconds, I again repeat. When you do a read by default, the message is invisible for 30 seconds for other people But if you wanted, you can make it. You can. You can change the time because it is possible that you're processing can take more than 30 seconds. Right? So let's go and see example of how to do a dick you. So in order to read we to use the get message function. So if you see her in the queue object We have a get message function and you can see in this Get Mrs Function You know we have this visibility time out this visibility time out says that when you get this message for how much time do you want that the other people cannot see this message? In case you do not provide this visibility time out than by default it is 30 seconds, for example. If you see now, let us see. I do a get message you're on. Then we can go ahead and write that message to a console. So if you see a to this moment, I can see the message you can see Hello World one or hello world. I can see both off them. So when I go here, I can see both the message. Right? But if I go and execute this. After the call to the get message, this message will not be visible for 30 seconds, so you can see it now. I've done a get message. Now, if I go back to the browser here and if I try to do a re fresh, I should not see the hello world. Once you can see that I'm not seeing the hello world one, right? So, in other words, you know when you do or get message the get message function, what it does Is it actually say that? Yes. You want to go and process this message so we will make this message invisible enough for a certain time. Now if I go into a refresh here, you can see now the scene. So after 30 seconds, I can see that message. You can also go and provide Ah, time here. So, for example, let's say if you're processing is taking but more time. You can go ahead here and provide a time out so you can provide a time span and see that I'm expecting that this will take not 30 seconds, but a minute so I can see your one minute. So you can see now this message will not be visible for one minute. So what you can do here is if you want to really do a D Q right. Remember, I can just again start representation. So if you see you when you say you want to do a dick, you that means you will first go and lock that And how do you lock it By doing a get message. So the lock and the reed is done by using get message, you can then process it and then you can go ahead and delete it so logically after this, get get message you should be doing here q dot Delete message the message object So you can see this is dick you dick. You means you get the message, you lock it and then once you're done with the processing, you delete it. So if you see now that the message is received, it is fetched, and you can see now that time span is given off one minute. So for one minute, this message is not visible to anyone. You can see that hello World message is not visible to anyone. So you processed the message and then you immediately delete it. So once you delete it, this message will not be seen on. Remember he first fresh Hello world Why did refreshed hello world? Because it is following the FIFA style. The first message which will inserted was hello world. So it fetched Hello world. If I again don't get, I will get Hello world one So remember the big style of reeling You know it does not do any kind of locking as such it just helps you to beat the message. But the get Mrs style off reading will help you to lock it on. Then process it and delete it now rather than doing a get message you know, in a single way you can also do a bulk Get message so you can also go and do something like this. You can see your for each where, uh, MSC one in q dot Get messages so you can see get messages You can say I want to retreat 10 messages at one time. You can give a visibility time out If you don't give a visibility time out, then by default it is 30 seconds so you can go and do a for each loop you can use to get messages on. Then once the message has been processed, you can go and you can delete this message by using the q dot delete message gil dot the message and I missed you want So again, like if you want to do well a ball, get locked them, you can use this. If you want to update a message, then what you can do is the first thing is you need to get a message and then you can go and you can call queue dot update message and update message. You need to put two things one is ah, you need to put the message what you want to update. So, for example, you can see that I've done I get message and I can go and I can change the content so I can say this is changed, right? And then you can go and put this updated message in the update message function. And if you want, you can also give the visibility time out so you can give your saying that this submission will take like, 20 seconds so I can say or it can like, so I can see. You can see it in the time span. That is our so zero hours and will take a minute on zero seconds. Right. Onda, uh, unit then provide something called us. Message update feels this message of it feel says that what are you updating? One is that I'm updating the message as well as I have updated the time span. That it the visibility time. Right. So over here I need to say message feels so I have updated the content as well as I have abated. The I've also updated the visibility. So with this, you know, it just tells, you know, that we had in sync with what message we have given, right? So update message the message What has to be updated in case you want to go and change the visibility time. So if you actually go and change the visibility time, then you're to say both the content and the visibility. If you don't change the visibility time, you can go and just remove this thing. At this moment, I'm updating both the visibility time by default is 30 seconds. I have updated it to one minute, right, So this will actually go and update the message. So if I run this, it will go and it will update the message. Also, while you are a breeding the message, please ensure that you put a proper visibility time. So you can see I have fished a messager, which is Ah, if the glands do a quick watch message dot as string. If we do that, you can see this is hello, world one on this. Hello, world One is changed and then I'm saying update message. Right. So if I now go and do our run again, I should see the updated data. So if I go now and if I get the message on if I Okay, you can see now I have given the times, Thomas. One minute, right? So if I given the time stem as one minute this message won't be retrieved, you can see the messages now, right? So the visibility time has to be finished. Yeah, I still know. So once the one minute has passed, you know, Denver, only I will be able to retrieve this message. Okay. And what is happening is every time I'm calling a get message, it's actually implementing this time to one minute, right? So let us wait for sometime and let us see that if this message gets updated right, so are rather going toe the program. What I'm doing is I've gone to the website. You can see now this message out here, this has changed. So you can see if I go to my cues. It has changed, right? So what was happening out here is why I was getting it now? Because every time I do would get you know, I waas it was having that one minute time period, right? I don't know if I run, I should be able to get the message because I waited for one minute. Yeah, that it is. So now if I do a quick watch, don't a string. I should be able to get the message. But remember now it is locked for a minute, right? So if I do a refresh, this message is not senior. Why? Because the visibility time has started. So after one minute one Lee, this thing will be visible out here. Right? So that's how you update the message. You need to go and provide the content. What you need to update the message. What? You need to update on the visibility time out on over here. I'm saying I'm updating content on. I'm also updating the visibility time. In case you are just operating the visibility time. Then you don't need the content. If you're operating just the content and not the visibility, then you don't need the visibility thing. Now there are two important properties on the Q message, which I want to point out, especially when you're doing disconnected kind of updates. You know, you need to understand both these properties. So on this message, you know, we have this I d property. And there is one more property year call as the popular seep tidy. So what is the importance off this both off these things, you know, help us toe handle Kong currency in as your cues. Now here is the Imagine of it. I'm flashing. I'll think about it. Do you have a message now? Every message in ah is your cue Has an I. D. For example, you can see that I've given our i d there x 76943 Now think about it that there is user a and they're issues that be now, user A fetches this message and he wants to do an update. Right? Already. See, he wants toe dick. You it. Right? So what is your cue does is he actually gives him a pop received I. D. So, for example, he will fetch this message. I d x 76943 on Daz. Your Cuban a locket. Him a unique I d 1001 Now, please note here the ideas I have given 1001 x 76943 In actual scenarios, these ideas are Do I d. So they're quite long. They're long, they're unique, there do ideas. So just, you know, in that image. I've just shown it in us in a small way. But actually, they're big Jew ideas, right? So now the user a fetches a message. Let us say that he fitted this message and keep the visibility time out as 30 seconds or one minute. So what does your cue stays is that here is a received tidy on this. 30 seconds is one we for you. So if when you come within the 30 seconds, I will check that the purpose it. I d to ensure that I'm not upgrading the wrong person, not think about it within that 30 seconds. Let us a user becomes in, so user be or client becomes in. And he says, I want to update X 76943 But what is your cue does is, he says this message is locked by a pop recip i d 1001 and your papa sobriety is once reserved to so you won't be able to update it. So by using the populace it i d. As your Chea Khieu identifies that who has locked that message and that that's how he implements the visibility time out. And also, I would like to bring to notice that the message I d and the opposite I d are very important properties. You know, if you're working with are disconnected que updates. So if if you're implementing disconnected architecture for habitation off the cuse, then this is very important what you mean by this kind of architecture. This kind architecture means for example, Now I go and get this message from online. Right? Um let's see. I put a visibility time out off one minute or whatever it is, You're right. So what I want to do is I want to create a separate message object, so I'll create a separate new message. Object. So this is a cloud message. A cloud que message. So in this, I need to provide. So I want to create a new fresh object itself. Right on. I want to update that fresh object. And once I'm done with the update genuinely, I will go and update to online. So over here you can see now I'm creating a fresh message. New object. So in this now I need to go and provide him the i d and also the pop received. I d dot Papa seep lady. So you can see now have created a fresh new message object. The one message MSG is the old one which I've got from online. But you're I have used the new key word and created a fresh object on. Let's say I'm manipulating this object off line so I'll go and say Oh, cassette message content Updated by Bob i d by Papa seeped I d and I d right Andi. Ah, we can then go and update this message right. So I'm gonna go and update this message, so update message message New Americans here. You can turn this as a discounted architecture. In other words, we are creating a fresh copy. We're updating that fresh copy and we're going online to update it. But when we go online toe updated, we still need to provide the received I d or else as York Evil Q. As your cue will refuse to update it. Right? So in such kind of what this country scenario as well Ah, this message idea and prophecy body is important, so you can see it now. I'm first fetching the message. Now you can see this message. I d is. Ah, it's a Jew. I d. You can see the poppy seed varieties also a big number, right? So I go ahead, I take this I copied to a new message. I update that message and then I use the update message to go and update it so you can see now it has operated it. So now let us go online and check that if the message has been updated toe updated by pop received idea and I d so that you can see that the message has been updated, right? So updated by Papa. See tidy. So this is the same message in a which Waas sent when we had created the decoupled message Cloud que message. Object, Right, So that brings us to the end of this. Are 25 30 minutes off training. In this training we were trying to understand What is your cues? What is FIFA? Well, how to do on add update. What is a visibility time out? How to create decouple updates What is apoplexy, tidy and so on. So I hope that you enjoyed this session. Thank you very much. Okay. 10. Lab 10 :- Cloud services vs App services.: Okay, so let us start with lap 10. Lap 10 is all about publishing websites. It's all about discussing different deployment models that is cloud services and APP services. So in this video, we will focus on cloud services, will focus on AB services will talk about the differences between them. We'll also talk about different kinds on application, which we can host, like liberal worker role web jobs. We will talk about the configuration files like CSD FNC s F G. You know how they help you to configure a virtual machine. We will also give you an architecture or view so that you can differentiate cloud and AB services architecture and also will talk about that how the resource management in cloud and AB services looks different. Right? So this video is all about cloud services for this app services. And it's a very important video from a developer perspective because the time that every proceeds I want to go and publish my website on as they are. These two are different deployment models and depending on what you choose, right, a lot of things changes internally. So this is going to be approximately 30 minutes of video right, So 30 minutes, 35 minutes of video and we'll be discussing exclusively on cloud services and absolutes is so let's get started now before we start with Cloud Services. Was this APP services and so on? Let us first try to understand, you know, what kind of applications to develop will create. So from the 50,000 feet level, let us try to categorize that. What are the natures of applications that developers create? If you think properly? If you analyze properly, developers create two primary kind of applications. One application which has, ah, front end are you I on the other kind of applications which do not have any kind of front end like a non you I so you application means mobile applications, Web applications. You know where and we have an HTML page. What do we have? Some kind of a new I where the end user can go and put some inputs on non U application means in a background process or some kind of a job, you know, which does something at the background, some kind of a power shell script or some kind of a shell scripting a vigilance at the background So there are two primary kind of application. One is a you I based application on the other one is a non U I based application, like a background process. Ondas your gives you facility toe host both these kinds of applications so you can host Ah , you application like a Web app or a mobile application. All you can host on background application, like a windows process off some kind of a script. So what will do us? Let us first go ahead and try to host a simple Web application. That means which has in you. I right, So what I will do is I will go and I will select Um ah, simple Web application and I can select an NBC application, right? So NBC application means it has a front end, which is made in HTML or reserve on. I want to hostess and in as your right. So that is force. Understand that for you, I based application war does as your provide. So let's give a name to this application as you know, my NBC application, right? So it's a simple NBC application, which I want to go and host on your so I'm gonna go and say yes. This NBC application is in a very baby. I know authentication and so on. So let us try to host this application on as your now this NBC application. What we have created is a very normal application. It is meant to run locally. But if you want to run it on the is your cloud, then we need to ensure that it has all the necessary references off the cloud deals. Right. So for that, what we need to do is we need to go and convert this application into Ah, Microsoft has your cloud service projects. You can see here in the solution Explorer, you need to go and write liqueur and second word toe Microsoft as your cloud service project. So let me do that. Once you do that, what happens is it goes ahead and adds the necessary references off. The cloud yells. So now if you go and see the references, you can see that he has added some as your based deals. You can see this key, Walter. You can see system dot ah system dot as your configuration windows a zero. You can see diagnostic so you can see that? Basically, he has added some necessary deals, you know, so that this application can be hosted on as your clout. Right. So this application is done. You can also see that he has created some conflict files here, you can see down below. There are some conflict files he has created. So let's go ahead and hostess application. So I'm gonna go and publish this too, as your so let us go and click on publish as your you need to be assigned in into your account. You can see that I'm logged in at this moment in this quest. Phone interview questions at gmail dot com That is my subscription. I will select that. I will say next. Um so I will say that this is a locally redundant Ah Alatas. So let me go and selected as a lot of us for now, I will say I want to host in South Central somewhere, right? Onda, let me give some name Here. This is Shiv Cloud Service. Right? So this is a shift cloud service which I want to host year I will say create So you can see I'm just going and feeling the drop downs. Now, every, uh, Web application, every cloud service application. What you host, right, needs a storage account. The storage account is nothing. But, you know, in which you can go and create your blobs, you can create your tables. Remember, be called in the first lessons. So why is the storage account need it? Because in case we're doing some logging activity in case we're writing some information, then it gets all logged in into this, right? So I'll say yes, I need that. Have also given some name here to the storage account, right, NBC application. Not as they are. Everything next on Let us go into one publish. So what we have done is we have taken our existing NBC application. We have converted into cloud service and we're trying to host it on as they are. So I will say that I don't want to do any kind of diagnostic at this moment. I just want to go ahead and host it. So now that it is, I will save this profile and I will try to publish it. So what I've done is I have taken the existing NBC application on at and I have converted it into a cloud service again. Insists on that word. I have converted it into a cloud service. Right. I have converted it into a cloud service. Right? So that it is. Let us give it some time so that you know, this application gets posted on a zero. It gets posted on the OCR so you can see the application has got toe published and you can see the u R l. So if I click on this u r l it will open up this site out here and you can see my application has got published on this shift. Cloud service start cloud app dot net. And over here I can see my M v C application running. It is showing me the homepage, right? If I go to my portal and if I do a refresh, I can see that he has created some Resource is here. You can see that he has created she of cloud service, which is a default storage. You can see that he has created a shift cloud service which is a cloud service application right on day you can see that he has also created this application inside which is for debugging and performance purpose. Right? If you remember when I published, you know, it said that. Do you want also to application in sight? So that's why he created this asset. We don't need this. If you want, you can go and delete this for now. Let me delete this. Uh, for now, right? So we can think about that. There are two resources which is created One is this default storage and the other one is cloud service again. I insist on their word. He has created a cloud service right on. The application is running happily out here. The shift closer we start crowd Abd artnet. Now there is one more way off publishing the application and that way is just by using publish. So if I just go and say publish right, let me do this. So the same NBC application I'm would go in again, publish. But this time I'm gonna go and publish it as an APP service. The one which I just published. It was published as a cloud service, Right, So let's let me do that. So I'm gonna go and hit publisher. Okay, so that is that It s published this eso I'll say yes, I want to go and publish my app on the as your right. But we should Aptos furious Save publish. You can see now that he's saying Do you want to publish it as an app service? So I'm saying yes, I want to publish it us an APP service. Ah, he's creating some default stories out here. He's having an hosting plan. You know how my application is going to host, right? I would just go ahead and say created and please start hosting it. So against you have set created and I'm up started hosting it previously. I like clicked and I published as cloud service. And this time I'm just saying Publish and I'm saying publishes an APP service. So the same application Onda we'll find out. The difference is you can see at this moment it is saying, deploying step one. So let's give it some time on Let it deploy. So there you can see that he has deployed the deal successfully my html successfully and he has given me the Ural And if I go and browse to that, you are ill. If I go and browse toe that you are ill. I should see the same NBC application. What we had previously, right? So And if I go and refresh on my as your site, I would see now more resource is getting created. So you can see here There are two. Resource is at this moment. One resource is the APP Service, which hosted the NBC application. On the other one is the cloud service, which actually hosted the cloud service. Right, So we have to Resource is right, the because we did two deployments, right? So one diplomat happened by using the APP service on the other. Deployment happened by using the cloud service. So another question which comes is that so we can do NBC deployment by using either absolute sway or either cloud service way. What is the difference between both off them now? This storage account, which is related to the cloud service, is used one lee for placing and logging, Papa. So in case you are using Prince start right and those kind of sin taxes in your NBC application, then all those gets logged into table salt here. So what I can do is for now, this is not really needed to run your application. So I'm gonna go and delete this. I just want I want I want to emphasize on the fact that what is the difference between a cloud service and absolutely so I'm trying to remove the noise. So I'm gonna go and delete even the storage account. So if you really see what we need to host on APP service and a Cloud services in AB service , we need to re sources any cloud service. We just need one resource. Right? So you can see that this is my cloud service on in this. I can go and see my application here. So this is the NBC application, right? Which is running on DA the one which is hosted by using APP service. I can go and ah, see, by using this So so one. Which is where app service. I can go and see from this u r l So that is the You are so you can see this is my APP service. You are ill. And this is my cloud service. You will. But now the question comes, is what is the difference, right? So what I've done is I've just deleted the cloud service storage account, which is used for for instrumentation, for error messages for for logging, increasing information. I've just deleted it so that we can just focus on what is the difference between an APP service and a cloud service. So let us try to analyze what exactly we have done here. So we have this NBC application and this NBC application. We want to go and run on a ZR. Now, in order to run this NBC application, we will need a lot of things. You know, we will need the Internet information server. We will need a virtual machine. We will need Windows server and so on. Right? We will probably also need SQL server. So, basically, in order to run this embassy application, we need a virtual machine. So when we hosted this NBC application as a cloud service, so you can see in this cloud service year, you will find that there is a watchful machine. So, for example, if you see this cloud service, this is the shift Cloud service, remember, this is the cloud service and the top one, Both of them are AB services. Okay, so we're here when I click on the shift Cloud service. You can see that in order to run this cloud service, there is this role sent instances. And if I click on this, you can see that this is the virtual machine. And it says the washing machine size is small. It is up and running. So basically, our NBC application at this moment is running inside this virtual machine. But now the question comes, Is that how was this virtual machine configured when we especially talk about, Ah, Cloud service invented a conflict, this virtual machine. So basically, if you look at your NBC application in the cloud service, it also has some configuration fights, so you can see this CSC F G configuration files. So if you click on this year CFT configuration fighting inside this, you know, you can see that there is something called his roles. And over here, you know, we have specified that we need one instance here. Right? So we need basically one instance and inside this we need to go and run this NBC application. Right? Um, on dumb. If you see, there is one more file your SIA's death in the C s death. We have also specified that this virtual machine is off small size. Right? So because of these configuration files, it has automatically gone ahead and created this instance for us. So in other words, in the cloud service we have sore score. Plus, we have configurations to define how the virtual machine should be created. I will again repeat the statement in cloud service, we have the source score. That is our NBC application source score. And we also have the conflagrations fire the conflagration fire which defines So we have these configuration files which defines you know what is the size of a virtual machine. You know how many instance we want and so on also one very important point I want to stress here is we have one Lee one entry off resource off the shelf cloud service. So for the cloud service, we just have one entry here And in this one resource we have the court or I will say the website. So you can see in this one resource we have the website this shift Cloud service start cloud ab dot net and also we have the virtual machine. So we have one resource group here which represents the cord or other, the website as well as the virtual machine. So this is a very, very important point which I want to stress here. And the other important point which I want to stress out here is that these virtual machines are accessible. We can go and get exclusive access to these virtual machines. Or I can say we can go and do rdp into it. Or we can do our remote to stop into it So I can go to this virtual machines and I can actually go and connect over here. I can re boot. You can see these virtual machines would you see out here and I can connect In order to connect toe this virtual machine, we have to first go and enable the remote desktop. So this is the remote to stop says that, Yes. You want people to go and connect to the virtual machines, access it, you know, go to the eyes, install something. So let me go and give some access years, So I'm gonna go and put a password here. Ah, let me put a password. Uh, so so for the rdp, he says that please create a password Let's create. Let's use one of the ready made encryption certificates. You know what they have given on did receive this. So now with this, what will happen is that we can go and do a remote desktop rdp into this virtual machine out here so you can see it is still installing. Let us give it some time so that the remote the stop is enabled in tow into these instances . So now that the Rdp has been enabled so now we can go and connect to the virtual machine so you can see that I have have clicked on that instance and I have said connect. Once I say connect, it actually downloads on Rdp file to my desktop, and then I can go and run this rdp file. I need to put the same password, you know, which have which I have used. You know, when I created the ship account when I was creating the rdp user. So I'm gonna go and say yes and let's get connected. So once I do this, it actually starts. My Microsoft Terminal services on Microsoft Terminal services is a tool, you know, which actually helps you to connect tow service, you know, so you can see her. Actually, I'm connecting to my server, Onda. You can see that I'm able to access my silver here. Right? So this is this instance, and this instance is running this cloud service. So it's an exclusive instance. It's an exclusive instance which is created. Why the conflict fight, which were provided on this instance. We can access it. We can go and do installations on these. This instance we can go and put Softwares and so on. So that is an exclusive virtual machine, you know, which is given when you actually create on cloud service. So summarizing whatever we have seen about cloud service, we can summarize it into three important points. 1st 1 we have called the source scored off the web application. Plus, we have conflict fights, and these conflict files define how the virtual machine will be created. Right? So the conflict files have the necessary properties and the values which says that how the virtual machine will be created, how many instance has to be created? Is it a small virtual machine? Is it a large watch your virtual machine? And so on the second important point is that these virtual machines which are created from these conflict files are exclusive our exclusive for ah, cloud service. So it you know, if you see the virtual machine between just saw, it was very exclusive and attached to the cloud service. Rightto, this source scored toe this web application and the third important point, which is noticeable here, is that the VM, the virtual machine and the source score are into one resource group. So the VM on sore scored they belong toe one resource group. Right? So there are three important points in which can, which we can take which we can take from this cloud service. First is the court that is so scored and also the source score has contract files and these conflict files define how the virtual machine will be created. Second thing is, virtual machines are exclusive for that Reb rule, right? And the 3rd 1 is that the virtual machine and the source code, they are all clubbed into one resource group. Now let's try to analyze that. How does abscesses look like? So we looked into cloud service. Now let us look at ab service. So in AB service, you will find that there are two resource entry. So you can see that there is something called It's an APP service and there is something called It's an APP service plan. So if I go to this app service year, this AB service is the resource which indicates that this is your court. This is your website on this AB service plan is nothing. But it is a plan which say's that what kind of virtual machine it is, You know, what is the size off it? How many instances and so on? So this service plan says that how your virtual machines will be created. So here you can see that there are two different resource resource is one for the source score, and the other one is defines that how your virtual machine will be created. So if I click on this absolute is here, you can see that I should be seeing the u r l z. I should be seeing the web application. So if you see here, this is the my embassy Web application on all that right on. If I go to the APP service plan here, this absolutes plan says that Okay, so if I go to the properties, it say's that. Okay, so this is located in Central U. S. It is a small VM. You know, this is the instance and so on so you can see her. You know, the there are two resource groups, one which defines that how your virtual machine will be configured. And one which defines that how your court and web application will be configured on one more very important point to note in this. You guys in this Veum, I cannot go and connect exclusively. In other words, I do not see a connect button. I cannot access this, William. This VMS has been created automatically and it has created automatically. As for this plan, so you can see that I do not have an exclusive control over this were right. So, in other words, you know, here we have two different resources and second, I do not have on exclusive control. So if I go ahead here in cloud services so this stop one so that the stop one was cloud service in cloud service. We said that these are the three important points on that. The below one I'm writing about ab services. So in AB service, the first thing is code is different and configuration is different. You know, it is not one thing you know. So basically year, uh, the code is hosted. The court has different resource group, right? Different resource. Andi, the configuration The virtual machine is configured YR plan. So there is a separately. So school so virtual machine has different resource right on The third important point to note here is that VM we do not have exclusive access doh exclusive access to the VM so against yet I have, um, noted down three important points of ab service, which is very different than cloud service. Code is different. Configuration is different so that the court has a different resource and the VM has a different resource, you know? And they're confident why that different resource that is a service plan on. We do not have exclusive access to the virtual machine. Also, I would like to highlight one more important vocabulary as we move ahead because probably we will use that vocabulary now and then. This cloud service is all certain That's classic way of doing deployment. So if you see a lot of developers who worked with us. Your deployment. They say that one is the APP service, free of deploying things on the other. One is a cloud service or a classic way of deployment. So if anybody says this is a classically of deployment, he also means that it is cloud service. So now what we'll do is let us go back on Bond. Let us go back to our PowerPoint presentations and diagrams. And let's understand that what is the difference between both of them? So if you understood the the basic way both of these things work, you know? But they just try to understand what is good and which we should be using when we start our deployment. Now, as we said in the first video, was your that Ah, cloud service is divided into three important layers. DSPs and see us in case you're not. If you're not understood these layers, I would say that piece revisit the first video. But here I would emphasize some very important point every layer. What is that in this cloud is targeted for a specific kind off user. For example, this year, as layer is in aware network people, infrastructure, people hardware people. People who are Hagman's are more interested. The PS is the layer where developers script, who writes crypto access a P A's are more interested, and the CIA's layer is for the Indians. Is the power users you know you want to go and use applications so every layer is meant for certain nature of user. And the users who work in one Lear does not want to get involved in two other earlier does not want to take unnecessary the work off other layer for which he does not have knowledge off. Right. So here the most important part, um, off a good cloud services that he says that if you change in this one layer, the other earlier will not get affected and it is encapsulated from you. So now with this understanding, let us now go to this boat deployment models, the cloud service and AB service on. Did you see that? Which one off from them respects? This thing called us that everybody should want to see his work. He should do one lee his work right and not get unnecessary involved the other earlier. So let us see that from both of this department model who respects that that rule. So we have this application source code on DA. We can deploy by using the classic model, and we can deploy by using the cloud of the absolutist model so we can deploy by using the APP service model, and we can deploy over using the cloud service model or the classic model. So now what happens? You have the application source score and let's say you want to deploy by the classic model than in classic model. You have sore score plus conflagration fights on the court and conflagration fights. They get deployed into the past layer into the platform. Earlier on, this conflagration file is used to create the virtual machine. So in this conflict, fighting remember those See SDF And you know, those conflagration files is where we have defined in a what is the size of a virtual machine in harmony instances we want and so on. Right? So think about it. You are NBC developer, but you are getting involved with virtual machines. You are getting involved with the infrastructure of layers. And the most important thing is, if you remember, there was only one resource group which actually blinded all these things together. So there was only one resource group. So in other words, if tomorrow I want to take this virtual machine and if I want to use with some other application it is not possible because this virtual machine is exclusive for that source score and for or for that application. So, in other words, in this classic model, everything was tightly coupled. The virtual machine, the jazz layer, the PS layer. Your source scored, right? So as a developer, I was responsible for both of the things I was responsible for. The platform source score as well as I was responsible for the virtual machine. Um settings are the virtual machine conflagration. Right. You can see in this diagram I have great out this area. And this area says that what is the responsibility of the developer in both the deployment models? So in the classic department model, the developer was responsible for doing both the things he was responsible for doing PR as as well as he was responsible for doing the house work. And the second important point is in the classic model. There was only one resource group you remember There was only one resource group, the shift Cloud Service. If you remember on in this one resource group it had everything it had the source scored. It had the virtual machine on this virtual machine I cannot reuse with some other resource is because it was tightly coupled. It was exclusively bound to that liberal right Now let us go to the new model That is, as your resource group model or I will say the AB service model in the APP service model. If you see, I just deployed the court. I don't need the contribution to create the V ums. The virtual machine got created because off this APP service plan on this APP service plan , I can create it separately. Right? So the AB service plan on the sore score, both are different. And if you remember, we had to user groups here. So as a developer, I don't have to worry about that. What? Which is a virtual machine at the background? How does it look like I don't have to do rdp. Everything is encapsulated from from those urine. So that's why this this model of deployment that is the absolutist model of department which is the new way of deployment is better than the classic model. Now, classic model is good for those people you know who have been deploying by using the classic race, so they would probably want to continue that way for some time. But if you're deploying new new applications, then I would suggest please use the APP service model because in ab service model, there is a There is a fully isolation between the past layer on the clear. So here is a nice competitive architecture diagram. You know which cabbage will tell us, You know that what is the difference between both off these models? I know that I'm repeating this thing, this thing again and again. But believe me that it is the most important thing. Because as soon as you go to visual studio and you say you want to publish on as your these two are the deployment models and people get confused about it, right? So we have the classic model or we can see the cloud service model. But everything is tightly coupled, so you have the es layer and the PS layer, and you, as a developer, is responsible for it. So when you create a Web application, which is a Web rule which runs us a website or it can be in worker rule, which ancestor background process. So you also have to provide the conflict file. And in this conflict five we provide, you know what is the size of the VM? We provide the neck we provide the I P address. We provide the veena it. So this whole infrastructure layer you as a developer has to provide why the contract fight . So the developer in the classic model or in the cloud Service model is responsible for everything. Right? And in this case, the William is exclusive for this web rule or worker rule while in the other thing that is the azure resource manager deployment. Or we can say, um, the app service deployment. I just take my bap and I just go ahead and deployed. I don't have to worry about you know what is a virtual machine at the background? Who is going to create it right? That is defined by a different thing called lass the APP service plan. So this APP service plan is responsible for creating the Veum on the AB service plan can be created by any infrastructure person the devil, but does not have to create it as such. Right? So the developers sore score does not. It is not mixed with infrastructure conflagration. Right? In this case, the developer sore score is mixed with infrastructure conflagration. And that violates the single responsibly principle. That means my one. The one thing should do one thing at a time. If this is of NBC application, it should have controllers. It should have she shop cord. It should have been obvious connectivity. What is the infrastructure conflagration doing in my source? Score? Right. So that's why you know this model is mixed up this model ISTEA couple. So use the Aaron model. Use the APP service model in case you have an old project and you want to just continue for sometime. Use the classic model. Also, I'd like to 0.1 more thing here, which is very important from the cost perspective. This statement which I'm making is very important in this case. I get exclusive IUm I get exclusive gm in the classic model. I can go and I can do on Rdp into it. I can go and I can install things into it. In this case, I don't get an exclusive. Um, these Williams our shared Williams. So there are standard shared Williams with I s and everything, and it just takes that Veum from the pool and gives it to you So you do not have access to those PM's. You cannot do any kind of customized conflagration on this VM. So this is more cheaper as compared to this one. Because here we have a full blown Veum for a simple NBC application. So sometimes you want to just create a website. You don't want tohave virtual machines. You don't want to have that big ceremony. Then definitely this becomes costly. So that's at that time. You know, the weather becomes more bit better way of deploying things if you see in this demo. What I did is when I started this demo, I created the NBC application. And then that NBC application or the Web application I converted into a cloud service. Or I'll say I hosted that as of a map, right, But you can go the other way around it around also. What he can do is you can create a new project and you can say that. Okay? I want to host this on cloud so I can click on Cloud on. Then you can go and say that. Okay. I want to create an azure cloud service. Right. So in this case, what will happen is if you create on as your cloud service. Remember, Cloud Service Classic model, tightly coupled model. Right. So you can see this is a cloud service model. So if you want to create a web, you I or user interface I NBC application, you can see like this. If you want to create a background processing a worker role, you can also select this. So if you do okay over here, what you will do is he will start with the same NBC application template. Right. But he will create those Sears de file and the configuration file, the CSC F G file and the CSF file. You can see those are created right from the start. So in the previous demo, you know what happened this I created the NBC application on Then later on, whenever I clicked and said that piece convert this to a cloud service. Then these configurations were created. But now, in this case, what I'm doing is I'm starting it. Us starting and saying that Okay, I want to create as a cloud service so we can see here he is creating the project. But the conflagration files are also created and to start itself on, if you want to go and publish an application as an AB service, then you can go and select this Web application, and you can right click and say, Publish. You don't have to do anything special. Now remember that all these things, like as your functions a Web application Web job, Web job again is a background task Write. All of this comes into AB services, so this absolutist model in a very big deployed things differently. You can create a simple as your function, which has 10 15 lines off court and you can hosted On Cloud. You can have a full blown NBC application and that also you can host it on cloud. You can have a background task, which is a Web job, and it can hosted on house on Cloud. So inside the AB service you have these three categories off court, which you can have while in cloud service. You have the worker rule on the Web rule, so these are old way of doing things. So in cloud service, if you want to create a website, it is a Web rule. And if you want to create a background task, it is a worker rule. Now, in this video I have targeted one Lee on the differences. So I just created a new I based application and I showed you the difference. I did not talk about the background processing golds like worker role and Web job. So in the next video, my focus will be on background task like Worker Rule and Webroot. So I hope that you enjoyed this video in this video. We were trying to understand what is the difference between cloud services on AB services hosting model? 11. Lab 11 :- WebJob and background processing.: welcome to lab 11 rep. Job and background processing in LAPD, and we discussed about, uh, AP Model AB Services model, and we discussed about Cloud Services model on. Then we said that in lab 11 we will concentrate on Bagram processing that means on Web job and worker rule. But when I analyze the situation, I saw that the Web job topics on large in number. So what we will do is in lab 11. People just do Web jobs because this lab itself will take me approximately 40 minutes at least to complete. So if I also add worker rule in this, it will almost take like, 1.5 hour. So what we'll do is we'll do 1st 40 minutes on Web job, and then we will look into a workable and the second most important point which I want to stress here is that that jobs should be given more priority than worker role because worker role and liberal are the old deployment models that it's a cloud services. And I feel that Microsoft is not pushing too much now for Cloud Services model, and they're giving more emphasis on the absolute. This is model so I would suggest if you're if you're starting a new project, and if you want to go back down, processing than Web jobs should be your priority, right? So with all that in mind, let us cover Web job in this lab. So in this 40 minutes of labral before starting with wide Web jobs, the different types of Web jobs like triggered, continuous and so on we will also see that when Web jobs run at the background, how to go and see the logs off the Web jobs. And also we will see something called us Grown expression in, which helps us to run Web jobs every five minutes, 10 minutes every Sunday, out every you know, every specific month and so on also will talk about what is the importance of always on in continuous Web jobs. We will also see different storage accounts, which are needed for Web jobs. And finally, the most important is that we will also see how to publish Web jobs using visual studio. So let us concentrate on in this lab only on Web jobs, and later we will do ah, worker role in some other lab, right, So let us start. So, as we have said in the previous part of the video that jobs are nothing but you know, their background task or background activities which run continuously. Now, these background task and these background activities, you can be a simple e x e. They can be some kind of a bad file. They can be a powerful program. They can be anything in a bitches and excludable so you can take up any kind of excludable , which is your understands on that executed beautiful. You can go and run it as a Web job. So what I'm gonna do is I'm gonna go and take the simple council application here. You can see that I've created a simple console application and in this council application , I'm just saying console dot right line. Hello. So let us go ahead and try to host this council application as a Web job. Also, please note when we say web job, we say it is an absolute this when we say worker role, then we're talking about cloud service. So in the previous part of the video, I have already talked about the differences, So let us go ahead and try to host this application. The simple XY as a vet job. So you can see that I have built a program. It is all successful. So now let's go to our portal here on Let us first go and create ah service a web service, right of Web AB service. Right. So I'm gonna go and create. I want to create ah absolutists. Absolutely, sis. So I'll say, create an app service. You can see the there's a menu down below. I'll say, create an app service and I'll save about Now remember that even though we're creating a Web app service, we can always go and host in this Web app, um, of every rule. Right. So when you say you're gonna go and create on absolutist rate, it means that created Web app service. That means that you can also go and host web jobs into it. So I'm gonna go and click on create here, so let us give this absolutely name as my app service best. All these names are booked on my APP service. Ah, shiv. Okay, so I'll say bs You go. I want to, uh, hosted on a windows platform on Dhere. Let us select in absolutes plan. Uh, let's take a new plan. I just want to take a basic once. What I'm gonna do is I'm going to create a simple, predictable like a blip critic of the simplest one. Let me not let me take up the F one fleeting night absolutes plan My free plan silky So first thing is, I'm creating a NAB service year. And in this absolutist, I would go and I will host this e x e this council application e x e as a liberal, right, So that it is You can see the APP service is getting created, so let's give it some time. So there you can see that the service is created now, one very important point to note here is that we do not have different flavors off ab services for Web job and website. So when you create an app service right, when you create an absolutist like this in the same app service, you can go and you can deploy on the website so you can go to the department credentials. You can get the FTP and you can host of website Remember, in the previous part of the video we have, We had shown that how you can host using FTP how you can go in host using visual studio. So in this you can go and host on website as well as you can go and host on Web job. So somewhere down below you will find that there is a Web job Web job. In case you are not able to find it, you can always go in search your so that it is so this Web job menu over here help you do Host E X is bad files and so on. Right, So let me go here now my e exceed my executable at this moment is in the bin folder. So in this bin folder at this console app seven is my e x c Right. So let me go here, right? Let me say add So let's let's give a name here saying this is the job concern okay, on the file to upload. So I'm gonna go and give this fight to upload. Now a web job can be triggered in various ways. It can be either be manually triggered so it can be either be triggered manually or it can either be continuous right? So what I lose, I'll say that this is triggered manually. So in other words, somebody's going to go and trigger this. It is not a continuous Web job. So remember, there are two types of jobs which we can host. One is continuous, which keeps running at the background, and the 2nd 1 is triggered. Triggered. Triggered means that some event goes and starts stagnant. Job right. And also other important thing is that do it. Do you want it to be manual? So manual means that basically that somebody will go and around this Web job again and again. Or do you want it to be shed? You'll should. You'll means that it will run every five minutes or every 10 minutes straight. So for now, let's make it simple at the same manual. So now that you can see ah, you know the Web job has been created. Eso It seems that this is a manually triggered Web job. The name of the Web job is the job console, and it is really now. I just wanted His Web job is not running because it is manually triggered, so let us select this and let us click on this run but on out here by which this Web job will run. Now you can see it. Seeing that web job is now running and it sees over here completed just now. Okay, also, I can go and run it multiple times. You know, I wish. Now, if you see at this moment, normally Web jobs will run continuously at the background. They will do activities like pulling data from one database is pushing you to other ones. They would be doing some kind off massaging on files, you know, or doing archiving and so on. So they would be doing activities which are not visible normally to the end use of right. But as a developer, what we do is we put a lot of flogging messages. We say that this activity has finished. There is the adult. We go and lock things, right? So if you see in our application at this moment, I have said here console dot Right line. Hello. So I would like to go and see that has really ran this Web job. And is this Hello? Locked somewhere, right? So in order to see the logs off a Web job. You can click on the Web job, and you can click on logs out here so you can go and click on the logs here. Right? So you can see here that this web job has ran two times. You know, this was one minute ago, and this was 56 seconds ago so I could zoom your eso if I go and click on this thing. It goes here, and it shows you're that. Okay, So this web job, actually, than on this time and you can see the hello message out here. Right? So in case you want to go and see log messages and console messages, you can always go and click on this logs out here and you can see things in more detail. So now that we have seen one example where we were manually triggering the Web job but in a lot of scenarios of you, like toe have this as an auditory or alter trigger means that we would like to trigger the Web job every five minutes. So what I've done is I've deleted the old web job. I selected that and I hit delete and it got deleted. So I'm gonna go and add a new one here and say this is Web job Continuous. Right? Uh, so this is Web job continues. So again, I'll go and see, like, the same application, and I will say yes. This is triggered, right? This is triggered. But this is shed your shed. Yule means that we're going to go and give some kind off. Well, you're gonna go and specify saying that he tested on every five minutes or it has to run when you on Sundays and so on. Right now. In order to go and specify a shade, June, we need to go and define it in a format. Something godless Cron expression. Okay, so what are grown expression Crown expression you can think about is off something this kind. Ah, Koran expression has these elements out here. So it has 123456 So there are six elements in cologne. Expression on de eso. It first starts when I say that six elements in a crown expression means this is the format . OK, so you can specify the seconds. You can specify the minutes. You can specify the hours You can specify the day, month or day of the big when you want the job to one. So for now, if you see, um, Micron expression would be something like this. We will not go in depth into crown expression at this woman. Must be I will have a separate video for this. For now, our concentration is on Web job. So I'll try toe quickly introduce you to crown expressions at this moment. But later on, we can have a full blown video for it. Right? So for now, crown expression starts with a second, followed by a minute, then by an hour, day, month and Vicky. Right? So I'll say, Let's say that if you want to run this crown expression, we want to run this job every five minutes. Right? So I'll say that. Zero seconds. So that means I'm not worried about seconds. Right? It should run every five minutes. Let us let us make it two minutes, you know, so that we can see the output fast. I'm not worried about hours. I'm not worried about base or any day, any month on any week. So against, you know, this is a simple Koran expression with sees that, um you want to run it every two minutes, Andi, for you, underwriting every two minutes and you're not worried about what is our What is the day? What is a month and so on? Right. So I'm gonna go and put this crown expression. Let's quickly check this ground expression with Okay, So? So I'm gonna go and put this grand expression right out here, right? It is showing some kind off. Not valid. Chronic special. Let me check my grown expression. We need spaces. I think in between. Is it so let's put this piece sorry for it. Yeah, that it So you can see. So basically, this was a proper front expression, but you need to put spaces after each element. So I've done that and I can see a green sign out here. Right. So let me click on OK, and let's see that. Will this web job run? Every two minutes were specified that this web job will run every two minutes. Right? You can see that there is a refresh button out here. You can always click on the refresh button. You can see at this moment it is saying really status in case it runs. It will say I have executed. Right? So let us click, Refresh and see what happens so that you can see it is running. Can see that it is running Onda very fresh again. It is computed. So if I now go to the logs here. So if I click here and if I go to the logs, I should see the same kind off output so that it is loading the console, loading the council messages. It's a bit slow that it is. So you can see now it has randomly for first time, right? So I'll just go here. I can see Hello. You. I remember that this thing will run every two minutes. So if I If I refresh this, I shall see that it should be running every two minutes. So after two minutes, I should see one more entry out here. Still, two minutes has not passed by. But in case when two minutes passes by, I should see one more entry out here. So there you can see now the web job again ran after two minutes, right? So basically, in order to run a web job in the auto trigger, more we need to go and specify the crown expression and the crown expression is in the format off second, followed by the minutes our day, month and weak. Right on. I've shown a very simple crown expression, which I've written out here, that we're not worried about. Seconds. They should run every two minutes on it can be any hour, any day, any month than any weak. And also very important is that that should be spaces in between each one of these elements . So we have created two kinds of Web jobs till now, one Web job which will be triggered manually, and the other Web job, which will be auto triggered. But no, there is one more scenario, you know, very warned the Web job to run continuously. So the time you go and deploy the job to start running continuously, right? So let us see that how we can go and create a Web job vigilance continuously. So we'll take the same council application so you can see that I've clicked on add here and we will say this is Web job continuously, right? Let's select the same e x e. So I would win select the same console up seven. On this time, I will say this is not triggered, but this is continuous. And Vanessa, let continues. You can see that there is something Collison scale here. We'll talk about this scale later on. Okay, for now, let us concentrate on creating a continuous Web job. Right? I'll talk about the scale later on, so I'll just say OK, so now the time I say OK, it will try toe, create a Web job which will run continuously so continuously the council application will run. You can see at this moment you know, there is a small failure out here, So if you see it, it's saying that failed to add the web job. So let us try to understand what failure has occurred. So I'm gonna go and refresh. You can see that it is saying that job is here, But if you see here the status it says failure. So that is some problem out there, right? So over here it is saying failure. So let's go and check the logs. So I'm gonna go and check the logs out here and let us see that Why has the Web job failed to deploy, right? So I've clicked on the logs, so it doesnt lead the logs in a detailed manner so that it is so you can see you when you go and see the logs. It says that always on is not enable for this Web app. So, in other words, to ensure that you can create a continuous Web job, you need to enable the always on thing and for always on is one Lee available in Basic Standard and Premium Moore's. If you remember for this service for this AB service had selected the free one. So if you select a free one, then you cannot go and create a Web job which runs continuously. So let us go ahead and forced change that free thing into something like basic standard or premium. And then we will go and enable always on. And then this will keep running continuously. So let us go ahead. So let me first go and delete this job. So let us go to our APP service on Let us go and change the plan. So I've clicked on kicked on the search your plan. I can see a lot of things, but I need to go and scale up. So I'm just going to scale up this. Andi, I will ask. You said that this free thing will not work. It has either to be basic. It has either to be shared a standard or it has either to be premium. Right. So I'm gonna go and take this basic one, which is off the lowest cost. So this is off the lowest cost. So let Mr like this so you can see that it is now updating the APP service plan. So once this is updated, I can go and then enable the always on. And then we can also go and on our web job continuously. So let us read and first update this absolutist plan. So there you can see that the plan has been updated successfully. So now let us go to a web job. And it has tried to create a continuous web job. So that is going here. And you just try to out of a job slow. Okay. Lets out of a job saying Web job continues. Save me, Excel Select. These are standard now, continuous. You can see now I can see here that I can go and say Multi Instance on against a single instance. You know? So for now, we'll just say continuous and endless. A single instance. I'm not interested in Multi Instance. I will explain this property later on about the single instance and multi instance. Right. And I will say OK, so that you can see that the Web job has been created. So if I click on this Web job and if I say start, let us see if I say start, you can see that it's, ah, Web job started. So if I refresh this ah, so you find start here. And if I do fresh this, you can see that it starts and it it stays here. Look at that. I can set it says successfully started the Web job on. Then it goes in a pending the start. More right. If I go to the logs very quickly, you just see what's happening in the logs. So let us see what's happening in the log. So in the long as I can see that he is yes, ran Hello. It then went into a pending restock. Then again, click. Don't start it again. Ran hello and it again went into a pending the start. So what is happening out here? Why isn't it running continuously? Remember when we say that it has to run continuously, that has to be done by the program by the council application. So, in other words, in your council application out here, we need to have a kind of infinite loop or continuous loop like in a while, one equal to one. Something like this, you know. So with this, you know, the Web job will become continues, so the Web job does not become continuous by default. As such, your court should be such that it's running continuously, right? So that that's why this woman, What is happening is if I go and click on start, it actually starts. It runs our Web job, but then again it goes in a pending restart, more so in order that it does not go in defending, restart more. We need to have an infinite loop, or we need to have an continuous look right. So for that, you know, the best way is that rather than creating and Web job by using and simple council application, I would suggest to use that template, so you can go and say, create a new project and use the web job templates. So that is the is your web job. Temple. You can use this. This has the necessary basic gold, you know, which helps you to run things continuously. So you don't have to really like that basic logical running the things continuously so you can see that I have selected the as your web job template Onda in that web job template. That continuous loop is there by default. That is a big day in court for that. So if you see out here, you can see that it creates Ah, job host on this whole stays, run and block. So this running block means that this court out here will keep running continuously. Right? So this this host this post actually goes and runs this function right on dysfunction actually goes and runs continuously. So basically, if you want toe really go and you know, having continuous that job as such, what you can do is you can see like that template and write your court whatever is necessary in this function on what this run and block does it it actually goes and continuously calls this process you message. Right. So this process you message is where you can go and you can write logic. So now let us do a simple exercise. Let us go ahead and host this Web job in a continuous more. So let's go ahead and host this Web job on while we're hosting this web job. What we will do is we will use this publish as as your Web job, bizarre through the published. So if you see, in the previous part of the video I was going and uploading the XY. But, you know, you know, what I'll do is, you know, for this demo I will upload it by using the publish as as your Web job. Is that right? So, uh, if you see first thing this boilerplate code what? We have the sample code You know what is given by Microsoft in this? What they have done is, you know, they have created a, um created so ah, method Here, call this process you message. And this process que message gets called continuously because off this material, run and block, you can see this small comment here. It says the falling court ensures that the Web job will run continuously. Right? So on in this process, Cuban message. What? What it is doing is it is actually going on reading from a cue. Gaullist, you so the name of the cube askew. So whenever there is an entry into this queue, right, if there is any kind off Q message, it will actually read that message and then process it. Right. So let us give this queue as name Mike you. Because que is a very general kind off a name, right? So we'll go and we'll create a que collis mike you. And whenever anything is entered into the my to this will read automatically and send that message over here on what I will do out here is I will go and I will. Right that message into the console so that we can see in the log. Right? So I'm gonna go and write this message in the console so that we can see it in the lock. Okay, Andi, I'll build a solution. So let us go ahead and first create this. My Q Q, right. No video Togo and specify to storage accounts in of envy actually publish a Web job. So if you see her in this app Conflict Fi, it is asking for two storage account. Here you can see that one story or one stories accounted. What it wants is is a zero Web jobs dashboard, and the other storage account is as your job storage. Now, what it is as your job storage and Nash for this dashboard is for logging activity. So whenever, like you know, when you've been on your Web job plans when it has started, when it has stopped when it has terminated, all those log messages actually go into this storage account right on this, as your Web job storage is for. For example, if you see in our example we're using this Mike, you right, so whatever business later date of your actual data is stored into this account as your Web job storage. So there are two accounts we need to create. One is as your Web job dashboard, and the other one is a job as your Web job storage. So let's go ahead and create to storage accounts first thing. So I'm gonna go here on, say that I want to go and create stories account. Not remember that in the previous part of the video, I've already explained how to create a blob. How to create a container, right? How to create use. So we'll say that this is as your Web job. Dashboard shift. Okay, Andi, I'll just make it simple storage. I'll just make it a locally redundant storage. Ah cannot contain. Okay, so it cannot contain capital. So as your on and see lock shiv and also lock shipments. This is where the log messages off the web. Jovel belonging. So I have just selected the basic one Locally redundant storage have selected general purpose V one. So these are all standard one we have discussed in the previous part of the video. I'll just go and created. So one is I am seeing lock shift on the other one. Ultimate US data ship. So in lock ship, all the logging information off the web job will be done while in data shift. Our main data, our cue, our peoples will be there. Right? So let me go out here and create one more account here. Data shiv, Right, Onda, uh, again, I'll give this a standard. He was existing resource create. So I've created two stories accounts here At this moment, one storage account is a lock shift. And the other stories account is the data ship. So let us refresh. Let us create these two accounts. So we take the connection string, right, and put those connection string in these in this conflict file out here, right? So that it is both the story accounts have been created, so one lakh ship has been created. So let's go to lock shift. Let's go to access keys on. Let us take the connection string. So this will go into the web job dashboard late. This is the lock shiv night. And the other one is the storage. So that is the stories that did a shiv. So again, I'll go and take the access keys. I'll copy this, and this goes into the 2nd 1 So both the connection strings has have been provided. So now that we have created the web job, it is time to now go and publish this Web job. So we're gonna go and publish this web job inside this Ah, inside my APP service shift. So inside the my absolutely shift you want to go and publish this Web job, right? So I'm gonna go and say here, publish as as your Web job, right? It will ask for a lot of informations, like, you know, just letting go previous out here so you can see in the previous it will ask you lot off information out here like, uh, your user name, your possible and so on. It will say that you need to go and you see out here. So when you actually run the bizarre, it will say that I could tell me what is a subscription. Tell me a resource group. Right. So I'll say my resource group eso It's a resource group in this my app shift. I want to go and publish this led job, right? So I'll do the next everything Next on also publish. So that it is. It is publishing. And once this web job gets deployed right, it should be visible. So it should be actually be visible in the Web job section. So if the job is deployed properly, it should actually get reflected light out here. Right? So let's see, it's still deploying. Still, it's happening so that it is the map has published successfully. Great. So let's do a refresh. And I can see that the web job is running in a continuous more than it is great, right? So let me go and quickly check the locks just to check out that. You know, if there are any errors, if there are any issues and so on. So let me. I've clicked on the logs out here, and I can see that I don't see any address such I've struggled output and things are great . Right? Um, so now what should happen is if I go and put something in the queue. So if you remember the court, what you have written out here, the court, what is your see is that if you go and put something in my queue, this web job will go and processed that data, right? It be processed the data and directed in the console. So let's go ahead and add some detained Mike, you So I'm going to go toe. Ah, my dude, a shiv. Right. And in that, uh, we have created over. You have not created the Q still right. So let's go ahead and create this Mikew right. So let us create the mike You so that it is so in this. Mike, you I would go on, Adam Messager. This is coming from que right, and I would go on ad now. Astronauts adhere. It should actually read this data and process it. So, you know, I'm not sure what time it will take to read this data, but it should actually go and read this data and process the state off the cube. Right. So let me go in quickly. Check in my Web job what is happening. So I'll go to my Web job on Let's quickly check that. Is it trying to read that things would go and click on logs out here? And, uh, let's toggle output. So, uh, you can see that there are some editors out here. Ah, it sees that the storage log shift is incorrect. You can see that they're not some adults, which I see right out here. No, just check. What it is saying is seeing that stories lock ship is incorrect. Ah, why is it incorrect? Still, his lordship is incorrect. I think I created this. Mike, You late round, right? So I'm not sure really, if there is a problem. So I'm gonna go and delete this Web job for now and let me publish it. If you see what has happened is basically the mike you was not existing. So I must have published the web job and it then Seo, like Mike, you is not existing. And the program crashed, Right? So what I'm gonna do now is I will just go ahead and republish it, you know, and I hope that this time I should not have problems. So let me go and said publish as Europe Job under, Say publish. Gonna see. So I have figured out the problem. The problem was not really off the Q name. If you see, we had our to kind of storage accounts. We have specified one is for the logs, and the other one is where? On actual data stories. Right now, this lock storage that is, as your web job dashboard. Right. You also need to go and provide in the application setting. So, in the application, setting off your service your your APP service, you need to go to connection string. So let me go and delete this. Actually, I had added one connection string, which was the old one. So let me go and delete it. So we need to go and add a new connection string here and we will say, this is custom on you will go and you will put this whole connection string right out here on the name off. This connection string will be as your Web jobs dashboard. Now, this is something which I did not like because I feel that I have already specified as your Web jobs dashboard in my app Atlantic file. Why do I need to really go and provided again in the application setting? But that's how it is for now, right? So I'm gonna go and save this. So this was a problem. So now let us go ahead on debt us again go to Web jobs. So this time it has stopped. Okay, so let me go and start this right so that you can see the Web job is now running. So let's go and see the logs on the expedition Here Is that from the log, the Q message should be processed right? So you can see her that it has. It is running the job continuously, and you can see that he has called the process you message. And you can see that that it is saying that I've involved dysfunction. And if I click on this function, you can see that in the message perimeter. The value is this is coming from the queue. So if I again go and put something in the in the leadership So let me go back here and let me put something in the queues. Queues. Right. So let me go here and put something. Oh, so I said, this is this is coming from the queue again. Right? Well, let's see. Okay. And let us go back to our lab services and little see what happens. Let's go to our Web job on the expectation here is that of a job Should have ran again. Andi involved the process. You message again, Right? So let us see that. So you can see you just try to refresh this. So this defect is you can see. Now there are two invocation of the function. The 1st 1 This one was 34 minutes back and this one is now. So if I go and say again, it is processing. So basically here now, as soon as the Mrs comes in the queue, the Web job runs takes a message from the Q and processes it Now, if you remember, I said that we do not have different, different absolutes. Asset. You can just create one app service. And in that Absar vis you can go and host on Web application. And also you can go and host on Web job. So there can be scenarios. You know where you can have multiple projects. So you can have one project, for example, this Web job for which is actually doing the the part of Web job. And also, you can have one more project, you know, which is far my application, like a spit out at NBC application. Right. So what you would like to do is you would like to go and publish both off these projects in one. Go into the same app service. Right? So, for that, what you can do us, you can see that now I have two projects here. One is web application to, and one is Web jar full on. I would like that both off This project should get installed or get allocated to this. My absolutely ship. Right. So for that, what you need to do is you can go and say Here, add and you can see existing fasting. If you want to clear the new as your Web job, you can do it. But at this moment, we already have an existing project, right? So I'm gonna say existing project I want to go and added into this project. So now what happens with this is if you see there is a small Jason file here called his Web jobless. Jason On this Web jobless Jason actually says that when I go and say, Publish this project when I go and say, Publish this Web project, you can also go and publish this Web job. So, for example, if I now go and delete my Web job, for example, it may go and delete my Web job and then let us try to publish it. Why are this Web application so you can see that it is deleting my Web job? Four. So if I now go and say publish if I go and say publish right Onda, let me publish. Ah, let me publish it as soon as your website, so I will go and see. Okay. Publish. Publish. What happened? Look, publish. And ah, I want to go and publish the apte a zero or so start. So it's an AB service. Existing one, right? Publish on already. I have given my account name here. You can see at the left hand side. I have given this quest pointing to the question Gmail. Right. So I want to go and publish the website as well as the Web job into this. I'm we won't see okay and that it is. It is publishing Bill started. So let us give it some time on expedition. Here is that in one goal both the Web application as well as the Web job should get deployed that this it is adding the necessary deals so that it can see adding file, adding gels, adding the XML files, you know? So all the necessary files, what are needed are getting added both for the application as well as for the job. So once this is done over here, what should happen is in this Web job, I should see my Web job getting published. You can see my web job. Food is published right out here. And also I should see my website. So if I go and see So this is my website. So even my website off my NBC application should be seen, so okay, my abs services up and running, right? Okay. I hope the website it is still getting okay, it's published. Okay, so now my website will get published here on my Web job. You can see has also got published. 12. Lab 12 : - Azure DevOps using Azure Pipeline.: welcome to Lap 12. Implementing develops using as your pipeline. Now, this is like approximately a 1.5 hour off session. Now, I'm not sure this video can become one hour or 1.5 hour, but that's approximation, which I'm looking forward and in this lab, you know, I plan to have all these chapters so you can see we have 23 chapters around here on all these 23 chapters you know will help us to understand that how we can implement a complete Dave office automation using those your pipeline. So let's not waste too much time and let us get started with what exactly is develops. So let's first start with the word itself. This develops is a six letter word, and the six letter word is formed from two acronyms, Dev and Ops. So their death stands for software developer and off stands for operations and had been, um so in order to understand, you know, why do we need the cops? Let us understand what happens in a typical software development process, or I'll say what happens? You know that when you say that you want toe deliver an enterprise level software, toe end customer. What kind of process takes place are you know, who are the important parties you know, who participate in the delivery off the software. So at you know, the first is you know, you have an end customer. You know who is demanding, who pays for everything, right? So he demands You know that changes should be delivered faster. Hey, demands. You know, the launches should happen faster. He demands, You know that. You know, whenever the delivery happens, the software should be stable and so on, Right? It should not have bugs and sold right at the other. And we have our developers, you know, who actually tried to deliver the software. So basically the plan they called the build the test. They do release and so on. Right? Andi? Ah, normally the enterprise level software. You know where you have a lot of installations and you have a lot of configuration and the software is complex. You always also have on operations demon who takes care off it. So when the developer actually gives out the final release toe the Operation team, the operation team also has a certain process, you know? So they also go ahead. They also take the release, the deployed, the configuration, you know, ask for the environment. They operated the monitor, the help then customer, you know, to understanding what the changes are. Right, Onda normally what happens is ah, you know that is a kind off friction or I'll see her blame game in which happens between the developers and the operations Department. So the operation says, you know that does that. You know, we have to do a lot of configurations. Take it, live the buildings very complex, you know, So it takes timeto take it to the end user. You know, there are issues in deployment and of which lead story in stable system. So there are some complaints in all the operations team when it comes to delivering this software to the end user and at the other end in our developers say that in OK, it was working at my end, you know, and obscene or does not give me any feedback. So vent vent Such evens happened. They don't even give us any kind of feedback. And they tell us after a month and so on. Right, So this develops, you know you can think about it is trying. It is trying to improve the relationship between the developers and operations. We can also say that there warps is a kind off a philosophy, this kind of a concept. It's kind off, you know, software development. Freeze. Please understand. It is not a process, really. There is no process in developed, so it's kind of for a kind of a concept, or I'll say that, you know, must be the world, which I like is it is. It is a working culture, you know, to make the relationship between their developers and the operations department more a giant. And once you know the relationship between the developers and operation, different department becomes a child and better, right. You can deliver faster, you can deliver a stable product and so on. Right? So devolves is nothing. But it is trying to improve the working culture between the Dev and the Operation departments to make the relationship better so that we can have you know, ah better delivery a stable delivery on a faster delivery. So in order to implement develops, the first thing is the mindset, the working culture we need to all agree that we are all humans. So humans work in the deaf department and the office department and humans always have problem invented comes to collaborations so that our eagles in there are that is so called as the office politics and blame game and so on. Right? So definitely no humans are working. So first thing is really to accept us humans that the death and the Office Department have issues on. We need to resolve it. We need to work us one team so that we deliver the application in a better way to the end customer. So first is the mindset First is the working culture. That's important, right? Once you all decide, Yes, you know, we want to work in a collaborative manner. Now comes the process. Part writer now comes. You know how we can work in a better way. So the second step now is automation. So a lot of people feel you know that develops means automation, So automation is a byproduct. The first thing is you need to agree that you want to follow develops that the first thing . So let me also talk about some of the mitts off develops a lot of people feel develops is a position. I've seen that in job portals. I have seen that some people put that I need our develop like I don't know from very get a person Call is developed, right? So there is no position as develops. There is no department as their hopes develops is not a team. It is not saying that I could take the deaf team and Ops team on Put them into one room and they will start working. Collaborative, right? No develops is not about tool sets develops is not about automation. Develops is not dead bluffs ops, right? So devolves is first is a working culture We agreed on right? But now the next thing is so we need to work collaboratively. We need to work continuously. I think this world continues is important. So you can see that you know that slide which I had here That's light Now I have actually made the process in more off what he called a continuous kind off cycle So you can see the first thing at the left hand side. We have all those task with the deaf team will do at the right hand side. We have all those tasked with the Epstein will do. So the devil do the plan, the code, the bill and the test. Right. And then he will release it to the operations operation. We take up this release deployed, operated on instantly give the feedback, saying that. Okay, that issue in the on the floor. Right? And he will he will you instantly feedback to the team the team takes is does this as a part of the plan and against starts doing its work right now in this whole process. You know what? We really want us If you want to deliver faster than we need automation tools, how I'm using the word automation out here. But as I've said that the automation is a by product first, is that the working culture? Right? So we need, like, yes, if I check in the court, I want that the bill should happen automatically. Right? So I don't want that somebody should go and say Okay, now, let's go and fire the bill that is going through the configuration. So the bill should happen automatically, and then the test uses. I would love to see that lot off this case is you know, they 80 80 or 80 or 85% You know, he's done automated. So you wrote the unit test case and the unit disk. It starts firing on the new bill. Once that is done, then you give the final release again. This release, the release and the deploy, if possible. You know, it should be again automated, right? So it just goes and puts, puts the deployment into a curious over our into Ah, you 80 server on from the you ready the operations and the end of that starts testing it right. And if there are issues and you again give back right. So remember that. You know, At least I feel that their boss does not say that you 100% automation. You cannot replace humans. You can't say that. I will check in the core and then the bill will start automatically. The deploy will happen. The test will happen. There is no interference of anyone know we are You know nothing and replace humans. You know, whatever you build today, at the end of the day, humans are important, right? The one letting what we're seeing in develops is that? Try to automate whatever you can so that you can deliver faster. So yeah, the build is automated. 100%. Let's say must be the test cases 80% on automated and 20% you know, some manual are testing will be done The release and the deploy its automated For you it must be but again like in a venue. See, I want to go final go Life dogs will say no. I will go final Go live. But we have a lot of manual conflagrations which is very difficult to automate, right and so on. So basically develops is all about working culture on the maximum automation. What we can do now toe implement develops You know you have hundreds or tools out there. Every tool is very specific sometimes toe a single phase or probably it can also automate multiple phases. For example, when you say you want you want to do planning, you have slack. You have trailer, you have office. You can also use simple Google drive information or four billion of carbonates You know in the same way. You know, for every fears, for example, cucumber is one of the famous ones Jenkins. We have. We have the Amazon cloud. We have the Google cloud as well. We have those your cloud as well, right? So a lot off people are offering different different tool sets out there. So think about it. You want to go and do develops, and you then have to get into the integration. The technical integration off all of these tools, you know, which can become very complex and which can become very tired. Some. And that's where we have as your develops as your develops says that you don't have to do anything. Just come to my as your cloud on. Create an account. Start your cold chicken. Andi, I have created on pipeline. So basically, what was your has for us? Your develop sizes. It has a pipeline. You know where you can go and you can build this complete flow with just a click off a bucket. Right? So my goal in this video would be that I will go ahead. I refers. Go ahead and do better for planning for that planning. I will go and I will do the court check in for that court check and I will create an automatic build and then I will go and I will deploy this bill automatically into our virtual machine. Right life on. Then we will also see that how we can give feedback back to the plant. Right. So this full cycle I will demonstrate now by using as your develops. So let's get started. So there you can see I am on the portal of us your So let's go to search and type as your develops. Right, So I'm going click on as your develops. Once I click on a zero develops it sees that you have to go and you have to create an organization so you can see here it says my as your develops organization. So I'm gonna go and click on this because at the end of the day, when you say you want to go and do devolves its for an organization, right? So I'm gonna go and create an organization here called us. Must be Quest Pond. Right. So I'll say Yes, continual, you'll be I'll give this name as ah respond Company Quest born dot com, right. Very like to host your project. So I'll say, OK, let me select the same South India is already taken. Is it? I never knew that. So Chris Pond respond company That's taken No, on Dallas. I'll select South India, So looks to me that it has automatically suggested that. So I'm gonna go and say continue. So this will actually go and create on a zero develops organization for your organization on in this. You know, you can go and you can check in your core. You can check out your core. You can do the build. The C I. C D. You know all that things you can actually go and do it out here, right? So that it is. You can see it sees now. OK, so it has created the company does created organization. Now it says that look inside an organization, you can have a lot of projects. So go ahead and create a project. So it gives you two options. You can either create a project public. Our you can either go and created private. You know, so private means it will be only accessible inside your company. You know, with the people whom you give access, only those can access it. Right. So this public is specifically if you want to go in, create an open source project and so on. So I'll go and I'll say, Okay, this is some projects. So I would go and create some project. I will keep it as private on I'll say, create project so that you can see it is It has created the project and it is giving me some kind off small overview and us, you know, kind of for dashboard American second, see overview out here on inside this some project. Now I can go and I can I can create a repository and so on. So the first part is the planning part so you can see that on. You know, when you move your mouse on the boards, you know there is something called a work item. So let me go ahead and create a small plan here. So I'm gonna go and create a new work item on Must be. This isn't task. You can see there is something called us an epic as well. So I'll kick on epic. At the end of the day, it's either epic. It's either a pick or insider task order either. Bug. Finally, it's a work item, right? So work item has different types. So this is just one of those types. So I'll say Yeah. Okay. Forced build first check in. Right. Ask. So this is a task. You know where I'm saying to the developer, Please go ahead and check in the first base line court. Right on. What I will do is I will. A locket. This our task, you know, toe, let us also go and put some comments. Please upload The source scored right with the basic structure. Right? So there's the first task I'm creating where I'm saying that. Please. Uh so to do. And on you can see if you can. People can also discuss down below and so on. Find I want to actually design it toe. Well, no, I know entities found Is it right? Let me go and save. We do have one user was allocated to it, so I'm not sure why There is no users. So actually, I wanted to ah, going a locket. This task to someone. But I don't know why I'm not seeing any user straight and just this woman athlete that you see one user, right? Fine. But I have a task out here saying first checking the task. So basically, I want that somebody should go ahead and check in the task on to check in the court. You need to have reports so you can see there's something called as repositories out here. So if you click on the repository, it says that you know you haven't get up repository at this moment. Remember that when I created a project, it asked me that. Do you want to use the get up repository or the visuals? The old one? The DFS depository, Right? So I said I wanted the git repository. So that's why it has given me this right? Onda, I will take this and I will actually go to my visual studio on. Um let us go ahead and open this project. Right. Open this. Ah, clone this project. So basically, if you see it, you can also go and click on this clone with visual studio. It will open up the visual studio, but I would suggest that you can start from here So also file open. Ah, file clone. I'm sorry. Glowing or check out the course I'm gonna say OK, I want to go and clone. So I will say that I want to clone this repository. So clone means you want to get whatever is there online and just get in sync with it, right? Andi, I don't want to create a local repository. I want to go and connect directly to the A zero develops. If I create a local repository that will also work, you know? Then I have to give a connection to the online. But I would like to go directly and say Okay, I want to go and connect was your repository as your develops depository. You can see that this woman I'm signed in. In case you're not signed in, you need to go and adnoc on from here. So I'm signed in here, and it should show me all the repositories. You know, where I'm connected to so you can see this Quest bond company. There's some projects I'm gonna go and connect to it on. What I will do is I'll say Okay, browse. Let us go ahead and create a proper directory. This is very important, you know, Don't just create the source code anywhere else creating a proper directory. So I'm gonna go and create a folder here called as, Ah, Quest formed deposit fees right and everything. What I will do, I will do in this d drive correspond repositories. So I'm gonna go back again, and I will say that Let's do all check in, check out over here and I'll say clone it so that it is you can see now have cloned on dit . Is cloning the repository on? Uh uh, it will ask you for signing up, so I'm gonna go see a sign. A sign up. So I already had put the credentials in my history so you can see that it is actually signing up. And there you can see I'm connected to my my team explorer toe my question cos some project And also now I can go and I can start creating the project right out here. So let's go ahead and create on simple embassy project and let us let us go ahead and check in against ah ah against a work item which I have created. Remember I created one work item over here. We're come work item I d one. So I'm gonna go and create a project And what this project should be a part of this local folder, Deke. Respond reports because I have cloned it. Cloned the online repository out over there. Right. So I said no final project on Let me select. Ah, console sp dot Net Core web application. Right else in next. Andi Ah, we need to have that as the repository. So let me go back here. Oh, okay. On we will create it inside this folder. Quest, Bond repos. Because inside this all the get and obvious configurations are now there. So I'll say final project on s p dot net core application on the location in a very should create is this one you know so well. Say map. Ah, 123 Right. Andi, I was create, um it will ask me that you want to create an NBC replication? Yes. Whatever it is, we'll go ahead and create it. So now we haven't web application created inside that repository folder Onda. If everything is good, you should be able to see those locks science out here, which indicates that you know things are in control, right? I would go out here and let us try to, uh, go ahead and check in the court. Right? So let's force click on this. Changes out here before that. Before that, we don't want to check in. We really don't want to check in. Ah, this dot years folder. You know, it has a lot of fights, you know, which are related to the visual studio configuration. Right? So we don't want to check in everything right? We just want to check in the solution and the relevant source scored. So let me just go back to settings out here and let me just ensure that I go to re positively settings. And I'll say, Let's create a get ignore file which will actually ignore any kind off, according of which is 11. So, in other words, it will now not check in. So if you go to the folders and file explorer, it will not check in. Ah, the dot PS files, you know? So it will not checking dot Rias files the dot get files and so on. Right. Good. So we are all set. You can see over here. I'm This is the home where you see everything off the TFS. This is a solution, Explorer, where you see the sword score. So this is actually our source score. This is actually related to the online asses. Your in a very want to connect you under checking and so on. So if I click on the work items said this moment Ah, we are unable toe because it is configured for user shift. But you are trying to connect. Why? Anonymous? Okay, so you can see that I'm not able to view the work items. Must be I should actually try to connect. Right? So this is a question on company and let me try to connect out here that I'm connected. Not sure why? It is not showing me. Let me try to see assigned to me. Yeah. Oh, that was not designed to me, right? So, uh, can't I Gwen's show? Okay, So looks like, but I'm not getting those errors now, you know? So I feel that I should be able to, uh, I I can see that now. I'm not getting that error where it was seeing you are not connected. Right. So we'll see. One work item is created. You know, that work item at this woman does not assigned to me, so probably it is not showing out to me out here. Right. Ah, following O r. Must be okay. No, that I mentioned also, that's what it is, you know. So this over here, I've said my activity, and that is something, you know. Okay, fine. Which will check that late from? So let's go back and let's try to do a check in. So I'm gonna go and check in this Scored. So let's again go back to the home and we'll see. What are the changes? So these are the changes? Yes, the whole application. I want to go and ad online. Um, also, can I just quickly check before I go online? You know, how about going and checking? Just the settings and the repository settings. So I just want to check, you know, if in the remote I'm connected toe quest, one company as your all right, That's what it waas. So can I go and just check in my repository? It was Quest one company as your some project quest. One company has your some project. Very good. You know, just because sometimes you know what happens is your order. Your source code will get checking into some other branch and that can be problem, right? So changes. Yes. Do you want to go and check in? Yes. I want to go and check in this. So let's enter some comments if you don't enter a comment. This is all disabled out here. So I will say this is the fresh structure, right? So initial initial court right now you can say a comet and staged it will just go and not actually incompetent at the main branch. Or you can say coming stage and push, you know, So it will actually going push on the server. And if you say comet staged and sink, you know it will not really pushed to the server. But if there are any changes on the main as your reports, he will also get latest that right? So mostly I can just do a commit staged and a push for now, all I can say even think. Let me to a sink right on the that it is. It is unable to sink because the current branch does not track the remote brunch. That's really bad. Ah, So, uh, the current branch that no strike the remote branch, you know that is really, really bad. What is happening out here? Limit Waas Sink out here. Let's let's let me try to check in this gold. Let's see initial court. So that's what I want to check in. Right on sink. So push strike Bush! I'm trying to push the brand She has successfully done right, you know. So Ah, I was not sure why the sink was not working. S o You can see it. There are two sections out here incoming comets and outgoing comets. So when I said committed, committed to my local and then I said, OK, sink it online. So looks to me that it has gone online. Let us go ahead and check. So let me go into a refresh and I feel that my depositories are online. You can see that it has committed the get ignore But for some reason he had still not committed my changes. So I would go and say that Ok, these changes are still not committed. I don't know why So please come it Ah, the initial cold right and I'll say come it all If I just say it will just come it to my local right which I don't want. You can see if I said come it all it just commit locally. But when I say sink, it will actually sink into the server. Right? So I'm gonna go and say, push all these changes to the server. So pushing the current branch writing those 75 objects looks like the changes are checked in so that it is very application Web 123 Is that right? Okay. So good in our court is checked in. Um right. And so if I go and make some changes out here, for example, if I say added some more code, right, you can see as when I should change something out here, this becomes red. I can again go and say, Come it, Andi, I can either come it locally. O r. Eso this our new changes right on. I would say that I want to go and commit against that work item. Remember, we had created one work item one s so I'll just say I want to come it against you know that one You know, saying that this is the fresh comet rate. So you can see now we have planned it. We have the court here and the cold is getting checked. Checked in against the plan. Like so remember our our big picture off develops, you know, we have a plan. We have a cold for that plan on so I can go and I can check in that court for that plan in which I've created so against it develops is all coming into action now again, I will say commit and also sink it. So I don't want to just comic local So everything is done on defy go and see online I should see started Garcia's you know, just now it has been modified. And if I go and see, I can see the changes start happening. Good. So we created a plan for that plan. We are now able to go and commit to changes as well. Now the next step is we want to go and create a bill. So as soon as I go and change something in the court and a check in right, it should automatically go and create a build. So now we have We have created a plan against this plan. We have checked in the court the repositories. Right now it is time to go ahead and create the pipeline. At the end of the day, when you look at the vaults, develops is nothing. But it is series of workflow. It is a pipeline in ovarian forced. The chicken happens, you know? Then the bill happens, you know, than the Goa life happens and so on. Right? So as you're has given a thought saying that, Okay, at the end of the day re visualized it as a pipeline. So I'll say yes, go ahead, create a pipeline. And the first thing the pipeline says, Is that okay? Where is your code? Right, Because everything revolves around the court. Now, at this moment, our code isn't as your reports. Right. So we have actually checked into as your reports. But if your code is into a big bucket or some other sources, like, get up, right, no issues, you know, you can go ahead and configure even those now to create a pipeline. You know, they use a language called us. Why a m l so Yet another markup language. So I want to go and see that Yes, here is a mark of language and also could select this some project. So he says Okay. What What is the language? You know, because depending the language, we have some basic pipeline templates. So I'll say yes, my at this moment, my language my project is all SP darted on. It is basically a sp dot net core, isn't it? So I'll say yes, it is sp dot net core and you can see that's basically the jahmal What we have at this moment on if you close the see the Yamma language the animal languages as follows You don't have to know too much, you know, But let me just try to give you a brief out here. So first is if you want to go and create a variable in the amel you have toe give a main section at the top, for example you can see this is variables. And then he has said, Look, a solution file is Assulin right? And the bill platform is any CPU, right? So you can see that these are all the variable. So to declare a variable you to give the variable name colon on, then the value right on then these variables are used down below. So for example, you know, if you look at dot net core, the first thing for Dr Core is you need to go and get all the although what we call the references, right? So for that, you know it's fighting a task. You can see this world here task. So it's just ask you. Go ahead and fire the nugget command on for the naked commander. Input is at the rates the dollar solution. The solution is nothing. But it is this one. So it will actually go to the SL and file. It will take all the things and it will try to do and get latest right. And then you can see that is of years, Bill. So again, there are variables to it, so you can see there are task and for the task. You know, there are variables and the variables are defined at the top. So when you talk about the enamel fi, you know, it's it's a very simple file. You know where you can go ahead and you can write your code. Now, at this moment, you know, do not try to go too much into jahmal. Whatever it is that at this moment we will just try toe save and run it, you know? So I'm gonna go and say save and run it. Ah, so you can see a Ah. So what is the name of this pipeline? So I'll just say that this is my some project build pipeline. Right on. It says that comic this Well, yeah, mollify at this moment into the same branch out here. So I'm gonna go and commit this so that it is. You know, this is the the animal which is created at this moment. Right on. If I go to my pipelines at this moment, I see this some project OK, on You can see that by default. I have said run. So it has started running it. When the pipeline is running, it actually shows this blue I can out here on. You know, it says that this is running. Once the running is complete, this will actually show it as a green sign. So after some time, you know, this should actually show it as green. So by playing by blind, right? Okay. All right. It's like maybe fresh it sometimes. Ah, right. So that it is. It is still running. And after some time it will show me a green sign so very quickly. So I just woman have regarded manually. I will show also how to go ahead and triggered it automatically. Right. So we went ahead. We use these boards to create the work items. We used the repositories to do the comet on. Now we are create. We have created a pipeline which is actually doing a bill. So let's hope that this becomes green a sap so that it is It is green now. So very nice. That means our pipeline is built. If you go and see if you want, you can go and you can also see in detail. You know how the bill happened. So you can really goto this build and you can see that what exactly happened? You know, for example, let me go back to the biplane just to show you something You can always go and say for example look at the run. So these are the runs here Eso in the runs you can go and you can see how exactly is That's a job, right? So let's see the job so you can see here. It also gives you a very internal snapshot out here. Say they're seeing that. Okay, What happened in the first thing? These all variables were created. The job perimeters were created, then it initialize a job right afterwards, Afterwards it didn't check out. So basically, they used to get commands. The local commands, it did a get than it installed. Now get if it was not installed, then it actually used the nugget command. And it used us. The ch brahch file. Remember, when you say no get should use the C H plus file to do the get latest, it even did that. Then it get visas, Bill and it build the project, you know, in tow, into a directory. So the directory is d a dis moment. If you see down below somewhere, you know there will be a directory where the bill must have happened. So copying files final final directory. So somebody you can see that he has created a web app dot Zip into this folder Caldas de a one e. Okay, whatever site. So you can also go and see. You know, internally, you know how that job has run and all that. It has got stuck and so on. Right. So quite Ah, you know, it's it's quite neat, you know, as far as I saw. But now one of the important things What do you want to do? Is this you triggered manually? You want to go ahead and trigger this automatically so you can see at the right inside the small thing out here s so I can go to this some project. You can see that the right inside this This this dot dot Over here. I can go and I can see in the settings. I can see that. Um sorry. In the shade, U'll runs against a shed. Yule runs. That is the setting. I want to see that This. Okay, so I want to say setting streakers. I'm so sorry, guys. Again, sometimes you forget those menus out there. I hope, as a developer, do you understand the frustration? So what I have to do is I have to actually go and Eddie edit the C amel. So I actually have to go and edit the C Amel out here. And then I have to go and click on the sign out here and said triggers. So if I click on this triggers out here. Over here, it will actually give me that setting saying that. Look, when do you want to trigger the bill? Do you want to trigger the bill manually or you want to go ahead on and trigger the bill automatically? So all right. The jahmal integration from your on, I will say, enable continuous integration. Right. So, in other words, basically, I want to go ahead and share do the building as soon as the court is checked in. Right. So I will go and I will save this. So this is your on da. That's what is what I've done. So basically, now I have made this billed as automatic. Let me check again. How this menu sometimes. No, you have not. I want to see if the change is where is the save? Save? Yeah. So, sissy, if I don't acute, I'll just receive at this moment. Made the bed automatic. Right, But we'll see of this. Okay, so let me look at my pipe alliance. I just want to make sure that if this pipeline is automatic so I would go to the settings and just check So new runs is there, ri 13. Lab 13 - Microservices using Docker and Azure.: Welcome to Lab 13 on in this lab we will focus on micro services using Docker and this whole demonstration we will demonstrate on the OCR environment. Now, Dr implement something called as the micro services architecture style. So before we get into anything, let us first try to understand why has micro services come into existence when developers create applications? Most of the applications are monolith in nature. In other words, they create them as one big unit. For example. Let's say you haven't AARP package, you know, very. And we have accounting. We have invent tree, we have payroll and so on. But when developers will structure this project, you know they will create one single database for everything. They will have one source school, so definitely the source score will have layers like business logic get access. Leah, You earlier and so on, but in a But at the end of the day, logically there one single unit, Um, in other words, you know, when I change in inventory, it will probably go and change accounting projects as well. And when I change in accounting, it would be making changes into invented database and so on. Right now for many projects. You know, this is still a work architecture. This is okay to have right. But when you talk about big projects size with a lot of team members working on it, so some team members would be working on accounting, some team members will be working on inventing. Must be. Some team members will be working on fine tuning off the database and so on. So I you know, when you have big, big team size, you know you want to do probably parallel development, baron. Development means, you know, you will have some developers working on accounting, but do do that. Invented should not get affected because logically, there are different models altogether. Right when somebody's going and fine tuning database of accounting, I don't want that invented table should be updated. But due to this monolith architecture, you know this becomes really a big bottleneck. Second, you know, when you talk about big companies, you have people working on different technologist, and you have some people who are doctor SQL stack, you know, Then you can have people who are Java, Oracle stack or some people can be my school stacked to ensure maximum productivity and proper usage off your development team. You would probably build a single project in multi platform. So must be the accounting is built using PHP. My swell and then the inventor has been using Java Oracle are mostly the payroll system is used music using doctrine and SQL Server stack. Right? So you know, the one of the project of problems with the monolith architecture is that parent development is difficult. Battery deployment is difficult. So, for example, when I changing inventory, I want to just departed in mentally models. But then because it's a monolith architecture, I end up deploying everything. On the last point is multi platform development in bigger companies. You know, you have a mixed bag of developers and sometimes you like the developers do not really change their technology stack very easily. So probably you would like to use that the current technology stack whatever the developers have and create a project. So there are three big issues off monolith architecture, barrel development, barrel deployment and multi platform development. So to address those three issues off, we have the micro services architecture style in micro services, architect to style. What he do is that you structure your project as different physical decoupled entities, so probably you can go and you can create. An accounting project was indoctrinated visual studio. I asked SQL Server on this accounting project will have its own accounting database. It will have its own way of doing things that the developers who work on accounting you know, they want to focus on accounting. And then you can have Inventor E and inventory will have its own again, its own database. It can probably have some other technology, like Java and Apache and probably yes, it can also be in Darknet if you want it right. But again, the invented project we would differently. It will be a different physical decoupled entity. So with this approach now, what will happen is the developers were working on accounting. You know they will want to change the counting models. They will only deployed accounting models because it's a very different physical entity. On developers were working on inventory. They don't have to bother about accounting. So with this now you can have paddle development on. Also, you can deploy them separately, and partly so when I make changing invent tree after one did deploy the inventor models. It will not go and change Accounting models, definitely in a vendor, accounting and inventory have to talk with each other. We can have some kind off rest. Http. Call or must be a so a call or something in between, right? So with the Michael Services architecture, the project structures should be different. Physical decouple entities in terms off the soul, score in terms off the database in terms off everything right, but now said and done this right. One of the biggest problem with micro services architecture is not about creating the project. It is about deploying it. So if you create, let's say, let's say if you have 56 more deals, right? And if you want to go and put all these 56 models in production than how do you go about it , will you go and create? Will you have 56 physical machines? Right, so basically you'll see. Okay, let's depart. Counting your lips is deploying 20 there in the other machine, and then let's deploy. Something's out there, right? So the problem here is not about creating the project. The problem yet is about deploying them into production. So let's discuss the deployment partner. So with projects having what he called multi technology and different physical units, right, let's talk about the first way of deployment. Let's say that you want to go and different deploy them in different physic physical machines. It won't be cost effective, right? We will be built extra for the hardware. We will be paying for the software licenses off the part machine on adding to it the huge deployment afford, you know, very you have toe procure off physical machine than installed operating system on it and then install your application. Right? So definitely different. Different physical machines for different different models is not feasible the other way. What you can think about is you can think about a virtual ideation. So in virtualization, what you can do is so you have an infrastructure on that. You have your operating system and you can use some virtual addition techniques like what we call vm ware or hyper wiser. And in that you can see Okay, Now let me go and create Alina Cho S. O s virtual machine, in which I will go and deploy must be invent tree, which has Java, Apache, Oracle and its own libraries and inventory runs in the Lenox operating system. And then again, by using virtualization, you will go and probably create a different instance of operating system, which is of Windows, Right, Andi, in that you can have accounting, you will employ evil. You will put dot net I as a school server and so on on its own libraries. So one day, probably if you want to use the same hardware, What you can do is you can use virtual ideation techniques and you can create multiple operating system instances and they will boat. They were all talk with each other in, you know, through the two days to do pickles. But again, the problem here is definitely this is time consuming in terms of deployment. Think about that. If you have one more model than you have to again go and create one more virtual machine, you have to do the necessary installation. It is first thing it is time consuming. Second, you know you're you are creating multiple instances off the operating system, which you really don't want. What do you really want? Us? You want multiple instances off the obligations and not really off the operating system. So this is again becoming very heavy on your hardware, right? And that's where we have the container based approach. So in continual based approach, you know, rather than creating different physical operating system instances, you know you can do something like this. You can create containers. So here is your infrastructure, and then you have your host operating system, which can be really nuts or whatever, right? And then he will use some kind of container technology like Docker. Oh, are you know, whatever technology you wish so by using doctor now where you can do is you can create a container which has one little libraries related to Java, Apache Oracle and the leader's name species or the workspaces. I will see the relax kernels, you know, which can just run your job application, and then you can go in again, go and create one more doctor image, right, or a container image, which is Windows one. And when you can have dot net IIs and SQL Server. So by using this container based technology like Docker, what it does is, you know, rather than create a completely, rather than creating a complete replica of the s. What it does is it makes use off the colonel name spaces to provide an isolated workspace. Carl s container. So rather than replicating the whole Oh, yes, you know what it does, is it actually, you know, uses the colonel always and tries to share the carnal always so that this becomes quite effective. Right? So what we will do in this whole video is now we will go and we will demonstrate the following We will go and we will create an application using NBC five on board one application using dot net core that is NBC core on. We will deploy both this application inside doctor in Windows operating system on. We will create two instances. So one instance is running your old embassy fire application dotnet framework, the other applicant, other instances running dot net core. The new one embassy called. So let us go ahead and do this demo so you can see where on the screen I have created something called as the Doctor demo. And in this solution, doctor demo, I have created two projects. One is sp dot net core and other one is a speed Artnet, NBC. Five. Engaging If you're new to sp dot net core are to NBC. I would suggest to go. I would suggest you to watch my tutorials, which has which covers, you know, learn NBC core and learn NBC five as well. But you know just quickly SP Dr Korn is a cross platform implementation wearing, you know, it can run on Lenox. It can run on Windows and other operating system while NGC 500 runs on Windows. So this embassy five is built by the old doctrine frame. But when you say old doctrine framework means dot net four point x 4.74 point 7.1 or 4.5 you know. So this is the old doctrine, Remember, while this SP Dark Net core is actually using the dot net cool 3.0, which is crossed like form. But the point here is that I want to go ahead and how one machine and in that one machine I want to create to Dr Instances that I can say to containers one vigilance sp dot net core and other one veterans, NBC five. So the first thing is, you know, in order to deploy I both of these projects you have to create something called us there. Dr. Fight. This doctor file has the necessary in majors off the necessary things in a which is needed by our obligation to run. So what I'm gonna do here is I would go and create. So let me add a new fire. And let's name it as Dr Fight, right? Without any extension, it should be Just be doctor. If I So I'm gonna say new item. Um, well, well, you know, this We just have to see Dr. Fight Windows does not allow you to create one. So I'm gonna go hand, use a note pad, and I would go and create a doctor if I must be. Can I go? And first ad other way. What I can do is I can go and I can add, uh, next fight. All right, let me add a next fight. And I would rename this as Dr Fight. Right. So you can see her. I've created a doctor fight, right? But the doubting extension, you know, you should not put here dark text or dark, dark or anything. It is just doctor fight right um on if you go And if you see it in the file Explorer, you will You will see this docker file like this and without any extension. So in this doctor Dr File, you will actually go and put whatever you need. You know, to run NBC five in the same way. I'm gonna go and put the docker file inside sp dot net Core as well, right? And in this and I will have the necessary things, you know, which are needed to run a ST dot net called. So lets for start with NBC five. Right? And let's try to understand the syntax and what is written in Dr Fights Against Year in the Doctor file. I have put two lines of syntax. Is the 1st 1 says, you know, from Microsoft is speed Microsoft slash a spin it. So what happens by using the from syntax out here is it actually goes ahead and gets the image off Microsoft ESPN it is. Microsoft has been It is a ready made image which is put just put out there on dumb, you know, onto the docker site on it actually goes ahead and gets this image and installs it inside your docker containers, right? So you can see it. He's not installing the whole whole Windows opening system. And then what we can do is we can go ahead. And for NBC five you can publish our deal and from the what he called the published folder . So, for example, now let me go like this, like missive build on. Let me publish a speed Artnet Embassy five. So I'm gonna go and say Publish it on the folders from the bin slash release. Ah, folder. So you can see I'm tryingto publish it right that it is published. So basically, now this. You know, this publishing has happened into this folder out here so you can see a That's the folder where it is published in a publish Been, you know, over here. Right? So basically, what this doctor filing saying from the been slash release, that means from the been slash release from the bin slash release slash publish from the bin slash really sex publish, take up all the deals and put it on my net double little route. If you want, you can go ahead and create on ESPN dot net. Watch your directory as well. And copy on that. Right. So, again, you know, for that you need to You need to go and hunt for sin taxes, which can create the virtual directory. Right. So you can think about this, Doctor files is where all the action happened. So you give this doctor fight and, doctor, just create some container by using by by looking at the doctor files. Also, one more important file needs to be created, which is the ignore if I because, um, you know, it's possible that, you know, he will try to copy other folders as well. For example, in the published folders. Um, I probably don't want him to copy any kind of been our, uh how do you see O B J folders if they have that. Right. So, uh, so, in case, you know, in case in the published folder, if there are, for example, in the published folder, you can see that this is a bin folder. But there are some folders, you know, which I don't want him to copy. I don't want him to copy this LBJ folder out here. Right, So I can go and I can create a doctor Ignore filing so you can see a dot doc. Ignore If I so I'm gonna go and create a dot dog. Ignore if I allow again the problem when those opening system does not take any kind, off dot Find name directly. Right. So I would go and copy this doctor file green in this too dark doc. Ignore. Right, So you can see a dot doc ignored. Look at the look at the what we call the finally naming convention. I also have no south here in every time. Copy pasting. So you can see this is dot, dot ignore. And in this dot dot ignore file, I only have the files which will not participate, um, into, you know, while publishing. Okay, so that we need to files. At least one is a dr file in overtime, which has all the necessary ingredients. You know, toe run your application, and then we have the dot dog ignore file. It says that you know which of the find seems to be ignored. Right? So you can see that this is the SP Darknet, NBC five, which I have here in the same way. Let us look into a sp dot net core. So first thing for a spit out net core, I need the dot dot ignore file. So I want him to ignore that and we need to go and put here the doctor fight content states . Now the A S P. Dr. Korn is a different kind of a beast over that. You know, we have a lot of command line cli commands of dark net core in which we can use toe publish to do a lot of things. Right. So let's look at the how they're dot docker file looks off MBC course. So I'm gonna go and copy piece this some lines of syntax out here and I will try to explain you ward this in taxes all about so you can see that I've copied some 15 16 lines off, cored on. Let's try to understand it. So the first thing which you need to understand when you are looking at the dark net core docker file is you need to understand that there are some CLI commands in Darknet court which can comply, which can run your complete project so you can see it. I'm gonna go to the command here and I will go to the project. So this is where the project is, So I can go and I can say Darknet Restore. What does Dr to store command does is it actually goes ahead and brings all the dependencies. So you can see this doctor to start command is going to the ch crotch file and bringing all the necessary dependent dependencies off dot net cord by using nugget, right? If you want to go ahead and do ah, publish, you can say darknet publish. This will actually go and publish the complete project with a complete full build and release into the publish folder. Right? And then you can say dot net running Oto, run your application. So doctor has, you know, lots of commands. The new dotnet court has a lot of commands, you know, to run, to publish, to restore, to compile and so on. Right? So if you see in this docker file out here, some of the commands like run darknet to store this is a doctor Command run darknet Publish . This is a darknet published comment, right? So whenever you see a runs in tax, you know, in a docker file, it means that he's trying to run something from the command line. Right? So first thing you know, in order to go and run this SP .net court, you know what we can do is like for M v c five. What ideas? Actually, I you know, I said that I will publish it, you know, on my development machine and over that it's just a copping part, right? But you're in m v sick or you can go one step ahead. You can say that. Okay? Not only publishing, not really body call copying. I can also go and build it inside. The doctor remains right so you can see this first section out here is the build part, or I can see these 1st 2 sections out here is the build part and the next part next section section out here is the copying part off the compiled folder. So first thing from SP darknet Ah, from Microsoft dot net core is decayed, the is decays for build, right? So you can see that first thing I'm saying that Go ahead and get 3.1 as a build environment . Remember that this woman, my sp darknet code is running on 3.0, but trip on one is still fine. So I have just taken a bit off higher version out here. So this sdk is to build while the SP doctor 3.1 is to run the application. Remember dot Net core has two setups. You No one is to do the development and the other one is if you want to go to production, you need the runtime, so you can see here in the from syntax, I'm getting two things. One is to build right on. The other set up is to under and time. So this one is to build so first thing. Now, if you see at this moment, this SP darknet code is my current directory, right? So I will say that. Okay, Force, go ahead and get this image from online on the second. What I'm saying goto sp dot net core folder. So that means, uh, into this folder out here. Right? So this is like saying change directory toe SB dot net called right. So you can think about this in tax. The this index out years is change directory or make your current directory make your current directory as is be not that cool when I say your current directory as sp dot net core Ah, well, let's make our current directory as Docker demo Accurate Should be doctor demo. You can look at it to get here. This is SP dot net core. So your current directory should actually be the solution fighting. Okay, so it's actually it has to be, you know, the solution file. So I'm gonna go and say Dr Demo, So very, very the solution filing guys. So I'm gonna go and say here my working directory is Dr Demo. So wherever is your solution fight, right? The next thing is, I'm saying that copy the ch crotch file and the assailant file. Right? So copy this docs project file on the SL and file into the current directory. So you copy the ch profile from this directory? That means from a Speedo net cord. Yes, Be not net core. So go inside the sp dot net core. So you are in Dr Demo, You go inside the sp dot net core and you copy this solution file. So we have the solution file that gets copied toe the current directory which is doctor Demo, Right? And then you copy it out here and you run .net restore. Right. You run doctor to stuff. Okay, Um, once we run Darknet restore, you know, Then go ahead and copy the other things as well. So basically, you want to go and copy, uh, everything else as well, right? Uh, into your current directory. Right. So there's just a coping part, guys, you know, you can if you want you Can I get this in Texas? But I just kept them now, in case Ah, lot of times people have a different director for Bill, right? So copy everything else. Because you also need the other things. For example, that bin folder and you know the source code, right? And then run .net publish. Once you conducted, published, what it does is it actually goes ahead and creates ah published folder. And it copies everything out there. Right? And then now you can see here. Okay, So from now, the next step is once you have done the But he called the Nuggets. So this is actually going in. This is getting all dependencies right, And this is actually publishing and building the project building release. And then after that you need to get the runtime. Because without the runtime, you won't be able to run your NBC core project. Right? So I'm saying that, you know, make your current working directory as ah sp dot net core Dr Demo. Right And copy. Because you have changed my directory, right? Ah, sorry. I mean, Dr demo slash this on then because SPD headquarters inside Dr Demo, please understand. And then from SP Darknet published out folder this out folder is normally the output folder . Take this deal and copy it. You know, to the built environment on the entry point is SP darknet core deal. That's the entry point to start your project so you can see a You know this. You know this company doctor file inner defines how the bill will take place, How the publisher takes place and how things will run. Remember that the doctor, if I like this woman which I've created I've created As for my understanding, like for example, some of the developers will say no like I'm not going to go and do the build on the production environment, so must be in that case this complete all the about steps. Actually, all go off and wonder what remains is the last one, right? So you can always go ahead and, you know, customize this as you wanted. For example, if you remember our NBC, if I was a very small file because even even the built environment, the built environment, I actually excluded it. Right? But in cas