<?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 Aarushi Dhruv on Medium]]></title>
        <description><![CDATA[Stories by Aarushi Dhruv on Medium]]></description>
        <link>https://medium.com/@aarushidhruv?source=rss-1a0b0c0d45d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*c33toq1pskm3pE0gVgsg6Q.jpeg</url>
            <title>Stories by Aarushi Dhruv on Medium</title>
            <link>https://medium.com/@aarushidhruv?source=rss-1a0b0c0d45d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:24:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aarushidhruv/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[Backend Basics — Part 1]]></title>
            <link>https://medium.com/@aarushidhruv/backend-basics-part-1-2b6b3eec0d6e?source=rss-1a0b0c0d45d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b6b3eec0d6e</guid>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[route]]></category>
            <dc:creator><![CDATA[Aarushi Dhruv]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 05:35:03 GMT</pubDate>
            <atom:updated>2025-06-29T05:35:03.534Z</atom:updated>
            <content:encoded><![CDATA[<h3>Backend Basics — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*CAKP6AWkEn9j576_.jpg" /><figcaption>A Server is just a PC with a job</figcaption></figure><p>Starting my backend journey, I had a lot of questions like — <em>Why is it called a server?</em>, <em>Why do we need a connection pool?</em>, <em>What even is a DB driver?</em></p><p>This post is about breaking down these terms and concepts in simple words, the way I understood them and not just about definitions but also about the <strong>‘why’ behind each keyword</strong> — questions that popped into my mind when I started learning backend.</p><h3>🤔 Why Is It Called a Server?</h3><p>Because it <strong>serves</strong>.<br> It serves some kind of data, accepts data, or serves our request. A server is always there waiting for a request and responds accordingly.</p><h3>Client-Server Model</h3><p>There is always a <strong>client</strong> and a <strong>server.</strong></p><ul><li><strong>Client</strong> is the browser or application that initiates the communication by sending a request to the server. It is responsible for providing all the necessary info.</li></ul><p>→ For example, when you open Spotify, the app (client) sends a request like ‘fetch my playlists’ or ‘play this song’.</p><ul><li><strong>Server</strong> holds resources like websites, APIs, data, and waits for the request. It responds with web pages, JSON, error messages, or files.</li></ul><p>→ For example, the list of your playlists, the song file, an error message if something’s wrong, or any required data.</p><p>For this interaction, a connection needs to be established — done using <strong>TCP Protocol</strong>, which is reliable. HTTP runs on top of TCP for the communication between client and server.</p><h3>🌐 HTTP — The Medium of Communication</h3><p>Think of HTTP like a delivery guy that carries messages between your browser (or app) and the server. Whenever you click something like <em>“View Profile”</em> — your browser sends a request using HTTP.</p><p>HTTP is <strong>stateless</strong>, meaning the server doesn’t remember anything about your previous request. It’s like every message is from a stranger — you have to reintroduce yourself every time. That’s why your requests carry stuff like tokens or cookies to tell the server, <em>“Hey, it’s me again.”</em></p><p>Each HTTP request carries all the necessary information (like headers, URL, method, token, etc). Once the server responds, it forgets about the request.</p><h3>✅ Benefits of Stateless HTTP:</h3><ul><li><strong>Simplicity:</strong> The server stays simple. It doesn’t have to remember anyone.</li><li><strong>Scalability:</strong> It can easily handle lots of requests from different people without getting overwhelmed since it doesn’t store any session.</li></ul><p>But when we do need to maintain state (like login), developers use techniques like <strong>sessions, cookies, or tokens.</strong></p><h3>HTTP Methods — What You Want to Do with Data</h3><p>HTTP methods define <strong>what action</strong> the client wants the server to perform on a resource.</p><h3>🔥 Common HTTP Methods:</h3><ul><li><strong>GET</strong> → <strong>Retrieve data</strong> (Read-only)</li><li><strong>POST</strong> → <strong>Create new data</strong> (Add new resource)</li><li><strong>PUT</strong> → <strong>Update/replace existing data completely</strong></li><li><strong>PATCH</strong> → <strong>Partially update existing data</strong></li><li><strong>DELETE</strong> → <strong>Delete data</strong> (Remove resource)</li></ul><h3>Idempotent vs Non-Idempotent Methods</h3><h3>Idempotent:</h3><p>→ <strong>Performing the same request multiple times results in the same outcome and does not change the state of the server beyond the initial request.</strong></p><ul><li><strong>GET:</strong> Fetching user data doesn’t change anything — purely read-only.</li><li><strong>PUT:</strong> Updating a user’s name to “Aarushi” — doing it 10 times keeps it as “Aarushi.” The state doesn’t change after the first update.</li><li><strong>DELETE:</strong> Deleting user with ID 5 — the first delete removes it. Further delete requests have no effect because the user is already gone. No further change in the server state.</li></ul><p>That’s what makes them <strong>idempotent</strong> — <em>the result and the server’s state remain the same no matter how many times the request is made after the first successful one.</em></p><h3>Non-Idempotent:</h3><p>→ <strong>Every request changes the server’s state.</strong></p><ul><li><strong>POST:</strong> Creating a new user. Doing it twice creates <strong>two</strong> users. Each request leads to a new change on the server.</li></ul><h3>💡 In Short:</h3><ul><li><strong>HTTP Methods</strong> define <strong>“what” you want to do.</strong></li><li><strong>Routing</strong> defines <strong>“where” (which resource)</strong> you want to do it.<br> → Both together define the complete request.</li></ul><h3>🎯 Routing Basics</h3><ul><li><strong>Static Routes:</strong> These routes don’t change. They have no variables — the path is fixed.<br> → Example: GET /user/age → Always returns the same data, like the average age of all users.</li><li><strong>Dynamic Routes:</strong> These routes have variable parts — placeholders that change based on what data you want.<br> → Example: GET /student/age/:id → Here, :id is a placeholder. If you ask for /student/age/101, the server knows you’re asking for the age of the student with ID 101.</li><li><strong>Query Parameters:</strong> Since GET requests don’t have a body, when we want to send extra info, we use query params. Common in <strong>pagination</strong> or <strong>filtering</strong>.</li></ul><p>→ <strong>Why Dynamic Params?</strong><br> To get <strong>specific data</strong>. For example, if you want to fetch the age of student with ID 123, the route becomes /student/age/123. The server now knows exactly whose data you are asking for.</p><p>Here, :id is called a <strong>route parameter</strong> — it’s part of the URL path and used to identify a particular resource.</p><h3>🪜 Nested Routes:</h3><p>Nested routes indicate that one resource is related to another, like posts belonging to a user (here)</p><p>Example:<br> GET /api/users/123/posts/567</p><ul><li>/users/123 → Get user with ID 123</li><li>/posts/567 → Get post 567 belonging to that user</li></ul><h3>🚀 Wrapping Up</h3><p>This post was my attempt to share backend concepts the way I understand them — simple, straightforward and real. If this helped, drop a comment, or if there’s anything confusing, let’s chat!</p><p><em>In the next post, I’ll dive into the difference between PUT and PATCH — something that always confused me initially along with DB connection pools, ORMs and much more. Stay Tuned!</em></p><h3>💌 Follow me for more posts as I dive deeper into the world of backend — from servers to databases, scaling, and beyond.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b6b3eec0d6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>