<?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 Dhruvi on Medium]]></title>
        <description><![CDATA[Stories by Dhruvi on Medium]]></description>
        <link>https://medium.com/@dhruvi6071?source=rss-aa23ba7bfd2e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*JQyZgC-PcdbVILfe</url>
            <title>Stories by Dhruvi on Medium</title>
            <link>https://medium.com/@dhruvi6071?source=rss-aa23ba7bfd2e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 06:05:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dhruvi6071/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[WebRTC:Part-1: P2P-How do devices talk to each other without anyone in the middle]]></title>
            <link>https://medium.com/@dhruvi6071/webrtc-part-1-p2p-how-do-devices-talk-to-each-other-without-anyone-in-the-middle-b53f38db098e?source=rss-aa23ba7bfd2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b53f38db098e</guid>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[webrtc]]></category>
            <category><![CDATA[webrtc-technology]]></category>
            <dc:creator><![CDATA[Dhruvi]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 19:09:09 GMT</pubDate>
            <atom:updated>2026-11-22T19:09:09.253Z</atom:updated>
            <content:encoded><![CDATA[<p>So let’s continue our story..!!</p><p>You have called your MOM after dinner at the hostel, and you’re connected to her from miles away. We already know that both devices need to discover each other and exchange connection information before they can communicate.</p><p>And now you can hear each other’s voices and see each other’s faces in real time.</p><p>But how exactly does this communication happen?</p><p>This is where <strong>P2P (Peer-to-Peer) Connection</strong> comes into the picture.</p><p>Let’s dig a little deeper into this P2P connection.</p><p>As we know from our basic knowledge of networking, there is something called <strong>Client-Server Architecture</strong>. In this architecture, a client sends requests to a server, and the server responds to those requests...</p><p>So here client is both your and your mom’s device but server is…. is it something far away? hidden somewhere in some random room or sitting inside any data center? Nope… Here <strong>both devices act as clients as well as servers.</strong></p><p>That’s the interesting part!</p><p>Instead of sending media data through a central server, both devices communicate directly with each other. Each device can send and receive data from the other.So, your voice goes directly to your Mom’s device, and her voice comes directly to yours.No central media server is required to carry the call! This also means that there is no need for a central server to handle and store all the media data. It can reduce server maintenance and bandwidth costs. But wait… does that mean there is absolutely no server involved?</p><p>Not exactly!</p><p>WebRTC may still use a signaling server(will be covered in further parts) to help both devices exchange the information needed to establish their connection. It can also use STUN or TURN(will be covered in further parts) servers when direct connectivity is difficult. But once a direct connection is established, the media can travel directly between the two devices.</p><blockquote>Now let’s understand another important thing. <br><strong>How is data actually transferred?</strong></blockquote><p>Every connection needs a protocol to transfer data. Two commonly discussed transport protocols are <strong>TCP and UDP</strong>. For real-time communication like voice and video calls, speed matters a lot. Even a small delay can make the conversation feel unnatural. Imagine you’re talking to Mom and your voice reaches her after 5 seconds. By then, she might have already asked you five more questions!</p><p>That’s why WebRTC generally prefers <strong>UDP (User Datagram Protocol)</strong> for real-time media transmission. UDP prioritizes speed rather than guaranteeing that every packet reaches its destination. On the other hand, TCP (Transmission Control Protocol) focuses on reliable and ordered delivery of data. For example, when sharing a file, missing even a small part of it can make the file unusable. So reliable delivery becomes important.</p><p>WebRTC data channels can also support reliable communication, depending on how they are configured. If you don’t know about TCP and UDP yet, you can check out to my other article(will upload soon) understand them better.</p><p>Remember our previous question that left us stunned?</p><p>If your device is connected only to Mom’s device, how will Dad’s voice reach both of you? How can three devices communicate with each other? The answer is <strong>MESH NETWORKING</strong>.</p><p>In a mesh network, every device connects directly with every other device. So, when Dad joins the call, he establishes connections with both you and Mom. Now all three devices can send and receive media directly. Have a look at the given image to understand how these connections look.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*uXg8HRZ3M7um-9iji7hQvw.png" /></figure><p>Easy, right?</p><p>So far, we have seen some advantages of P2P:</p><ul><li><strong>Less server dependency:</strong> Media can travel directly between devices without requiring a central media server.</li><li><strong>Reduced infrastructure cost:</strong> Since a central server doesn’t have to forward every media stream, server bandwidth and maintenance costs can be reduced.</li><li><strong>Direct communication:</strong> Devices exchange data directly, avoiding an additional media-server hop.</li></ul><p>Here are some common applications:</p><ul><li><strong>File Sharing:</strong> One of the popular applications of P2P. For example, BitTorrent splits files into smaller pieces and allows users to download those pieces from multiple peers instead of depending on a single server.</li><li><strong>Blockchain:</strong> Since blockchain uses decentralization, nodes communicate with other nodes in the network and maintain copies of the ledger.</li><li><strong>Video and Voice Calls:</strong> P2P is useful for one-to-one calls and smaller group calls where direct communication is practical.</li></ul><p>Sounds so helpful, right? No central media server, less infrastructure cost and direct communication with your family.<br>Happy ending? Nope…</p><p>Your exams are finally over…<strong>It’s officially your GOA time..!!</strong></p><p>Remember that Goa trip you planned during exam preparation? The plan was to go with 15–20 friends, but only 5 are present in the hostel. Some are at home, and some are day scholars. And now you want to know who is going to cancel the plan first. Because we all know that’s an important part of every trip-planning ritual!</p><p>So, you decide to start a group video call. You connect all 15 friends, and BOOM! 15 screens appear on your screen. Wait… wasn’t this possible with P2P?</p><p>YES, IT IS POSSIBLE. But should we use the same MESH approach for 15 people?</p><p><strong>A BIG NOOOOO……..!!!</strong></p><p>Why? Do you want to see what a mesh network of 15 people looks like? Have a look at this image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*aNZB5VAnppjtWO3Bax2EDg.png" /></figure><p>Scary, isn’t it?</p><p>In a mesh network, every participant needs to establish a connection with every other participant.</p><p>For 15 participants, that means:</p><ul><li>Each device needs 14 connections.</li><li>The entire network has 105 pairwise connections!</li></ul><p>And that’s not even the biggest problem.</p><p>Each device also needs to send its media stream to all the other participants. As the number of participants increases, bandwidth usage and processing requirements increase too. So, although mesh networking works well for smaller groups, it becomes increasingly difficult to manage for larger calls.</p><p>As every coins have 2 sides of it. Just like every other technology, P2P also has its own drawbacks:</p><ul><li><strong>No central media backup:</strong> If a device disconnects, its media stream is no longer available to other participants.</li><li><strong>Security management:</strong> Every peer connection needs to be established and secured properly. P2P itself doesn’t automatically guarantee complete security.</li><li><strong>Performance issues:</strong> Each device has to handle multiple incoming and outgoing streams, which increases its network and processing load.</li><li><strong>Scalability:</strong> As the number of participants increases, the number of connections grows rapidly, making a full mesh less practical for larger groups.</li></ul><p>But wait!</p><p>We still need to connect all 15 friends. Just to find out which 10–12 people cancel the plan and which 3–5 are actually going to Goa! So, you finally open the “<strong><em>GOA CHALE”</em></strong> and start a group call. All 15 friends join.</p><p>But how?</p><p>Didn’t we just discuss why mesh networking becomes difficult with so many participants? Answer is… Forwarding Unit -A server which can handle the traffic.</p><p>A server that takes responsibility for handling media streams between multiple participants instead of making every device connect directly to every other device.</p><p>But wait, is forwarding the only way a server can handle a group call? Or can it also combine everyone’s video into one?</p><p>Sounds interesting?</p><p>In the next part, we’ll explore how servers handle group video calls and the two different approaches used to make this possible.</p><p><strong>Upcoming: Part 2 -How Do Servers Handle Group Video Calls?</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b53f38db098e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WebRTC:Part-0: What Really Happens When You Click “Join Call”?]]></title>
            <link>https://medium.com/@dhruvi6071/what-really-happens-when-you-click-join-call-webrtc-part-0-e8f7c1a55d78?source=rss-aa23ba7bfd2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8f7c1a55d78</guid>
            <category><![CDATA[connection]]></category>
            <category><![CDATA[rtc]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[webrtc]]></category>
            <dc:creator><![CDATA[Dhruvi]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 02:59:01 GMT</pubDate>
            <atom:updated>2026-11-22T14:06:45.917Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s a late hostel night. Dinner is done, and it’s time for the daily ritual: a video call with Mom to give her the update on your day. But have you ever wondered how your voice reaches her, hundreds of miles away, in a fraction of a second? The answer is ….<strong>WebRTC</strong>.</p><p>Hello..!! This is again your last night before exam friend here to explain how this works without making you feel like you’re reading a research paper.</p><p><strong>WebRTC (Web Real-Time Communication)</strong> is a technology built into modern browsers and apps that lets two devices send voice, video and data to each other in real time, with no plugins or extra software.</p><p>Surprisingly, the hardest part isn’t sending the video. It’s <strong>finding the other device and reaching it.</strong></p><p>There are billions of devices in the world, so how does yours know which one is Mom’s? Every device on the internet needs an <strong>address</strong>, and that address is called an <strong>IP address</strong>. When you press call, your device needs Mom’s address before any connection can happen.</p><p>Your device can’t search the whole world by itself, though. It needs a little help to find her device, and we’ll see exactly how in a later part. Once the address is found, the two devices connect, and you can hear Mom’s voice from your hometown.</p><figure><img alt="Image of connection between devices" src="https://cdn-images-1.medium.com/max/852/1*hLDgpUkqVddgVWnDjTeXtQ.png" /></figure><p>Easy, right? Not so fast.</p><p>Now What if Dad wants to join too? If your device is connected only to Mom’s, how does Dad’s voice reach her? How do three devices talk at once? And what if a router or firewall blocks the way?</p><p>This is where it starts to feel like magic. In this series we’ll look at every trick behind this …. magic, in plain language</p><p>For the next chapter we will understand how your father can get connected to the call between your mum and you and how she can hear him too ….. upcoming: Part-1: P2P-Peer To Peer Connection.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8f7c1a55d78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Virtual DOM to Fiber: How React Really Works Behind the Scenes]]></title>
            <link>https://medium.com/@dhruvi6071/from-virtual-dom-to-fiber-how-react-really-works-behind-the-scenes-4f8ee5e6c737?source=rss-aa23ba7bfd2e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f8ee5e6c737</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Dhruvi]]></dc:creator>
            <pubDate>Sat, 27 Dec 2025 19:12:29 GMT</pubDate>
            <atom:updated>2025-12-27T19:12:29.550Z</atom:updated>
            <content:encoded><![CDATA[<p>If you have worked with React for a while then you most probably think about how react works behind the scenes right? Like virtual DOM, diffing, reconciliation…done</p><p>And honestly, that explanation works… until it doesn’t.</p><p>React does some magic for works and all above doesn’t make any sense just become some magical movements.</p><p>Because modern react doesn’t actually work that way internally and exactly then the concept of fiber is introduced. Behind the scenes React uses something called <strong>fiber </strong>and once you understand it, a lot of Reacts “magic” suddenly starts making sense.</p><p>So don’t worry this is not going to be a deep research paper. Think of this as a friend explaining React Fiber to you the last night before the exam.</p><p>Before understanding fiber you must be aware of virtual DOM and reconciliation both are explained in a line as below given.</p><p><strong>Virtual DOM</strong> : it is a light weight and in memory copy of a real browser DOM</p><p><strong>Reconciliation </strong>: It is a process of comparing or diffing virtual DOM with real browser DOM and finding the best possible way to update the actual UI, minimizing direct, slow DOM manipulations.</p><p>Ok, now you remember what both are, i will give you a small example that how it works</p><p>You use a counter app and increase the number from 0 to 1 then reconciliation is done and virtual DOM changes only needed state. Both are compared and change the actual DOM and update UI on screen.</p><p>The question is: If reconciliation already works so well, why did React need Fiber?</p><p>Ok for that Now imagine clicking the “increase” button many times very quickly maybe 50 or 100 times.</p><p>Now with the old reconciliation system react had to process the entire update in one go, work is synchronous and once react start rendering it couldn’t pause.</p><p>This could block the main thread, making the UI feel slow or unresponsive especially in large applications.</p><p><strong>This is where Fiber comes in.. React Fiber was introduced to fix this exact problem.</strong></p><p><strong>Old reconciliation method :</strong></p><p>Reconciler works in stack method. It was a synchronous manner. It can add and remove items but until the stack becomes empty and couldn’t be interrupted.</p><p><strong>What is Fiber ?</strong></p><p>It is just a plain javascript object with some properties.</p><p>Each Fiber represents:</p><ul><li>A component.</li><li>Its state and props.</li><li>And the work that needs to be done for it.</li></ul><p>In short, <em>Fiber is a unit of work.</em></p><p><strong>How does React Fiber work?</strong></p><p>Fiber is also units of work. The process happens in 2 main phases below given.</p><ol><li><strong>Render Phases:<br></strong>- Asynchronous phase.<br>- In this phase, react thinks about what needs to change.<br>- phase is not visible to the user and can be interrupted.<br>- Process each fiber, Decide what should update, Can pause, resume or even discard.<br>- It can also prioritize important updates over less important ones.</li><li><strong>Commit Phase : <br></strong>- Execution Phase.<br>- Synchronous phase <br>- Can not be paused and resumed<br>- DOM changes and UI updates happen.</li></ol><p>Now our main problems are solved. We can pause, resume and discard processes and even prioritize work.</p><p>So React Fiber isn’t magic….it’s just smarter scheduling.</p><p>Once you understand this, features like concurrent rendering and Suspense stop feeling mysterious and start feeling practical.</p><p>If this made sense, great and if you want to go deeper, I’ll be covering React Fiber internals in detail in the next article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f8ee5e6c737" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>