<?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 Anushaupadya on Medium]]></title>
        <description><![CDATA[Stories by Anushaupadya on Medium]]></description>
        <link>https://medium.com/@anushaupadya2001?source=rss-6ae3eb707e64------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*-bepr8_YoKb8JUFG</url>
            <title>Stories by Anushaupadya on Medium</title>
            <link>https://medium.com/@anushaupadya2001?source=rss-6ae3eb707e64------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:49:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anushaupadya2001/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[Do Snapchat Messages Really Disappear? The Tech Behind the Magic]]></title>
            <link>https://medium.com/@anushaupadya2001/do-snapchat-messages-really-disappear-the-tech-behind-the-magic-424c1cc1c788?source=rss-6ae3eb707e64------2</link>
            <guid isPermaLink="false">https://medium.com/p/424c1cc1c788</guid>
            <category><![CDATA[disappearing-message]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[hld]]></category>
            <category><![CDATA[snapchat]]></category>
            <dc:creator><![CDATA[Anushaupadya]]></dc:creator>
            <pubDate>Sun, 17 Aug 2025 17:41:30 GMT</pubDate>
            <atom:updated>2025-08-17T17:41:30.825Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*fu7lpYY44VImR-YuwDQI2A.png" /></figure><p>Snapchat feels different from WhatsApp or Instagram. You take a photo, send it, your friend opens it… and <em>poof…</em>it’s gone.</p><p>This disappearing act makes Snapchat fun and private. But many people wonder: <em>Does Snapchat really delete your data? Or is it secretly stored somewhere?</em></p><h3>What “Disappearing” Really Means</h3><p>When Snapchat says your snaps disappear, it means:</p><ul><li>Once your friend opens the snap, it’s deleted from Snapchat’s servers.</li><li>If your friend never opens it, Snapchat automatically deletes it after 24 hours.</li></ul><p>So yes — the promise is real. Snaps don’t live forever.</p><p>But here’s the catch: for a snap to actually travel from you to your friend, Snapchat has to <strong>store it temporarily</strong>.</p><h3>The Journey of a Snap</h3><ol><li><strong>Capture</strong></li></ol><ul><li>You take a photo and add a fun filter.</li><li>Your phone sends it to Snapchat’s servers.</li></ul><p><strong>2. Temporary Storage</strong></p><ul><li>The photo is saved in something called <strong>cloud storage</strong> (think of it like a giant locker on the internet).</li><li>Snapchat also saves small details (<strong>metadata</strong>) like: who sent it, who should receive it, when it should expire.</li></ul><p>This is stored in a <strong>database with a timer</strong> (in tech terms, TTL = time-to-live).</p><p><strong>3. Delivery</strong></p><ul><li>Snapchat alerts your friend instantly using a <strong>real-time connection</strong> (called WebSocket — basically a hotline between your phone and Snapchat).</li><li>Your friend’s phone then <strong>downloads the snap using normal internet (HTTPS)</strong>.</li></ul><p><strong>4. Disappearing Act</strong></p><ul><li>Once your friend views the snap, Snapchat deletes both the photo and the metadata.</li><li>If they don’t open it, the timer automatically erases it after 24 hours.</li></ul><h3>What Snapchat Doesn’t Keep</h3><ul><li><strong>No permanent snaps</strong>: Unlike Facebook or Instagram, snaps don’t sit on a server forever.</li><li><strong>No chat history</strong>: Text messages disappear by default unless you save them manually.</li><li><strong>Only exceptions</strong>:</li><li>If you post to <em>Stories</em> (visible for 24 hours).</li><li>Or save to <em>Memories</em> (Snapchat’s personal cloud).</li></ul><h3>But Wait… What About Privacy?</h3><p>While snaps disappear, Snapchat does keep some things briefly:</p><ul><li><strong>Logs</strong> (who sent what to whom, and when) → for security and abuse detection.</li><li><strong>Unopened snaps</strong> → must be stored until your friend comes online.</li><li><strong>Saved content</strong> (Stories, Memories) → stays until you delete it.</li><li><strong>Law enforcement</strong> → unopened snaps could be accessed with a valid request.</li></ul><p>So the short answer: Snapchat really does delete your photos, but like any platform, it keeps the minimum data it needs to actually work.</p><h3>6. The Big Picture</h3><p>Snapchat’s disappearing messages aren’t just fun — they’re also smart <strong>system design</strong>:</p><ul><li>Temporary storage keeps costs low.</li><li>Real-time alerts make it feel instant.</li><li>Auto-deletion builds trust with users who want privacy.</li></ul><blockquote><em>The truth: Snaps don’t last forever. They live </em>just long enough<em> to reach your friend , and then they’re gone.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=424c1cc1c788" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When to Choose WebSockets Over REST APIs: Lessons From WhatsApp]]></title>
            <link>https://medium.com/@anushaupadya2001/when-to-choose-websockets-over-rest-apis-lessons-from-whatsapp-352f7d195367?source=rss-6ae3eb707e64------2</link>
            <guid isPermaLink="false">https://medium.com/p/352f7d195367</guid>
            <category><![CDATA[websocket]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[client-server-achitecture]]></category>
            <category><![CDATA[whatsapp]]></category>
            <dc:creator><![CDATA[Anushaupadya]]></dc:creator>
            <pubDate>Sat, 16 Aug 2025 19:04:28 GMT</pubDate>
            <atom:updated>2025-08-16T19:04:28.610Z</atom:updated>
            <content:encoded><![CDATA[<p>Real-time communication is everywhere today — whether you’re sending a message on WhatsApp, trading stocks, or collaborating on Google Docs. But building systems that feel “instant” to the user often requires going beyond traditional REST APIs.</p><p>In this article, let’s explore <strong>when WebSockets make more sense than REST APIs</strong>, the <strong>limitations of short polling and long polling</strong>, and how apps like WhatsApp achieve near-instant messaging.</p><p><strong>REST APIs: Great for Request–Response, Not Real-Time</strong></p><p>REST APIs follow a <strong>request–response model</strong>:</p><ul><li>The client sends a request to the server.</li><li>The server processes and replies with data.</li></ul><p>This is great for <strong>stateless operations</strong> like fetching user profiles, placing an order, or retrieving static content. But the limitation is clear:<br> 👉 REST APIs can’t “push” data to the client unless the client explicitly asks for it.</p><p>Imagine WhatsApp relying solely on REST: your phone would have to constantly ask <em>“Any new messages? Any new messages?”</em> This would be inefficient, battery-draining, and laggy.</p><p><strong>Short Polling: The First Attempt at “Real-Time”</strong></p><p><strong>Short polling</strong> means the client repeatedly sends requests at short intervals (e.g., every 2 seconds):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*rFnrQb-v6ZDrcHt4uZRsOg.png" /><figcaption>Short Polling</figcaption></figure><h3>📉 Shortcomings:</h3><ul><li>Wastes resources (lots of unnecessary requests).</li><li>Increases server load.</li><li>Not truly real-time (you only get updates on the next poll).</li><li>Bad for battery/performance on mobile.</li></ul><p>This is why WhatsApp <strong>doesn’t</strong> use short polling.</p><p><strong>Long Polling: A Smarter Hack</strong></p><p>In <strong>long polling</strong>, the client sends a request and the server keeps it open until there’s new data (or a timeout).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*zixp5EYQnOaITQVEwH31gA.png" /><figcaption>Long Polling</figcaption></figure><h3>✅ Improvements:</h3><ul><li>Reduces unnecessary requests compared to short polling.</li><li>Feels closer to real-time.</li></ul><h3>📉 Shortcomings:</h3><ul><li>Still involves repeated connections (once the server responds, the client must re-request).</li><li>Adds latency if a new connection must be re-established.</li><li>Doesn’t scale well for <strong>massive real-time systems</strong> like WhatsApp.</li></ul><p><strong>WebSockets: True Real-Time Communication</strong></p><p><strong>WebSockets</strong> establish a persistent, full-duplex connection between client and server:</p><ul><li>Once connected, both client and server can send messages at any time.</li><li>No repeated connection setup overhead.</li><li>Perfect for scenarios requiring <strong>instant updates</strong>.</li></ul><p>This is how <strong>WhatsApp, Slack, and most chat/messaging apps</strong> achieve fast communication.</p><h3>Why WebSockets Shine:</h3><ul><li><strong>Real-time messaging</strong>: Messages appear instantly.</li><li><strong>Low overhead</strong>: No repeated HTTP handshakes.</li><li><strong>Scalable</strong>: Servers can handle many concurrent connections efficiently.</li><li><strong>Bi-directional</strong>: Server can push updates without waiting for the client.</li></ul><p>Here’s a simplified view of how WhatsApp uses WebSockets:</p><ol><li><strong>Connection</strong>: When you open WhatsApp, your app establishes a WebSocket connection to WhatsApp’s servers.</li><li><strong>Send Message</strong>: You type “Hi” and hit send. The message travels instantly over the WebSocket connection.</li><li><strong>Delivery &amp; Push</strong>: WhatsApp’s server pushes that message to the recipient’s device (if online).</li><li><strong>Acknowledgements</strong>:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*poKqn6SD83bOAfhIRSN52A.png" /></figure><ul><li>One tick ✅ = message sent to server.</li><li>Two ticks ✅✅ = message delivered to recipient’s device.</li><li>Blue ticks 💙 = message read.</li></ul><p>All these acknowledgments are real-time because of the persistent WebSocket connection.</p><p><strong>When to Choose WebSockets Over REST</strong></p><p>Use <strong>REST APIs</strong> when:</p><ul><li>You’re dealing with <strong>CRUD operations</strong> (Create, Read, Update, Delete).</li><li>Data updates are <strong>not time-sensitive</strong> (e.g., updating profile info).</li><li>Simplicity and statelessness are priorities.</li></ul><p>Use <strong>WebSockets</strong> when:</p><ul><li>You need <strong>real-time communication</strong> (chat, gaming, trading apps).</li><li>The server should push updates proactively.</li><li>Low-latency is critical.</li></ul><h3>Final Thoughts</h3><p>WebSockets don’t replace REST APIs — they <strong>complement</strong> them. A modern app like WhatsApp uses both:</p><ul><li>REST APIs for login, user data, media uploads.</li><li>WebSockets for real-time messaging.</li></ul><p>So, the question isn’t <strong>WebSockets <em>vs.</em> REST</strong>, but rather <strong>when to use each</strong>. If your app needs instant updates like WhatsApp, WebSockets are the way to go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=352f7d195367" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How YouTube Streams Videos: Chunks, Codecs, and the Magic Behind the Scenes]]></title>
            <link>https://medium.com/@anushaupadya2001/how-youtube-streams-videos-chunks-codecs-and-the-magic-behind-the-scenes-2229a1bd1931?source=rss-6ae3eb707e64------2</link>
            <guid isPermaLink="false">https://medium.com/p/2229a1bd1931</guid>
            <dc:creator><![CDATA[Anushaupadya]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 20:54:06 GMT</pubDate>
            <atom:updated>2025-08-15T21:09:50.267Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_DopWLBO6v7HfkBUkZv3tA.png" /><figcaption>How YouTube adjusts video quality based on your internet speed.</figcaption></figure><p>Have you ever wondered how YouTube (and other streaming platforms) play videos so quickly without making you wait for the whole file to download?<br>The secret lies in <em>streaming technology</em>, where videos are broken into <strong>tiny chunks</strong>, encoded efficiently, and played back seamlessly — like magic.</p><p>In this article, we’ll explore <strong>how streaming works under the hood</strong>, from <strong>codecs</strong> to <strong>manifest files. </strong>So the next time you watch a video, you’ll know exactly what’s happening behind the scenes.</p><p><strong>The Basics of Video Streaming</strong></p><p>Unlike downloading, where you get the entire file before playing it, <strong>streaming</strong> sends the video to you in <strong>small chunks</strong> so playback can start almost immediately.</p><ul><li>The video is split into <strong>segments</strong> (e.g., 2–10 seconds each).</li><li>Your browser downloads these segments <strong>just in time</strong>.</li><li>If your internet slows, the player can request <strong>lower quality chunks</strong> to prevent buffering.</li></ul><p><strong>What Are Chunks?</strong></p><p>Think of chunks as <strong>tiny pieces of the full video</strong>.</p><ul><li>Instead of downloading video.mp4 in one go, you might download video_001.ts, video_002.ts, etc.</li><li>Each chunk contains a few seconds of audio or video.</li><li>The player stitches them together so you see it as a continuous stream.</li></ul><p>This is why you can <strong>switch quality mid-video</strong> without restarting — you’re just swapping in different chunk versions.</p><p><strong>Audio &amp; Video Are Separate</strong></p><p>A fun fact: <strong>audio and video are often stored separately</strong> in streaming.</p><ul><li>Audio chunks: audio_001.m4a, audio_002.m4a</li><li>Video chunks: video_001.mp4, video_002.mp4<br> Your browser plays them together in sync.</li></ul><p>This makes it possible to:</p><ul><li>Keep the same audio but switch video quality</li><li>Save bandwidth (no need to re-download the same audio when only video changes)</li></ul><p><strong>What’s a Codec?</strong></p><p>A <strong>codec</strong> is short for <strong>coder-decoder</strong>.<br> It’s the technology that compresses and decompresses video or audio files.</p><ul><li><strong>Video codecs</strong>: H.264, VP9, AV1</li><li><strong>Audio codecs</strong>: AAC, Opus</li></ul><p>Without codecs, videos would take up <em>huge</em> amounts of space and be impossible to stream smoothly.</p><p><strong>What Does “144p” Mean?</strong></p><p>You’ve probably seen quality options like <strong>144p, 240p, 360p, 720p, 1080p</strong>.</p><ul><li>The <strong>number</strong> refers to the <strong>vertical resolution</strong> — how many pixels tall the video is.</li><li>The <strong>p</strong> stands for <strong>progressive scan</strong> (all lines drawn in sequence) rather than interlaced video.</li></ul><p>There’s no “145p” because video standards use predefined resolution steps that balance file size, compatibility, and viewing needs.</p><p><strong>The Role of the Manifest File</strong></p><p>When you start a YouTube video, your browser doesn’t just grab chunks randomly — it reads a <strong>manifest file</strong>.</p><ul><li>This file lists <strong>all available chunk URLs</strong></li><li>It tells the player <strong>which quality levels exist</strong></li><li>It’s often in .m3u8 (HLS) or .mpd (DASH) format</li></ul><p>Example (simplified .m3u8):</p><pre>#EXTM3U<br>#EXT-X-STREAM-INF:RESOLUTION=640x360<br>360p/index.m3u8<br>#EXT-X-STREAM-INF:RESOLUTION=1920x1080<br>1080p/index.m3u8</pre><p>The manifest is like a <strong>menu</strong> and your player chooses what to order based on your internet speed.</p><p><strong>How to See This in Your Browser</strong></p><p>Want to see streaming in action?</p><ol><li>Open <strong>Chrome DevTools</strong> → Network tab</li><li>Play a YouTube video</li><li>Filter by <strong>m3u8</strong> or <strong>mpd</strong> → that’s the manifest</li><li>Look for .ts, .m4a, .mp4 chunks → those are your segments</li></ol><p>It’s like peeking into the kitchen of a streaming service.</p><h3>Final Thoughts</h3><p>Streaming video isn’t just about “playing a file” — it’s a carefully designed system of <strong>chunks, codecs, manifests, and adaptive bitrate streaming</strong> that makes it possible to watch smoothly anywhere, on any device.</p><p>So next time your video instantly plays in perfect quality, you’ll know the tech magic making it happen.</p><p>Let me know if you’d like to learn more about how YouTube processes your uploaded video into multiple resolutions (144p, 480p, 1080p) and plays it seamlessly at the optimal quality based on your network speed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2229a1bd1931" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>