<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by DivyanshiSingh on Medium]]></title>
        <description><![CDATA[Stories by DivyanshiSingh on Medium]]></description>
        <link>https://medium.com/@divyanshipilot?source=rss-993d3ddac892------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UHxu8BhZbEgNS0cJ</url>
            <title>Stories by DivyanshiSingh on Medium</title>
            <link>https://medium.com/@divyanshipilot?source=rss-993d3ddac892------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 20:52:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@divyanshipilot/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[STRUCTURE OF THE SYSTEMS]]></title>
            <link>https://divyanshipilot.medium.com/structure-of-the-systems-8c771a8d2825?source=rss-993d3ddac892------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c771a8d2825</guid>
            <category><![CDATA[system-architecture]]></category>
            <category><![CDATA[load-balancer]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[dns]]></category>
            <dc:creator><![CDATA[DivyanshiSingh]]></dc:creator>
            <pubDate>Tue, 22 Jun 2021 13:17:37 GMT</pubDate>
            <atom:updated>2021-06-22T13:17:37.444Z</atom:updated>
            <content:encoded><![CDATA[<p>“Wannabe smart or enjoy the tricks played by smart people?<br>It’s always better to play magic than to see magic.”<br> <em>-Divyanshi Singh</em></p><p>Let’s dig deep into the facts about how the magical things are functioning behind the application that we use. We are always surrounded by enormous systems and applications in our day-to-day life. Let’s ponder more over the architecture of the systems and how the complexities are being resolved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zFzOjyDOZgGyylXf" /></figure><p><strong>Basic components of the system-</strong><br>1- Client: We are denoted as clients. All the mobile apps, desktop apps, browsers like Chrome, Mozilla Firefox, Safari, etc come under the one shell i.e client. It’s basically the customer of the service.</p><p>2- DNS: Whenever we request to search anything eg- if we search for any website URL then our request is first entertained by DNS(Domain Name Server). It contains the mapping of Domain names with their respective IP address. So, when the request arrives at DNS it checks the corresponding IP address and returns that address as a response.</p><p>3- Load Balancer: When we get an IP address from DNS, then it interacts with Load Balancer. That IP address is basically the IP address of the Load Balancer of that particular system. It can also be understood as a gateway between the client and the internal system.</p><p>4- Application Servers: Here our request is passed from Load Balancer and certain functions according to the requests are performed. It is the place where calculation of required resources is done and according to the needs, further requests are sent.</p><p>5- Storage Layer: It is the place where all the data is stored. It can be denoted as a database management layer. Certain queries are answered here and the response is sent back to application servers. They give a response to the load balancer and finally the response is sent back to the client.</p><p><strong>Efficient implementation of DNS-<br></strong>DNS response should be quick with low latency.<br>Latency can be defined as the time taken to get a response after you have made a request.</p><p>Latency ∝ 1/physical distance</p><p>For decreasing the latency we implement the spread-across concept. We keep a local DNS which keeps the mapping of IP addresses that are relevant to that particular area only and if some other request is made whose IP address is not available on our local DNS then local DNS make a request to the hierarchical above DNS for the same IP address.</p><p>ISP (Internet Service Provider) will manage local DNS.</p><p>Some chunk of data has to move from secondary storage to primary storage to process it. This movement of data becomes slower, and cheaper as we move far away from the processor.</p><p>For this reason in DNS key-value mapping of domain names with their respective IP addresses should be present in the primary storage.</p><p><strong>Concept of Scaling Systems-</strong></p><p>Earlier we used to confine our whole system needs to a single machine. Like Delicious, back in the 2000s used to provide backend services of bookmarks. The storage was limited to the storage of one machine like 120GB, which was responsible for storing data like user profiles, their bookmarks, search history, etc. <br>Then within a couple of days that 120GB became exhausted when the requests coming on the servers grew and thus making one single machine incapable of performing its task. Here comes the concept of scaling.</p><p><strong>Vertical Scaling-</strong></p><p>It’s like buying a bigger box of greater storage capacity. If our 120GB gets exhausted and we buy a hard disk of 1TB, this is called Vertical Scaling.</p><p><strong>Benefits:</strong><br>1- It is easier to implement as we just have to replace our old storage with new storage.</p><p>2- It consumes less power as there is only one storage box.</p><p>3- It is reliable for small businesses or start-ups.</p><p><strong>Drawbacks:</strong></p><p>1- There are some mechanical limitations on how big a machine can be built because they are made with physical things and all of them dissipate energy.</p><p>2- Very costly as storage will be exhausted rapidly.</p><p>3- Demand is variable. Sometimes demand might decrease then the big box will be a waste for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/0*P7XgCMOJibr-LmfP" /></figure><p><strong>Horizontal Scaling-</strong></p><p>Horizontal scaling is distributed computing involving distributed storage. When we add multiple storage devices having relatively the same storage capacity in such a manner that they function as a single logical unit then it is called Horizontal Scaling.</p><p><strong>Benefits-</strong></p><p>1- There is no wastage of resources and it is cheaper.</p><p>2- We can manipulate the box/storage capacity i.e if extra storage is not needed, we can switch off the extra boxes.</p><p>3- Efficient to handle the extra load and thus making it suitable for big and complex businesses.</p><p><strong>Drawbacks-</strong></p><p>1- Difficult to maintain and code to implement as a lot of communication has to be established between all the boxes.</p><p>2- Going to involve a lot of network calls. If there are multiple boxes then they need to interact with each other and this can happen only with a network.</p><p>3- Network calls increase latency.</p><p>4- There are chances of crashing when network calls fail but developers have come across to resolve crashing problems with the help of the CAP theorem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Dl0Na1LY1d06Yfm1" /></figure><p>We would never like that our client should know whether our system is running on distributed computing i.e our system is horizontal scalable or vertical scalable. So, here comes Load Balancer that acts as a gateway between the client and our internal servers.</p><p><strong>What happens when Load Balancer Crashes?<br></strong>Even if all the boxes are running well, all the network calls are getting their responses back and each communication between them is working fine then also if Load Balancer crashes the client will not get its response back.<br>Load Balancers are basically responsible for routing and thus we keep its action very fast by minimizing its responsibility.<br>Even if any Load Balancer goes down, we keep another Load Balancer waiting to take its place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FJ0vr5elIaWp-rQj" /></figure><p><strong>Types of Load Balancer-<br>Hardware Load Balancer: </strong>These load balancers are very less intelligent. They are only responsible for transferring the requests coming to it to app servers. They do not perform routing and also don’t have any RAM. They are very less customizable.<br><strong>Software Load Balancer:</strong> These load balancers are smart which have a good amount of local RAM. They just don’t transfer the requests coming on it, instead also perform routing. Routing here is defined as the responsibility of transferring the request to the available server. They also have great computing power so that latency can be decreased.</p><p><em>This was just the beginning of system design concepts. Stay with me for upcoming blogs.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c771a8d2825" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In-built Splash Screen in Flutter]]></title>
            <link>https://divyanshipilot.medium.com/in-built-splash-screen-in-flutter-51c0ef95ba96?source=rss-993d3ddac892------2</link>
            <guid isPermaLink="false">https://medium.com/p/51c0ef95ba96</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[splash-screen]]></category>
            <category><![CDATA[splash]]></category>
            <dc:creator><![CDATA[DivyanshiSingh]]></dc:creator>
            <pubDate>Tue, 15 Sep 2020 15:58:04 GMT</pubDate>
            <atom:updated>2020-09-15T15:58:04.016Z</atom:updated>
            <content:encoded><![CDATA[<p><em>“ Your today’s Curiosity will conquer your tomorrow’s doubts,</em></p><p><em>And your today’s exploration will propel your tomorrow’s victory.”</em></p><p><em>-Divyanshi Singh</em></p><p><strong>Let’s Explore!</strong></p><p>Splash Screen — The Introductory Screen of any mobile application should be very alluring. That’s the first and last impression of the app. Let’s catch the user’s attention by learning how to use the built in feature of flutter to make a splash screen.</p><p>Generally we design and code splash screens like the way we used to make other screens of flutter applications like login screen, home screen etc. This is a way too long process and also sometimes it’s really hard to code complex designs. Since Splash Screen is a catchy iconic screen then generally developers try to keep it complex and beautiful and coding the same design into Dart sometimes becomes difficult and time taking. Also routing to the next screen from Splash screen is not automatically done. We need to set a certain time interval or some button over it, pressing on it we can redirect to the next screen.</p><p>All these challenges can be resolved by making use of a built in splash screen. Let’s quickly find out the way of using this feature.</p><p>We might have often seen that when we open a flutter project, in an emulator or connected phone device a white screen appears for a few seconds then your hierarchical screens appear like the below screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*jx4WjEP61qdscYs0" /></figure><p>This is by default the splash screen provided with every flutter project installation. We can manipulate it to keep our desired splash screen.</p><p>We can either insert an already existing image or can create our own image on any picture creating software like Figma, Photoshop etc and then can insert it.</p><p>Suppose I have created an image on Figma named “splash.png” and now wanna insert it at the right place, in the right file in the flutter project folder.</p><p><strong>On Android:</strong></p><p>1- Find the “android” folder in your flutter project.</p><p>2- Browse to the app -&gt; src -&gt; main -&gt; res folder and place all of the variants of your branding image in the corresponding folders.</p><p>For example:</p><ul><li>the image with density 1 needs to be placed in mipmap-mdpi,</li><li>the image with density 1.5 needs to be placed in mipmap-hdpi,</li><li>the image with density 2 needs to be placed in mipmap-xdpi,</li><li>the image with density 3 needs to be placed in mipmap-xxdpi,</li><li>the image with density 4 needs to be placed in mipmap-xxxdpi,</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/0*aLdJtl_YZhRfZWMq" /></figure><p>3- Lastly, uncomment some of the XML code in the drawable/ launch_background.xml file. Go to app-&gt; src -&gt; main -&gt; res -&gt; drawable -&gt; launch_background.xml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*fQTxoHrFN3gFjiwX" /></figure><p>After the changes, put the name of the image under “android:src” and specify the gravity under “android:gravity”, whether the images should be specified as fill or center etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/0*op-SJvxVGywvRN2_" /></figure><p>Now hot reload your project and enjoy the glimpse of your Splash Screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/0*oPUX-DgRJ70XxsAt" /></figure><p><strong>On iOS:</strong></p><p>1- Find the “ios” folder in your flutter project.</p><p>2- Go to Runner -&gt; Assets.xcassets -&gt; LaunchImage.imageset. There should be LaunchImage.png, LaunchImage@2x.png, etc. Now replace these images with your image variants. For example:</p><ul><li>the image with density 1 needs to override LaunchImage.png</li><li>the image with density 2 needs to override LaunchImage@2x.png</li><li>the image with density 3 needs to override LaunchImage@3x.png</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*dQqzIuW6sVLbCuTm" /></figure><p>We can also launch an image with density 4. For that we need to create a file LaunchImage@4x.png containing our splash screen image of 4 density in the same folder LaunchImage.imageset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*Nah0EqEuI_kJdw0d" /></figure><p>After this we need to make the following changes in Contents.json. We can find this file in the same directory i.e ios -&gt; Runner -&gt; Assets.xcassets -&gt; LaunchImage.imageset -&gt; Contests.json.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/0*ul4GRG1GImgTBVLp" /></figure><p>Lastly, hot reload your flutter project and look, it’s done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/0*Vi8kbtvXIVJbOIBH" /></figure><p>Thank you</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51c0ef95ba96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to connect Flutter application to Firebase?]]></title>
            <link>https://divyanshipilot.medium.com/how-to-connect-flutter-application-to-firebase-be81785a4851?source=rss-993d3ddac892------2</link>
            <guid isPermaLink="false">https://medium.com/p/be81785a4851</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[native-app-development]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[flutter-for-beginner]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[DivyanshiSingh]]></dc:creator>
            <pubDate>Tue, 18 Aug 2020 18:04:31 GMT</pubDate>
            <atom:updated>2020-08-18T18:04:31.314Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“ Technology is a giant graph in which we have to find the shortest path</blockquote><blockquote>from our little knowledge to the pinnacle of the tech.” -Divyanshi Singh</blockquote><p><strong>Let’s make it simple!</strong></p><p>Today we are going to play with the mystifying problem of how to connect our flutter application with firebase — Backend-as-a-Service (BaaS).</p><p><strong>Get Started</strong></p><p>Initial step is to open Firebase and register yourself on it by creating your account on firebase.</p><p>Then get started!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YE5skxt2ap51r5qm" /></figure><p>Now it’s time to add your application by selecting <strong>Add project</strong> in firebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*APasVwQKkeDsIT8M" /></figure><p><strong>Project Creation in 3 steps</strong></p><p><strong>Step 1</strong></p><p>Add the name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/0*r_uEf2W1AX1Je78w" /></figure><p><strong>Step 2</strong></p><p>Make sure that you enable Google Analytics for your project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/0*tnRcaRaY8rpbN_CN" /></figure><p><strong>Step 3</strong></p><p>Select the account for handling your project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/0*K9MBJ_mdWNoTKy__" /></figure><p>Look, your project is ready!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/0*0SJygmY4aUe3IhpL" /></figure><p><strong>Let’s pace faster by adding firebase to our flutter app</strong></p><p>Choose the environment in which we are creating our app like ios, android or web app.</p><p>Here I am taking an eg of android.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/0*7wq5o3OpNKFKhPuY" /></figure><p><strong>Following are 4 steps to integrate your app with firebase-</strong></p><p><strong>Step 1</strong></p><p>A form type will appear in which firstly we have to mention the package name. Package name will appear in our flutter project folder:</p><p><strong>android -&gt; app -&gt; src -&gt; profile -&gt; </strong><em>AndroidManifest.xml</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/0*r9JeHR-wLEBDv3oi" /></figure><p>We need to copy this package name eg <strong>com.example.gossip</strong> and paste it in the form.</p><p>After that give a nickname to your application. Then comes SHA-1. This is a debugging signing certificate which is required if we want to integrate Google Sign-in in our authentication methods. That’s why it’s optional.</p><p>To enable it we have to write SHA-1. Hover over the question mark icon and click on <strong>see this page</strong>. This will redirect you to the page describing how to generate SHA-1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/0*QnpjEwRbQquxIL9e" /></figure><p>Following command will be displayed for Mac/Linux on the page which we will have to copy and paste on the terminal. Windows users choose the command under the windows section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/0*TQfjt_1d0HyQ287u" /></figure><p>On the terminal it will ask for the keystore password when you hit enter. The default password is <strong>android</strong>.</p><p>Now on the terminal SHA1 and SHA256 will appear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*w8Yx0hAOLebSO2pk" /></figure><p>Copy and paste SHA1 in the form and register your app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/0*nZyAzbecI-G90tdP" /></figure><p><strong>Step 2</strong></p><p>At this stage we need to download google-services.json file by clicking on the button displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*127aYuPM24p-CO6U" /></figure><p>Once the file is downloaded then we need to place this file in our flutter project folder at the following described location:</p><p><strong>Android -&gt; app -&gt; google-services.json</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/0*qcfc0fizEh-QPcHp" /></figure><p><strong>Step 3</strong></p><p>Now we need to add Firebase SDK. After hitting next we will come to the following page in which firstly we will copy the <strong>classpath</strong> under dependencies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*wAaeBpYKjKAR_1Hf" /></figure><p>We will paste this under dependencies in the build.gradle file found under: <strong>android -&gt; build.gradle </strong>file in the following way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/0*tA6iw4r8XiwoCURj" /></figure><p>After this we will copy both the <strong>apply plugin</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/0*G6cqNYvWNCx1_XSl" /></figure><p>And will paste them in app level build.gradle file found under-</p><p><strong>android -&gt; app -&gt; build.gradle </strong>file in the following way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/357/0*cDORXyFnzvb3JL2L" /></figure><p><strong>Step 4</strong></p><p>Run your app to verify installation. After hitting next it will automatically check whether the app has communicated with the firebase server or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/0*2bTodIrurMl-iLPj" /></figure><p>Woww!! it’s been done.</p><p><strong>What have we learnt?</strong></p><p>By this we are at the conclusion. We successfully integrated the communication between our flutter application and firebase and came across various hurdles and successfully accomplished all of them like:</p><p>Integrating Google-Sign In with SHA-1, downloading and placing Google-services.json file at right position, adding dependencies and applying plugins.</p><p>Hope you got an initial start on integrating your flutter application with firebase.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be81785a4851" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>