<?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 Abhiteja Mandava on Medium]]></title>
        <description><![CDATA[Stories by Abhiteja Mandava on Medium]]></description>
        <link>https://medium.com/@abhiteja.mandava98?source=rss-d9baab26bb02------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*94fZu9zq938JZgxdE0FOqw@2x.jpeg</url>
            <title>Stories by Abhiteja Mandava on Medium</title>
            <link>https://medium.com/@abhiteja.mandava98?source=rss-d9baab26bb02------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 14:36:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhiteja.mandava98/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[System Design in Space and Time (A Vuja De Perspective)]]></title>
            <link>https://medium.com/@abhiteja.mandava98/system-design-in-space-and-time-a-vuja-de-perspective-ad0196064928?source=rss-d9baab26bb02------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad0196064928</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <dc:creator><![CDATA[Abhiteja Mandava]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 18:06:14 GMT</pubDate>
            <atom:updated>2026-01-05T22:12:36.903Z</atom:updated>
            <content:encoded><![CDATA[<p>Two Questions That Explain Most System Design Decisions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Nwj5CsjnSbiGUJ4IObi2g.png" /><figcaption>AI Generated Image</figcaption></figure><h3>1. The Thesis: The Archetypal Questions</h3><p>Most journeys into system design begin by entering a dense forest of terminology. We talk about Idempotency, Sharding, Strong Consistency, Caching, and Load Balancers. These are not just words; they are intellectual “hyperlinks.” You click on one concept to understand it, only to find three more bolded terms branching off it.</p><p>Before you realize it, you are lost in a vast, multi-dimensional graph of abstractions.</p><h4>The Law of Parsimony (Occam’s Razor)</h4><blockquote>In philosophy, <a href="https://en.wikipedia.org/wiki/Occam%27s_razor"><strong>Occam’s Razor</strong></a> suggests that the simplest explanation — the one with the fewest assumptions — is usually the correct one. The medieval logic states: “Pluralitas non est ponenda sine necessitate” — Plurality should not be posited without necessity.</blockquote><p>This principle motivated me to think in a strictly parsimonious way. I sought the <em>irreducible set of minimal questions </em>— the most economical unit of inquiry — required to anchor an architectural decision at any given moment. Beneath the jargon and the abstractions, I discovered that only two questions truly dictate the decision making in architecting a system:</p><ol><li><strong>Space:</strong> <em>“What does the user perceive now?”</em> &gt; (The screen is a finite coordinate system. To answer this is to decide how to partition the user’s attention. We must ask: What is the minimum truth that needs to occupy the space to drive the user’s next action?)</li><li><strong>Time:</strong> <em>“When do they perceive it?”</em> &gt; (If Space is where the truth lives, Time is how long that truth remains valid. We must ask: At what point does the information occupying/tend to occupy that space lose its value?)</li></ol><h3>2. The Framework in Action</h3><p>Now that we have established the philosophy, let’s see how it functions as a practical tool by solving few real-world scenarios.</p><p>To achieve what the user needs to perceive and when they need to perceive it, we construct a chain of thought (a valid one — possible to achieve in principle) towards our goal and then look for a suitable jargon that matches the abstraction.</p><h4>System: Uber</h4><p><strong>API 1</strong>: The Safety Watch Handler</p><p><strong>The Scenario:</strong> A passenger is mid-trip, but the car’s GPS signal begins moving in the opposite direction of the intended destination.</p><ol><li><strong>What should the user perceive?</strong> The user interface must immediately be hijacked. The user no longer needs to see the “Arrival Time” or “Driver Route.” The minimum truth required for their next action is a prominent “Safety Check” prompt — an urgent question asking if they are okay.</li><li><strong>When should the user perceive it?</strong> In this context, information has a near-instantaneous value decay. If the safety prompt arrives three minutes late because of a system backlog, it is no longer a safety feature. For the user, the prompt must appear the moment the deviation is recognized. The “When” is instantaneous.</li></ol><p><strong>Some Design Choices We Can Make:</strong></p><ol><li>The time between the intent detection and user perception should be as minimal as possible (theoretical minimum is ideal). We should design a system that does not wait for data to land on a disk to be queried later. To catch a deviation <em>now</em>, the “vector of truth” must be computed while the data is in flight. This necessity manifests as <em>Stream Processing</em>.</li><li>A standard “Request-Response” model is too passive in this context. The user’s phone cannot wait to ask, “Am I safe yet?” Instead, our system must push the truth to the user’s space the moment the deviation is detected. This necessity forces us into the realm of persistent connections, manifesting as <em>Server-Sent Events (SSE)</em> for one-way alerts, or <em>WebSockets</em> for two-way real-time streams.</li><li>To know the car is deviating, our system needs to remember the “planned route” for every active trip. This requires a <em>Distributed State Store</em> (like Redis) that lives in memory, ensuring the comparison happens in microseconds.</li></ol><p><strong>API 2: </strong>The Ride Booking Handler</p><p><strong>The Scenario:</strong> A user hits the “Book Ride” button. Because their internet is spotty, they get frustrated and mash the button three times in a row.</p><ol><li><strong>What should the user perceive?</strong> The minimum truth user expects to see is a <em>single</em> booking confirmation. Also, their account and their bank balance must only reflect one transaction.</li><li><strong>When should the user perceive it?</strong> The user needs an <em>immediate</em> acknowledgement to stop their anxiety, but the system must ensure the validity of that action permanently. The truth of “I have a ride” must not be duplicated by the noise of a bad network connection.</li></ol><p><strong>Some Design Choices We Can Make:</strong></p><ol><li>To ensure the user perceives only one confirmation, we must distinguish between the initial request and any subsequent duplicates. This necessitates a unique identifier for every request. We should generate a unique <strong>“</strong>intent fingerprint<strong>”</strong> on the client side. The system, having persisted the first successful request, checks its records for the fingerprint; if a match is found, it ignores the duplicate and returns the original success message. We call this <em>Idempotency</em>, and the fingerprint is an <em>Idempotency Key</em>.</li><li>The user needs an immediate acknowledgement to reduce anxiety, while the system must ensure the action is permanently and reliably recorded. To achieve this, the moment the intent fingerprint (idempotency key) reaches our primary server, we persist it within a single atomic database transaction and immediately respond to the user with <em>“We are looking into your ride,”</em> satisfying the need for fast feedback. At this point the ride is marked as <em>Pending</em>, not Confirmed. The transaction is only considered successful once the write has been durably replicated to the required backup database nodes, ensuring that the intent survives server failures and remains readable even if the user reconnects from another device or is routed to a different server. Only after this durable, replicated state exists do we proceed with downstream steps such as payment authorization, and based on the outcome, we either transition the ride to <em>Confirmed</em> or apply a compensating update. <em>(ACID Transaction, Idempotency Key, Synchronous Replication, Strong Consistency, Durable Write)</em></li></ol><p><strong>API 3: The Driver Performance Auditor</strong></p><p><strong>The Scenario:</strong> At the end of every week, Uber calculates a driver’s total earnings, average rating, and bonus eligibility to generate a weekly performance summary.</p><ol><li><strong>What must the user perceive?:</strong> The driver needs to perceive a historical truth. The “Minimum Truth” is no longer a single coordinate or a single booking, but a massive aggregation of thousands of data points — trip durations, star ratings, and surge multipliers — condensed into a single “Report Card.”</li><li><strong>When should they perceive it?:</strong> This information is stable; it has a very low value decay. Whether the driver perceives their final rating at 2:00 PM or 2:30 PM is irrelevant. The “Truth” is just as valuable thirty minutes later.</li></ol><p><strong>Some Design Choices We Can Make:</strong></p><ol><li>Since the space requires a summary of millions of rows across the entire platform, we realize it is physically impossible (and financially reckless) to calculate this on the fly every time a driver opens their app. We shouldn’t “query” the live production database for this. Instead, we decide to move the data away from the high-speed “Live Truth” and into a massive “Archive of Truth.” This is the move from an <em>OLTP (Online Transaction Processing)</em> database to an <em>OLAP (Online Analytical Processing)</em> system, often a <em>Data Warehouse</em> like Snowflake or BigQuery.</li><li>Because the time requirement is relaxed, we don’t need to process trips one by one as they happen. We decide to wait until the system is quiet (like at 3:00 AM) and process everyone’s weekly summary in one massive, efficient burst. We “Extract” the trip data, “Transform” it into earnings and ratings, and “Load” it into a summary table. This is <em>Batch Processing</em> via an <em>ETL (Extract, Transform, Load) Job</em>. Once the “Report Card” is ready, a simple cacheable request is enough.</li></ol><h3>3. The Fractal of Scale</h3><p>To be a “smart” architect is to realize that complexity is often just a disguise. We call this the Fractal of Scale.</p><p>A fractal is a pattern that repeats itself at every level of magnification. In architecture, the “User” is not always a human holding a phone. Sometimes, the user is a microservice; sometimes, it is a database replication agent. We can call this entity the <em>“Utilizer of the Abstraction”</em>.</p><p>Now, let’s look at some complex architectural and engineering decisions through the eyes of our two questions.</p><h4>The Question of CDNs</h4><ol><li><strong>The Fundamental Question:</strong> “When does the utilizer want to perceive the latest video?” <em>They want to perceive it now. But the speed of light is a hard limit; sending data from New York to Tokyo takes too long.</em></li><li><strong>The Design Choice:</strong> We must physically shrink the distance of the space to solve the problem of time. This is why we use <em>CDNs (Content Delivery Networks)</em> — to cache the “Truth” closer to the Utilizer’s perception.</li></ol><h4>The Question of gRPC vs. REST</h4><ol><li><strong>The Fundamental Question:</strong> “When does the global utilizer want to perceive the data?”: <em>The local utilizer here is a micro-service, not a human. Sending human-readable JSON is purely noise — it occupies bandwidth and wastes CPU cycles on serialization and deserialization. This internal latency accumulates, ultimately delaying the global utilizer (the human waiting on the screen).</em></li><li><strong>The Design Choice:</strong> We replace JSON with a rigid, binary schema (Protobuf). We chose gRPC because it is specifically optimized to minimize transport-layer latency. While REST can support Protobuf, gRPC outperforms it through superior header compression (HPACK), persistent connections, and other protocol-level efficiencies.</li></ol><h4>The Question of Scale</h4><ul><li><strong>The Fundamental Question:</strong> “What should multiple utilizers perceive simultaneously?” <em>On Black Friday, a million people are trying to add the same item to their cart. The question is: “What view (space) should each user have while these conflicts are resolving?”</em></li><li><strong>The Design Choice:</strong><em> Locking Strategies</em> are simply decisions about managing the utilizer’s perception during high-concurrency events.If we show “Available” while processing in the background, we optimize for throughput via <em>Optimistic Locking</em>. If we force a wait until the state is certain, we optimize for consistency via <em>Pessimistic Locking.</em></li></ul><h3>4. The Generalization</h3><p>One might argue that these two questions are simply a reframing of functional and non-functional requirements. At a surface level, that criticism is fair. But to view this framework as a semantic relabeling is to miss its purpose. Functional and non-functional requirements are presented as a checklist — an academic taxonomy that encourages categorization after the fact. The distinction lies not in semantics but in prioritization. This framework emphasizes perceptual truth and temporal validity as first-order concerns, treating functional and non-functional properties as derived outcomes rather than primary inputs.</p><p>This framework didn’t emerge from expertise; it emerged from confusion. As a student learning system design, I felt lost in an ocean of technical jargon. Each concept — idempotency, consistency models, stream processing — was valid on its own, but overwhelming in combination. I needed a way to reason before I had the vocabulary. The Space–Time lens became that way out. Instead of asking <em>“Which architecture/component/protocol/algorithm should I use?”</em> I could ask something more fundamental: <em>What does the user need to perceive?</em> and <em>When does that perception lose value?</em> These questions allowed me to construct a meaningful (not efficient) hypothesis first, and only then explore the existing, well-optimized approaches with clarity and intent.</p><p>In that sense, this framework isn’t proposing something radically new. For experienced engineers, it may induce little more than <a href="https://en.wikipedia.org/wiki/Vuja_De">Vuja De</a>. Many senior engineers already think this way implicitly. The difference is not in the conclusion, but in the entry point.</p><p>For students and early engineers, parsimony provides that entry point. It transforms system design from an exercise in memorizing patterns into an exercise in reasoning about reality. The jargon still matters — but it appears later, as labels attached to decisions that already make sense. And sometimes, turning implicit intuition into an explicit starting place is enough to make a dense field feel navigable again.</p><blockquote><em>This is my first attempt at writing publicly about anything. I’m still learning. Feedback and corrections are more than welcome :)</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad0196064928" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>