<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Govind Goel</title>
    <description>The latest articles on DEV Community by Govind Goel (@govindgoel).</description>
    <link>https://dev.to/govindgoel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F470573%2F0509fa6e-7dfc-4bab-8b1c-9f1a6edd3f9e.png</url>
      <title>DEV Community: Govind Goel</title>
      <link>https://dev.to/govindgoel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/govindgoel"/>
    <language>en</language>
    <item>
      <title>Software Engineering the Sustainable Way!</title>
      <dc:creator>Govind Goel</dc:creator>
      <pubDate>Mon, 21 Dec 2020 06:58:50 +0000</pubDate>
      <link>https://dev.to/govindgoel/software-engineering-the-sustainable-way-18p</link>
      <guid>https://dev.to/govindgoel/software-engineering-the-sustainable-way-18p</guid>
      <description>&lt;h2&gt;
  
  
  Why Sustainable?
&lt;/h2&gt;

&lt;p&gt;As studies show industries are responsible for more than 30% of global CO2 emissions, so there is a need for sustainability wherever possible.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is the past year's analysis of one minute of social applications we use on daily basis.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kdjqlXlG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/yfa3whsln8sh41s8wmiz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kdjqlXlG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/yfa3whsln8sh41s8wmiz.jpeg" alt="Alt Text" width="603" height="390"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Everyone thinks that there is actually code that runs these applications, that is true but to run that code we need dedicated servers, like your PC on which you explore all the stuff.&lt;br&gt;
But, we never gave a thought regarding that the amount of time we spent on the internet actually started contributing to pollution.&lt;/p&gt;

&lt;h2&gt;
  
  
  HOW
&lt;/h2&gt;

&lt;p&gt;That's a question to ponder upon&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is the basic overview of an application deployed on the cloud.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lqgeFENB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/026l2i7x0nk2ln7vbyyl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lqgeFENB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/026l2i7x0nk2ln7vbyyl.png" alt="Alt Text" width="440" height="300"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An application needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storage&lt;/li&gt;
&lt;li&gt;Database&lt;/li&gt;
&lt;li&gt;Compute&lt;/li&gt;
&lt;li&gt;Network&lt;/li&gt;
&lt;li&gt;Infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A server is needed that can fulfill all the requirements, a server emits heat and the ambient temperature for a server room is b/w 20-21 Celsius otherwise there is a chance that they can fail.&lt;br&gt;
So to keep the temperature different kinds of cooling technologies are used which leads to carbon emissions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Datacenter contributing to global emissions&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Study shows a datacenter produces nearly 150 million metric tons of carbon emissions per year. Equal to the annual output and pollution of 50 coal-fired power plants.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iBslLKdN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/0cd8d6lvtg1zrekncgxx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iBslLKdN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/0cd8d6lvtg1zrekncgxx.png" alt="Alt Text" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It has been reported that the global carbon footprint of the ICT industry accounts for more than 2% of global carbon emissions&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So more the application usage, more is the server usage hence more emissions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So that is why there is a need for sustainable software engineering to develop sustainable software applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Consideration while building applications
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Applications that are carbon efficient.&lt;/li&gt;
&lt;li&gt;Applications that are energy efficient.&lt;/li&gt;
&lt;li&gt;Applications that can run on older hardware.&lt;/li&gt;
&lt;li&gt;Reduce the amount of data and distance it must travel across the network.&lt;/li&gt;
&lt;li&gt;Run servers at a high rate of utilization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How To Apply
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Architecture Approach:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Going Serverless&lt;/li&gt;
&lt;li&gt;N-Tier Architecture&lt;/li&gt;
&lt;li&gt;Event-driven architecture&lt;/li&gt;
&lt;li&gt;Using Microservices &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;For example Azure serverless architectures such as Azure Functions&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure Approach:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Virtualized Servers&lt;/li&gt;
&lt;li&gt;IAAS&lt;/li&gt;
&lt;li&gt;PAAS&lt;/li&gt;
&lt;li&gt;Green Data Center&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure.com uses Serverless Functions, which reduced the always-on electric footprint.&lt;/li&gt;
&lt;li&gt;AWS gearing up for renewable energy sources for its centers.&lt;/li&gt;
&lt;li&gt;GCP Using AI to define actions based on the usage, emissions calculations which can minimize further emissions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Image Credits: Google Photos&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Deploy static websites on Azure App Services</title>
      <dc:creator>Govind Goel</dc:creator>
      <pubDate>Thu, 17 Sep 2020 07:58:02 +0000</pubDate>
      <link>https://dev.to/govindgoel/deploy-static-websites-on-azure-app-services-4cn2</link>
      <guid>https://dev.to/govindgoel/deploy-static-websites-on-azure-app-services-4cn2</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c2mSTdLI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/s3uq7gunltb4fahkchy5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c2mSTdLI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/s3uq7gunltb4fahkchy5.jpeg" alt="Alt Text" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  So let's start
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
First of all open &lt;a href="https://portal.azure.com"&gt;Azure Portal&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
Open Azure CLI in the portal, or you can also login in your local terminal.
&lt;/li&gt;
&lt;li&gt;
Create a resource group:
&lt;pre&gt;az group create --name myResourceGroup --location "West Europe"&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Create an App Service Plan:
&lt;pre&gt;
az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --sku FREE&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Create Web App:
&lt;pre&gt;
#Bash
az webapp create --resource-group myResourceGroup --plan myAppServicePlan --name  --runtime "PHP|7.4" --deployment-local-git
#PowerShell
az --% webapp create --resource-group myResourceGroup --plan myAppServicePlan --name  --runtime "PHP|7.4" --deployment-local-git
&lt;/pre&gt;
You should see something below as the output:
&lt;pre&gt;
Local git is configured with url of 'https://@.scm.azurewebsites.net/.git'
{
  "availabilityState": "Normal",
  "clientAffinityEnabled": true,
  "clientCertEnabled": false,
  "cloningInfo": null,
  "containerSize": 0,
  "dailyMemoryTimeQuota": 0,
  "defaultHostName": ".azurewebsites.net",
  "enabled": true,
  &amp;lt; JSON data removed for brevity. &amp;gt;
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;li&gt;

Now navigate to 

&lt;pre&gt;http://your-app-name.azurewebsites.net&lt;/pre&gt; 

&lt;p&gt;And you should see page like below&lt;br&gt;
&lt;/p&gt;


&lt;/li&gt;
&lt;br&gt;&lt;br&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IqeICdXI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/0j4j7kfynvap59z1iidh.png" alt="Alt Text" width="800" height="428"&gt;

&lt;ul&gt;
Now navigate to your project directory in your local
&lt;li&gt;
Create a new file named &lt;pre&gt;index.php&lt;/pre&gt; in your project root and write the following line in the file:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
 include_once("index.html"); 
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;li&gt;
Next, create a composer.json file in the root directory and write the following in it: &lt;pre&gt;{}&lt;/pre&gt; 
&lt;/li&gt;
&lt;li&gt;
First, lets use git to initialize or create a version of the site we want to deploy:
&lt;pre&gt;git init&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Then, we will add all the files to the git repository.
&lt;pre&gt;git add .&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Commit the changes
&lt;pre&gt;
git commit -m "Initial Commit"
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Add the remote of Azure Repo:
&lt;pre&gt;git remote add azure your-deploymentLocalGitUrl-from-create-step&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;git push azure master&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Navigate here and your website is live 🎉🎉
&lt;pre&gt;http://your-app-name.azurewebsites.net&lt;/pre&gt;
&lt;/li&gt;


</description>
      <category>azure</category>
      <category>html</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
