<?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 Mugilan M on Medium]]></title>
        <description><![CDATA[Stories by Mugilan M on Medium]]></description>
        <link>https://medium.com/@m25de1022?source=rss-9a279f53c179------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*t8kVnOW01w1FjN7z</url>
            <title>Stories by Mugilan M on Medium</title>
            <link>https://medium.com/@m25de1022?source=rss-9a279f53c179------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 09:45:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@m25de1022/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[How You Can Utilize Data Lakehouses Efficiently]]></title>
            <link>https://medium.com/@m25de1022/how-you-can-utilize-data-lakehouses-efficiently-2435812eca46?source=rss-9a279f53c179------2</link>
            <guid isPermaLink="false">https://medium.com/p/2435812eca46</guid>
            <dc:creator><![CDATA[Mugilan M]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 08:20:09 GMT</pubDate>
            <atom:updated>2026-09-13T08:20:09.396Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A mechanical guide to S3 Prefix limits, Iceberg Trees, and Delta Liquid Clustering.</em></p><p>​When you look at Amazon S3, you see folders, files, and a neat directory structure. In reality, you are looking at n number of raw text and binary strings dumped onto a massive, distributed hard drive. If you ask a standard compute engine to find one specific user ID, it will scan every single file in the bucket until the network collapses.</p><p>​To utilize a Data Lakehouse efficiently, you have to optimize two completely distinct layers of physics: <strong>The hardware limit of the storage layer (Amazon S3)</strong>, and <strong>the metadata map layered on top of it (Apache Iceberg or Delta Lake)</strong>.</p><p>​Here is the mechanical truth about extracting maximum performance from your Lakehouse.</p><h3>​1. Beating the S3 Physics (Prefix Ratelimiting)</h3><p>​​S3 is a flat, distributed key-value store. Folders do not physically exist. When you save a file to s3://bucket/data/year=aa/month=bb/file.parquet, AWS treats the entire string data/year=aa/month=bb/ as a single routing key called a <strong>Prefix</strong>.</p><h3>​The Hardware Limit</h3><p>​AWS physically throttles S3 performance at the Prefix level.</p><p>A single Prefix can mathematically only handle <strong>3,500 PUT/POST/DELETE</strong> requests and <strong>5,500 GET/HEAD</strong> requests per second.</p><h3>The Optimization: Entropy and Object Storage Layout</h3><p>​If you have a 500-node Apache Spark cluster trying to write millions of streaming IoT logs into today’s month=bb folder, you will hit that 3,500 request limit. Spark will start throwing HTTP 503 Slow Down errors, and your pipeline will crash.</p><p>​To beat this, you must engineer <strong>Entropy</strong> (randomness) into your S3 paths.</p><p>Instead of grouping files logically by date, modern Lakehouse engines (like Iceberg) offer an <strong>Object Storage Layout</strong>. When enabled, the engine calculates a cryptographic hash of the file name (e.g., 2a8f9) and injects it at the very beginning of the S3 path:</p><p>s3://bucket/2a8f9/data/year=aa…</p><p>​This tricks AWS S3 into physically distributing the write load across hundreds of different hardware partitions under the hood, scaling your throughput to millions of requests per second without you buying a single piece of extra hardware.</p><h3>​2. Apache Iceberg (The O(1) Snapshot Tree)</h3><p>​In the legacy era (Apache Hive), we optimized data lakes using explicit physical partitioning (saving files in explicit /year=aa/ folders). This was fragile. If an analyst ran SELECT * WHERE timestamp &gt; ‘aa’ but forgot to manually filter the year folder in the WHERE clause, the compute engine would execute a full table scan and bankrupt your cloud account.</p><h3>​The Optimization: Hidden Partitioning</h3><p>​Apache Iceberg fixes this by completely decoupling the logical partition from the physical folder.</p><p>With <strong>Hidden Partitioning</strong>, Iceberg tracks the mathematical relationship between the raw timestamp and the year <em>inside the metadata</em>. Analysts just write standard SQL against the timestamp column. Iceberg intercepts the query, translates it, and autonomously skips the irrelevant folders without the user needing to know the physical layout.</p><h3>​Maintaining the Snapshot Tree</h3><p>​Iceberg works by building a massive hierarchical map:</p><p>metadata.json -&gt;points to a Manifest List -&gt;points to Manifest Files -&gt;points to the actual Parquet Data Files.</p><p>​However, if you are streaming data in every 5 minutes, you will create thousands of tiny Manifest Files. Eventually, Spark will spend 15 minutes just reading the map before it even touches your data.</p><p>​<strong>The Fix:</strong> You must aggressively run maintenance procedures.</p><ul><li>​CALL system.rewrite_manifests(‘my_table’): This reorganizes and compacts the tiny manifest files into larger, aligned map blocks, drastically dropping the query planning latency.</li><li>​CALL system.rewrite_data_files(‘my_table’): This physically opens your tiny Parquet files and bin-packs them into optimal 128 MB or 512 MB chunks, restoring sequential read speeds.</li></ul><h3>​3. Delta Lake (From Z-Order to Liquid Clustering)</h3><p>​For years, the gold standard for optimizing Delta Lake was <strong>Z-Ordering</strong>.</p><p>Z-Ordering maps multidimensional data (like customer_id and timestamp) onto a 1-dimensional line to physically group similar rows into the same Parquet files.</p><h3>​The Flaw with Z-Ordering</h3><p>​Z-Ordering is mathematically heavy and destructive.</p><p>If you ingest 10 GB of new data into a 10 TB table and run OPTIMIZE ZORDER, the compute cluster is forced to rip open and rewrite massive portions of the old, historical Parquet files just to maintain the perfect physical sorting logic. It costs a fortune in compute credits. Furthermore, it conflicts heavily with traditional directory partitioning.</p><h3>​The State of the Art: Liquid Clustering</h3><p>​Databricks officially killed standard Partitioning and Z-Ordering with the release of <strong>Liquid Clustering</strong>.</p><p>​Instead of static physical folders, Liquid Clustering uses advanced space-filling mathematical curves (like Hilbert curves) to dynamically cluster data without rewriting the entire table.</p><ul><li>​<strong>Mechanical Reality:</strong> When you run CREATE TABLE sales CLUSTER BY (customer_id), Liquid clustering completely ignores Hive-style directory partitioning. It groups data into optimized “Z-Cubes” (usually around 100GB).</li><li>​<strong>Incremental Speed:</strong> When new data streams in, Liquid Clustering only clusters the <em>new</em> records incrementally. It does not touch the old data.</li><li>​<strong>Evolution:</strong> In the old days, if you wanted to change your partition strategy from year to customer_id, you had to rewrite the entire petabyte table from scratch. With Liquid Clustering, you just run ALTER TABLE … CLUSTER BY. The engine immediately applies the new clustering logic to all <em>future</em> writes, seamlessly transitioning the table without a massive compute bill.</li></ul><p>​<strong>The Takeaway:</strong></p><p>An enterprise data architecture is built on two pillars: optimized physical compute silicon and a perfectly mapped, hardware-aware storage layer. Stop relying on standard SQL commands, and start engineering your data layout for the physical limitations of S3 and the mathematical trees of Iceberg and Delta.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2435812eca46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How You Can Utilize AWS EC2 Efficiently]]></title>
            <link>https://medium.com/@m25de1022/how-you-can-utilize-aws-ec2-efficiently-6bc5b464d4f6?source=rss-9a279f53c179------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bc5b464d4f6</guid>
            <dc:creator><![CDATA[Mugilan M]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 03:21:14 GMT</pubDate>
            <atom:updated>2026-09-07T03:21:14.075Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Stop guessing instance types. A mechanical guide to beating the Von Neumann and Network bottlenecks in the cloud.</em></p><p>Treat cloud as a physical silicon, bound by the exact same laws of physics, heat, and network resistance as the server sitting under your desk.</p><p>If you are just randomly selecting instances, you are losing money and destroying your application&#39;s performance. You must start engineering for the hardware. Here is the guide for extracting maximum efficiency from Amazon EC2.</p><h3>1. The Hypervisor Tax and the AWS Nitro System</h3><p>For decades, virtual machines suffered from the “Hypervisor Tax.” A software hypervisor running on the main CPU had to constantly pause your application to handle network routing, encrypting storage drives, and isolating memory. This robbed you of up to 30% of your CPU cycles.</p><p>AWS completely changed the physics of the cloud by inventing the <strong>AWS Nitro System</strong>.</p><p>Instead of using software to manage your virtual machine, AWS physically removed the hypervisor from the main server motherboard. They built dedicated PCIe cards (Nitro Cards) equipped with custom Application Specific Integrated Circuits (ASICs).</p><ul><li><strong>Mechanical Reality:</strong> When your application writes data to an Amazon EBS volume, or sends a packet over the Virtual Private Cloud (VPC), your main CPU does absolutely zero work. The Nitro hardware offload engines instantly intercept the data, encrypt it via AES-256 in hardware, and send it over the wire.</li><li><strong>The Optimization:</strong> Because of the Nitro System, when you rent an EC2 instance, you get 100% of the host CPU’s clock cycles dedicated entirely to your payload. Always verify you are using Nitro-based instances (which is nearly all modern instance families from the 5th generation onward).</li></ul><h3>2. Defeating the Von Neumann Bottleneck (Silicon Selection)</h3><p>On legacy x86 architectures (Intel and AMD), AWS uses <strong>Simultaneous Multithreading (SMT)</strong> (also known as Hyper-Threading). This means two virtual CPUs (vCPUs) share <em>one</em> single physical core. They are constantly fighting each other for space in the physical L1 and L2 memory caches. If you run a heavy multi-threaded Java application, the threads literally step on each other, causing the CPU to starve while waiting for data from the Main RAM (The Von Neumann Bottleneck).</p><h3>The Graviton Solution</h3><p>To beat this, you must migrate to <strong>AWS Graviton</strong> processors. Graviton is custom silicon designed by AWS using the ARM instruction set. Unlike Intel, Graviton does <strong>not</strong> use SMT.</p><ul><li><strong>Mechanical Reality:</strong> If you rent an 8-vCPU Graviton instance, you are getting exactly <strong>8 isolated physical cores</strong>.</li><li><strong>Cache Domination:</strong> In the latest Graviton4 architecture (based on the Arm Neoverse V2 microarchitecture), every single core is physically given its own dedicated 2 Megabytes of L2 cache.</li><li><strong>The Optimization:</strong> Because the cores do not share an L2 cache, memory-intensive workloads like Data Lakes, Apache Spark clusters, and Redis caches no longer suffer from “noisy neighbor” cache evictions inside the CPU itself. You get significantly better performance (often up to 30–40% faster on databases and Java apps) at a lower price tag compared to legacy x86 instances.</li></ul><h3>3. Defeating the Distributed Bottleneck (Network Physics)</h3><p>Once your CPU is optimized, the bottleneck shifts to the ethernet cables connecting the data center racks. If you have 50 EC2 instances running a massive distributed query, and they are randomly scattered across the data center, the data has to travel through multiple core spine-and-leaf network routers, adding milliseconds of latency to every packet.</p><h3>Placement Groups</h3><p>You must program the physical placement of your servers using <strong>EC2 Placement Groups</strong>.</p><ul><li><strong>Cluster Placement Groups:</strong> If you are running an Apache Spark shuffle or an HPC (High-Performance Computing) workload, you configure a Cluster Placement Group. This forces AWS to launch all of your EC2 instances onto the <em>exact same physical hardware rack</em> (or directly adjacent racks). The network traffic never hits the core routers; it stays localized on the Top-of-Rack switch, giving you massive, microsecond-latency throughput.</li><li><strong>Spread Placement Groups:</strong> If you are running a critical Kafka cluster or a Cassandra database, you use a Spread Placement Group. This forces AWS to place every single instance on completely distinct physical hardware racks with separate power supplies and network switches. If a literal hardware fire destroys a rack, your cluster survives.</li></ul><h3>4. The Economics of Idle Hardware (Spot Engineering)</h3><p>AWS has tens of thousands of bare-metal servers sitting idle, waiting for peak traffic spikes. They rent this idle silicon out as <strong>EC2 Spot Instances</strong> at up to a 90% discount.</p><p>The catch? AWS can forcibly terminate your server at any moment if a full-paying On-Demand customer needs the capacity.</p><p>Few engineers avoid Spot instances because they are scared of crashes. Few engineers architect around the physics of the termination.</p><ul><li><strong>The 2-Minute Warning:</strong> When AWS decides to kill your server, they do not just unplug it instantly. They send a cryptographic signal to the <strong>EC2 Instance Metadata Service (IMDS)</strong> exactly 120 seconds before termination.</li><li><strong>The Optimization:</strong> You write a lightweight daemon on your EC2 instance that constantly polls the local metadata IP ([http://169.254.169.254/latest/meta-data/spot/instance-action](http://169.254.169.254/latest/meta-data/spot/instance-action)) or listens to Amazon EventBridge. The microsecond that endpoint returns a termination time, your application triggers a &quot;graceful shutdown&quot; script. It stops accepting new web requests, flushes its RAM to the database, and safely commits suicide before AWS pulls the plug.</li></ul><p>By mathematically guaranteeing that your application can safely drain and shut down in 120 seconds, you can run massive, enterprise-grade production clusters at a 90% discount without losing a single byte of data.</p><p><strong>The Takeaway:</strong> To be a master Cloud Architect, you must stop treating the cloud as a software abstraction. It is a highly engineered ecosystem of ARM Neoverse cores, Nitro ASICs, and Top-of-Rack network switches. When you engineer for the physical metal, performance skyrockets and costs plummet.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bc5b464d4f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Developer’s Blueprint for the Claude Certified Architect Exam]]></title>
            <link>https://medium.com/@m25de1022/the-developers-blueprint-for-the-claude-certified-architect-exam-8e3b03ba8760?source=rss-9a279f53c179------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e3b03ba8760</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Mugilan M]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 18:39:12 GMT</pubDate>
            <atom:updated>2026-07-20T18:39:12.399Z</atom:updated>
            <content:encoded><![CDATA[<p>The generative AI landscape is moving fast. We are now building autonomous agents that actually execute tasks. If you are used to building reliable data pipelines in standard Databricks or Snowflake, handing the reins over to an LLM can feel like a wildcard.</p><p>The Anthropic Claude Certified Architect exam tests your ability to tame that wildcard. It focuses entirely on building predictable, production-ready systems. The official documentation can be dense, so here is the breakdown of all 5 domains to help you clear the exam.</p><h3>1. Agentic Architecture (The Manager and the Workers)</h3><p>Don’t build one massive AI agent that tries to do everything. The exam heavily favors the <strong>Hub-and-Spoke pattern</strong>.</p><ul><li><strong>The Prime Orchestrator:</strong> Think of this as the manager. It takes the user’s request and breaks it down into steps.</li><li><strong>Subagents:</strong> These are your specialized workers (like a dedicated “Database Agent”).</li><li><strong>Context Isolation:</strong> A good manager doesn’t forward a 100-email thread to a developer. They summarize the task. You must do the same here. Subagents do not automatically inherit the main chat history. You have to explicitly pass only the context they need, otherwise, you waste tokens and distract the model.</li></ul><p><strong>The Execution Loop:</strong> The entire system runs on a simple loop controlled by the stop_reason field.</p><ol><li>You send a prompt.</li><li>If Claude needs to look something up, it pauses and returns a stop_reason of &quot;tool_use&quot;.</li><li>Your application (not Claude) executes the tool.</li><li>You append the result back into the chat history.</li><li>The loop repeats until Claude returns &quot;end_turn&quot; (meaning it&#39;s finished) or &quot;max_tokens&quot;</li></ol><h3>2. Claude Code Configuration</h3><p>This section is about managing AI in a team environment.</p><ul><li><strong>CLAUDE.md:</strong> This is a rulebook injected into Claude’s memory at the start of every session. Keep it tight — between 80 to 120 lines. If you give it more than 150 instructions, it suffers from “context dropping” and simply forgets the rules. You can put a master rulebook in your root directory, and specific ones in subfolders like /tests.</li><li><strong>Slash Commands:</strong> Instead of typing a massive prompt every time you want to review code, you can define a custom command like /review. It acts as a macro that expands into a perfect 500-word prompt. You can even <strong>hook </strong>this up to run your automated tests and pipe the output straight to Claude.</li><li><strong>CI/CD Pipelines:</strong> If you run Claude in GitHub Actions or a CI pipeline, it will hang forever waiting for a human to type something. You must run it in headless mode using the -p (print) flag. It takes the prompt, executes it, prints the result, and exits. This is perfect for automated PR reviews checking for SQL injection.</li></ul><h3>Hooks (The Interceptors)</h3><p>Sometimes you cannot trust the AI to do everything perfectly, or you need to step in between the AI and your actual databases. That is exactly what hooks are for — they let you intercept actions mid-flight.</p><ul><li><strong>Formatting Data (</strong><strong>PostToolUse):</strong> Imagine Claude queries two different systems and gets two different date formats. Instead of wasting tokens having Claude figure out how to match them, you can use a PostToolUse hook to instantly standardize the data in your application code before handing it back to the model.</li><li><strong>Security (Interception Hooks):</strong> This is a major exam concept. Never rely purely on a text prompt for security. If you tell an LLM “Do not allow refunds over $500,” there is always a chance it gets confused and does it anyway. Instead, you use an interception hook in your code to deterministically block that tool call. Code is bulletproof; natural language guardrails are not</li></ul><h3>3. Forcing Structured Output</h3><p>When you are integrating AI with databases, you need perfect JSON.</p><ul><li><strong>Tool Use:</strong> Define a strict JSON schema and use the tool_choice parameter to literally force Claude to use it.</li><li><strong>Nullable Fields:</strong> Always include nullable fields. If Claude doesn’t know the answer, it will safely output null instead of hallucinating fake data just to satisfy a required field constraint.</li></ul><h3>4. Model Context Protocol (MCP)</h3><p>MCP is how Claude talks to the outside world.</p><ul><li><strong>The Three Parts:</strong> It consists of <strong>Tools</strong> (actions Claude can take, like querying a DB), <strong>Resources</strong> (read-only data like log files), and <strong>Prompts</strong> (reusable templates).</li><li><strong>The Architecture:</strong> Your IDE is the Host. The Client sits inside it, and it connects to an external Server exposing the tools.</li><li><strong>The </strong><strong>isError Flag:</strong> Things will break. When a tool fails (like a bad SQL query), do not crash the app, and do not return a generic &quot;Error 500&quot;. Catch the error and return it to Claude with the isError flag set to true. This feeds the actual error back to the model so it can self-correct on the next turn.</li></ul><h3>5. Context Caching</h3><p>Prompt caching saves massive amounts of time and money, but it is fragile.</p><ul><li><strong>The Prefix Invariant:</strong> Caching requires strict byte-for-byte matching. If you put a dynamic timestamp at the very beginning of your prompt, the cache breaks for the entire rest of the payload.</li><li><strong>The Golden Order:</strong> You must order your payloads from static to dynamic: <strong>1. Tools</strong> <strong>-&gt;</strong> <strong>2. System Prompts</strong> <strong>-&gt;3. Messages (chat history)</strong>.</li><li><strong>The Economics:</strong> Writing to the cache is 25% more expensive than a normal token, but reading from it is 90% cheaper. Caches die after 5 minutes of inactivity. For bulk jobs that aren’t time-sensitive, skip caching and use the Message Batches API, which processes requests asynchronously at half the price.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e3b03ba8760" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>