<?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: Swapnil Shelke</title>
    <description>The latest articles on DEV Community by Swapnil Shelke (@swapnilshelke).</description>
    <link>https://dev.to/swapnilshelke</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%2F947865%2F1113b12f-07f6-41ed-90e5-f72e6b52a240.jpg</url>
      <title>DEV Community: Swapnil Shelke</title>
      <link>https://dev.to/swapnilshelke</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swapnilshelke"/>
    <language>en</language>
    <item>
      <title>this keyword in JavaScript !!!</title>
      <dc:creator>Swapnil Shelke</dc:creator>
      <pubDate>Mon, 26 Feb 2024 12:47:51 +0000</pubDate>
      <link>https://dev.to/swapnilshelke/this-keyword-in-javascript--2e4i</link>
      <guid>https://dev.to/swapnilshelke/this-keyword-in-javascript--2e4i</guid>
      <description>&lt;p&gt;&lt;strong&gt;this&lt;/strong&gt; keyword in JavaScript !!!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is &lt;code&gt;this&lt;/code&gt; in JS:&lt;/strong&gt;&lt;br&gt;
Value of this keyword represents &lt;strong&gt;globalObject&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Global Object vary in different-different runtime environments.&lt;br&gt;
In case of Browser Global Object is Window. In case Node.js Global Object is global.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;strict and non-strict mode:&lt;/strong&gt;&lt;br&gt;
this shows different behaviour in strict and non -strict mode.&lt;br&gt;
In non-strict mode, if we try to access this keyword inside function, it will return undefined.&lt;br&gt;
If we use strict-mode, we will get GlobalObject.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;this with function:&lt;/strong&gt;&lt;br&gt;
How we call function also changes nature of this keyword.&lt;br&gt;
If we simply call function with strict-mode it returns undefined.&lt;br&gt;
If we call function with Global Object it returns us Window, which is global object in case of bowsers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;this with Objects:&lt;/strong&gt;&lt;br&gt;
If we use this keyword inside object, its reference to the object.&lt;br&gt;
We can access properties and methods of object using this keyword.&lt;/p&gt;

&lt;p&gt;[[ posting it unfinished, cant complete this in one stretch... 🥲 ]]&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CDN's: What are they and how they work and why do we need them?</title>
      <dc:creator>Swapnil Shelke</dc:creator>
      <pubDate>Mon, 26 Feb 2024 12:44:30 +0000</pubDate>
      <link>https://dev.to/swapnilshelke/cdns-what-are-they-and-how-they-work-and-why-do-we-need-them-3a9c</link>
      <guid>https://dev.to/swapnilshelke/cdns-what-are-they-and-how-they-work-and-why-do-we-need-them-3a9c</guid>
      <description>&lt;p&gt;CDN stands for &lt;strong&gt;Content Delivery Network&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;This thing is used, when we create objects in &lt;strong&gt;object store&lt;/strong&gt;, that files will obviously exists somewhere in world. So when we upload files to AWS or any cloud provider that file exists somewhere in world. Somewhere in any server for ex: server in USA.&lt;/p&gt;

&lt;p&gt;Now suppose, suddenly lot of people wants to access this file, from all over the world. &lt;/p&gt;

&lt;p&gt;Now how this will work is, all requests from all this people, from all over the world, will go to that single server in USA through very long wires and bunch of router hopes. The request will reach to the server and responses will be send back. This is very big file, for ex, 1 GB.&lt;/p&gt;

&lt;p&gt;Wouldn't it be nice, if lot of people asking this file from India, what if this request goes to server which is somewhere present in India first, and everyone in India and then from this server, users who asked for file gets their response.&lt;/p&gt;

&lt;p&gt;That is what CDN's let us do. It's name itself tells that its job is to deliver content.&lt;/p&gt;

&lt;p&gt;CDN says, there are many object stores in world, let that be the source of your truth, but as people ask for any particular file, don't distribute it directly from S3 URL, use my CDN URL and just tell me what's the source is. &lt;/p&gt;

&lt;p&gt;So whenever we create CDN we just have to tell it what is the source, where that file is actually stored. So whenever anyone asks for a file to CDN it goes to source, later CDN cached that file on to the server present in India. So whenever anyone wants that file from India, it gets deliver to them easily. Now every request will not go to server in USA, because we have cached it, somewhere on server present in India.&lt;/p&gt;

&lt;p&gt;Request from users in India goes to server present in somewhere [closest] present in India, which then asks source of truth, the place / server where it is originally stored, gets it back to server in India, and then caches it. So now that file not only present in server in USA but also in India. And now whoever wants it, they get it from server in India.&lt;/p&gt;

&lt;p&gt;Objects / files / data is not cached for infinity, they are cached for certain period of time and after that time is over, the cache gets clear.&lt;/p&gt;

&lt;p&gt;The main thing here to understand is how CDN's actually works. Content Delivery Networks make it very easy to deliver content. The thing that is so hard and expensive, if some file present only at one place in the world, and people / users from all continents starts to ask for it, CDN's creates what we called servers but they are technically are called as POP's. POP's stands for Point of Presence. &lt;/p&gt;

&lt;p&gt;Object stores, store or files at one place, CDN's have servers all over the world, which are technically called as POP's. &lt;br&gt;
This is very useful in case of very heavy applications, who not just store bunch of data, this are serving actual real world assets. Like mp4, jpeg files. &lt;/p&gt;

&lt;p&gt;So we not just need object store, we also need CDN's. Object stores are use for storage and CDN's are use for Distribution. And we have to pay for both of services if we are using AWS. And usually distribution cost is higher.&lt;/p&gt;

&lt;h1&gt;
  
  
  cdn
&lt;/h1&gt;

</description>
    </item>
  </channel>
</rss>
