<?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 Susmeta Anandhan on Medium]]></title>
        <description><![CDATA[Stories by Susmeta Anandhan on Medium]]></description>
        <link>https://medium.com/@susmetaa01?source=rss-e3e0d70681c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MVI91d64uNA0LFUor4nCvQ.jpeg</url>
            <title>Stories by Susmeta Anandhan on Medium</title>
            <link>https://medium.com/@susmetaa01?source=rss-e3e0d70681c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:21:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@susmetaa01/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[Behind Every ‘Order Placed’: Understanding OLTP vs OLAP]]></title>
            <link>https://medium.com/@susmetaa01/behind-every-order-placed-understanding-oltp-vs-olap-a30684fd6bd1?source=rss-e3e0d70681c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a30684fd6bd1</guid>
            <category><![CDATA[olap]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[oltp-vs-olap]]></category>
            <category><![CDATA[oltp]]></category>
            <category><![CDATA[scd]]></category>
            <dc:creator><![CDATA[Susmeta Anandhan]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 15:41:00 GMT</pubDate>
            <atom:updated>2026-06-18T15:41:00.811Z</atom:updated>
            <content:encoded><![CDATA[<p>Some technical concepts sound simple when explained in one line, but still do not fully click until you understand the problem they are trying to solve.</p><p>For me, <strong>OLTP vs OLAP</strong> was one of those concepts. I had seen the common explanation many times:</p><blockquote><strong><em>OLTP is for transactions. OLAP is for analytics.</em></strong></blockquote><p>That is technically correct. But it also felt incomplete. Because I still had questions:</p><ul><li>If both can use SQL, why are they treated differently?</li><li>Why are they built differently under the hood?</li><li>Where do they usually fit in a real data architecture?</li></ul><p>So I tried breaking it down from first principles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yl_KVAefMUrF7LZfpj1ZJg.png" /></figure><h3>The simplest mental model</h3><p>The simplest way I now understand it is:</p><blockquote><strong><em>OLTP records what is happening.</em></strong><em><br></em><strong><em>OLAP analyzes what happened.</em></strong></blockquote><p>OLTP is about handling live operational work. OLAP is about analyzing historical data to find patterns.</p><p>A simple example:</p><p>When a customer places an order, the system has to create the order, confirm payment, reduce inventory, and update the current order status. That is <strong>OLTP</strong>.</p><p>Later, when a business team asks which city had the highest revenue this quarter or which category sold the most during a sale, that is <strong>OLAP</strong>.</p><p>Same business. Same data domain. Very different questions.</p><h3>What is OLTP?</h3><p><strong>OLTP</strong> stands for <strong>Online Transaction Processing</strong>.</p><p>It is used for systems that handle real-time transactions and operational updates.</p><p>Examples include:</p><ul><li>placing an order</li><li>processing a payment</li><li>updating inventory</li><li>changing delivery status</li></ul><p>The main goal of OLTP is:</p><blockquote><em>Save the current state correctly and quickly.</em></blockquote><p>OLTP databases are usually used by applications and microservices. They are close to the user-facing or operational system.</p><p>For example:</p><pre>Application<br>   ↓<br>OLTP database</pre><p>The application depends on the OLTP database to know the current truth.</p><p>Examples:</p><ul><li>Has this order been paid?</li><li>What is the current inventory count?</li><li>Has this bank transfer completed?</li></ul><p>These questions usually involve one entity or a small number of entities. The database needs to respond quickly and handle many users or services at the same time.</p><h3>Why OLTP needs correctness?</h3><p>OLTP systems are used in situations where correctness matters immediately.</p><p>Imagine a payment succeeds, but the order is not created. Or inventory is not updated after an item is purchased. Or two people book the same seat at the same time.</p><p>These are not just reporting issues. They directly affect the live system.</p><p>That is why OLTP databases care deeply about:</p><ul><li>fast reads and writes</li><li>consistency and concurrency</li><li>current data and safe updates</li><li>transaction guarantees</li></ul><p>This is where concepts like <strong>ACID transactions</strong> become important.</p><blockquote><em>OLTP is built to protect the operational truth of the system.</em></blockquote><h3>What is OLAP?</h3><p><strong>OLAP</strong> stands for <strong>Online Analytical Processing</strong>.</p><p>It is used for analyzing large volumes of historical data.</p><p>Examples include:</p><ul><li>dashboards</li><li>business reports</li><li>trend analysis</li><li>customer/product analysis</li><li>forecasting</li></ul><p>The main goal of OLAP is:</p><blockquote><em>Understand patterns from data over time.</em></blockquote><p>OLAP databases are usually used by analysts, data teams, finance teams, product teams, marketing teams, and leadership.</p><p>A common flow looks like this:</p><pre>Application / OLTP systems / events<br>   ↓<br>Data pipeline<br>   ↓<br>OLAP database or warehouse<br>   ↓<br>Dashboards / reports / analytics</pre><p>OLAP helps answer questions like:</p><ul><li>Which city had the highest revenue this quarter?</li><li>What was the average order value by month?</li><li>Did returns increase after a sale?</li><li>Which customer segment retained better over time?</li></ul><p>These questions usually involve many records, historical data, grouping, filtering, and aggregation.</p><h3>Why analyzing many records is different</h3><p>One of the key differences is the shape of the question.</p><p>An OLTP question may look like: <em>What is the status of order ORD123?</em></p><p>An OLAP question may look like: <em>What is the total revenue by city for the last quarter?</em></p><p>The first question needs one specific record. The second question may need millions of records.</p><p>That is why OLAP systems are optimized differently. They are not primarily built to update one record quickly. They are built to summarize large amounts of data efficiently.</p><h3>If both use SQL, what is the difference?</h3><p>This was one of my biggest confusions.</p><p>Many OLTP and OLAP systems can be queried using SQL or SQL-like languages. But the difference is not just the language.</p><p><strong>The difference is the workload.</strong></p><p>An OLTP query might be:</p><pre>SELECT *<br>FROM orders<br>WHERE order_id = &#39;ORD123&#39;;</pre><p>This query is small and specific. It wants one complete order.</p><p>An OLAP query might be:</p><pre>SELECT<br>  city,<br>  SUM(revenue) AS total_revenue<br>FROM sales<br>WHERE order_date &gt;= DATE &#39;2026-01-01&#39;<br>GROUP BY city;</pre><p>This query is analytical. It scans many records, groups them by city, and calculates revenue.</p><blockquote><em>OLTP queries usually ask for a specific current record.<br>OLAP queries usually ask for a summarized view across many historical records.</em></blockquote><h3>Row-oriented vs column-oriented storage</h3><p>A major under-the-hood difference is how data is physically stored.</p><p>Many OLTP databases are <strong>row-oriented</strong>. That means data for a full record is stored together.</p><p>Example:</p><pre>order_id | customer_id | payment_status | address_id | order_status | created_at</pre><p>This is useful when the application wants the full details of one order quickly.</p><p>Example:</p><pre>SELECT *<br>FROM orders<br>WHERE order_id = &#39;ORD123&#39;;</pre><p>The database can fetch the complete row efficiently. This fits OLTP well because operational systems often care about one complete record at a time.</p><p>Many OLAP databases are <strong>column-oriented</strong>. That means values from the same column are stored together.</p><p>Example:</p><pre>city column: Chennai, Bangalore, Mumbai, Chennai<br>revenue column: 500, 1200, 800, 300<br>date column: Jan, Jan, Feb, Feb</pre><p>This is useful when analytical queries need only a few columns across many rows.</p><p>Example:</p><pre>SELECT city, SUM(revenue)<br>FROM sales<br>GROUP BY city;</pre><p>This query may not need the full order record. It mostly needs city and revenue. Column-oriented storage helps analytical systems scan and aggregate large datasets more efficiently.</p><blockquote><em>OLTP is often optimized to fetch or update complete records.<br>OLAP is often optimized to scan selected columns across huge datasets.</em></blockquote><h3>Normalized tables vs fact/ dimension tables</h3><p>Another big difference is data modeling.</p><p>OLTP systems usually use <strong>normalized tables</strong>. This means data is split into smaller related tables to reduce duplication and make updates safer.</p><p>Example:</p><pre>users<br>orders<br>order_items<br>payments<br>products<br>inventory<br>addresses</pre><p>Instead of repeating user details in every order row, the orders table may store only user_id. The user’s name, email, and phone number live in the users table.</p><p><em>Why?</em></p><p>Because if a user updates their phone number, we update it in one place. This is good for operational correctness. Normalized design helps reduce duplication and avoid update inconsistencies.</p><p>OLAP systems often use <strong>fact and dimension tables</strong>. A <strong>fact table</strong> stores measurable events or numbers.</p><p>Example:</p><pre>fact_sales<br>order_id | customer_id | product_id | date_id | revenue | quantity | discount</pre><p>The measurable values are things like: revenue, quantity, discount, order count, return count</p><p>A <strong>dimension table</strong> stores context for analyzing those measurements.</p><p>Example:</p><pre>dim_customer<br>customer_id | city | customer_tier | age_group</pre><pre>dim_product<br>product_id | brand | category | subcategory</pre><pre>dim_date<br>date_id | date | month | quarter | year</pre><p>This structure makes it easier to answer questions like: Revenue by city, Orders by category, Returns by brand, Sales by quarter, Average order value by customer tier</p><p>A simple way to remember this:</p><blockquote><strong><em>Fact = the numbers you measure.</em></strong><em><br></em><strong><em>Dimension = how you slice or describe those numbers.</em></strong></blockquote><h3>Star schema and snowflake schema</h3><p>Once we talk about fact and dimension tables, two related terms show up often: <strong>star schema</strong> and <strong>snowflake schema</strong>.</p><p>A <strong>star schema</strong> has one central fact table connected directly to multiple dimension tables.</p><p>Example:</p><pre>            dim_customer<br>                  |<br>dim_product — fact_sales — dim_date<br>                  |<br>              dim_region</pre><p>It is called a star because the fact table sits in the center and the dimension tables spread around it. Star schemas are common in OLAP because they are simple to understand and query.</p><p>A <strong>snowflake schema</strong> is similar, but the dimension tables are further split into smaller related tables.</p><p>Example:</p><pre>fact_sales → dim_product → dim_category</pre><p>Instead of keeping category details directly in dim_product, they may be separated into dim_category.</p><p>The tradeoff is:</p><ul><li>star schema is simpler and often easier to query</li><li>snowflake schema reduces duplication but may require more joins</li></ul><p>The beginner-friendly takeaway:</p><blockquote><em>Star and snowflake schemas are ways of organizing analytical data so it can be grouped, sliced, and summarized efficiently.</em></blockquote><h3>Slowly Changing Dimensions</h3><p>Another OLAP concept worth knowing is <strong>Slowly Changing Dimensions</strong>, or <strong>SCD</strong>.</p><p>This is about handling changes in dimension data over time.</p><p>Example: A customer lives in Chennai. Later, they move to Bangalore.</p><p>Now imagine a report asks: <em>What was revenue by customer city last year?</em></p><p>Should older orders count under Chennai or Bangalore? That depends on how we model the dimension history.</p><h3>SCD Type 1: overwrite the old value</h3><p>In Type 1, we simply update the dimension record.</p><pre>customer_id | name | city<br>1           | user1  | Bangalore</pre><p>The old city is lost. This is useful when history does not matter, such as correcting a typo.</p><h3>SCD Type 2: keep history</h3><p>In Type 2, we keep multiple versions of the dimension record.</p><pre>customer_key | customer_id | city      | start_date | end_date<br>101          | 1           | Chennai   | 2025-01-01 | 2025-06-30<br>102          | 1           | Bangalore | 2025-07-01 | null</pre><p>Now reports can preserve historical meaning. Orders placed while the customer lived in Chennai can still count under Chennai. Orders placed after the move can count under Bangalore.</p><p>This is where OLAP modeling becomes more than just storing data. It becomes about preserving business context over time.</p><h3>Where OLTP and OLAP fit together</h3><p>OLTP and OLAP are not competitors. They usually work together.</p><p>A typical architecture may look like:</p><pre>Application<br>   ↓<br>OLTP database<br>   ↓<br>Data pipeline<br>   ↓<br>OLAP warehouse / lakehouse<br>   ↓<br>BI dashboards / reports</pre><p>OLTP supports the application. OLAP supports analysis.</p><p>OLTP keeps the business running. OLAP helps the business understand what is happening and make better decisions.</p><h3>Final mental model</h3><p>The simplest version I now use is:</p><blockquote><strong><em>OLTP records the operational truth.</em></strong><em><br></em><strong><em>OLAP reads the analytical story.</em></strong></blockquote><p>One system keeps the current state correct. The other helps us learn from the past.</p><p>OLTP vs OLAP now feels little less than just another pair of database acronyms.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a30684fd6bd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Tiny Daemon That Made My AI 10x More Useful]]></title>
            <link>https://medium.com/@susmetaa01/the-tiny-daemon-that-made-my-ai-10x-more-useful-706549b114eb?source=rss-e3e0d70681c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/706549b114eb</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[mcp-client]]></category>
            <category><![CDATA[cursor]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Susmeta Anandhan]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 13:58:00 GMT</pubDate>
            <atom:updated>2026-04-19T14:12:25.940Z</atom:updated>
            <content:encoded><![CDATA[<h3>Copy-Paste-Cry — wait, where did that go?</h3><p>I spent way too much time in this cursed workflow: Prod breaks. I’m bouncing between <strong>Splunk</strong>, <strong>IDE</strong>, <strong>Slack</strong>, and <strong>PRDs</strong> — copying, switching tabs, and pasting context into my AI like a glorified delivery driver.</p><p>Six context switches later, I’ve finally “assembled” the prompt, but my brain is fried. One accidental copy-paste in the middle? <strong>Game over.</strong> Start the side quest from the beginning.</p><h4>The Problem</h4><p>The clipboard is <strong>global mutable state</strong>. It has zero memory and zero loyalty. It’s the ultimate vibe kill for debugging.</p><h4>The Fix: ClipMCP</h4><p>I built <strong>ClipMCP</strong> to kill the manual labor. It’s a background server that stores your clipboard history locally in <strong>SQLite</strong> and serves it directly to your MCP-compatible AI assistant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NBXOr10Moy8jBRxA_91MNQ.png" /></figure><p><strong>The TL;DR:</strong> No more manual pasting. Your AI finally has the receipts.</p><h3>How ClipMCP works</h3><p>ClipMCP is a MCP server that runs as a background daemon alongside your AI client. It polls the macOS clipboard every 500ms and stores new clips into a local SQLite database. Every clip gets:</p><ul><li><strong>A content type</strong> — text, html, or image</li><li><strong>A category</strong> — error, code, url, email, path, sensitive, or plain text</li><li><strong>A sensitive flag</strong> — if it looks like an API key, token, or password, it gets flagged before your AI assistant ever sees it</li><li><strong>An optional embedding vector</strong> — for semantic search (more on this in a sec)</li></ul><p>The HTML capture was a fun one to build. When you copy from a webpage, Notion, Slack, or Google Docs, the clipboard usually contains <em>both</em> plain text and a richer public.html representation. ClipMCP prefers the HTML — it captures links, formatting, and structure that plain text drops on the floor. It then strips the HTML down to readable plain text for display and search, while keeping the raw HTML in the DB for fidelity.</p><p>Images work too. Screenshots copy as public.tiff on macOS, and ClipMCP converts them to PNG, saves them to disk, and stores a reference in the database.</p><h3>Debug context bundling</h3><p>This is the killer tool. When you say <strong>“fix this error”</strong> or <strong>“what’s wrong?”</strong>, the assistant calls get_debug_context — which doesn&#39;t just pull the most recent clip. It pulls:</p><ol><li>Everything categorised as error (stack traces, exception messages)</li><li>Then code clips</li><li>Then everything else, newest first</li></ol><p>All bundled into one context block. No pasting. No hunting through your history. The assistant gets everything it needs to understand what you’re debugging in a single tool call.</p><p>The categoriser that makes this work uses a <strong>Strategy pattern</strong> — each category is a separate rule class with a priority and a matches() method. Rules are sorted by priority at startup and evaluated in order. Adding a new category is just adding a new rule class; nothing else changes.</p><pre>class ErrorRule(CategoryRule):<br>    priority = 1<br>    category = ContentCategory.ERROR<br><br>    def matches(self, content: str) -&gt; bool:<br>        lower = content.lower()<br>        return any(kw in lower for kw in (<br>            &quot;traceback&quot;, &quot;error:&quot;, &quot;exception&quot;, &quot;errno&quot;,<br>            &quot;syntaxerror&quot;, &quot;typeerror&quot;, &quot;valueerror&quot;, ...<br>        ))</pre><h3>Architecture: the interesting decisions</h3><h4>Repository pattern for storage</h4><p>ClipRepository wraps all SQLite access. It reads the database path from config at call time (not at import time), which turned out to matter a lot for tests — you can monkeypatch the config path in a test fixture and the repository just picks it up, no mocking required.</p><p>WAL mode is enabled on the database connection. This lets the monitor thread write new clips while the MCP server thread is reading them, without locking.</p><h4>Abstract Factory for clipboard reading</h4><p>ClipboardReader is an abstract base class. MacOSClipboardReader implements it using NSPasteboard from pyobjc — that&#39;s what gives us HTML and image access. FallbackClipboardReader implements it using pyperclip (text only, for non-macOS). A factory function picks the right one at startup:</p><pre>def create_clipboard_reader() -&gt; ClipboardReader:<br>    if platform.system() == &quot;Darwin&quot;:<br>        return MacOSClipboardReader()<br>    return FallbackClipboardReader()</pre><p>The monitor accepts an injected reader in its constructor, which makes unit testing dead simple — you just pass in a fake reader.</p><h4>Registry pattern for MCP tools</h4><p>All nine MCP tools are registered in a ToolRegistry at startup. The @app.list_tools() and @app.call_tool() handlers are two-liners that just delegate to the registry. Adding a new tool is one registry.register() call — the framework plumbing doesn&#39;t change.</p><h4>Semantic search (optional, fully local)</h4><p>If you install the [semantic] extra, ClipMCP loads all-MiniLM-L6-v2 (~80MB) from sentence-transformers and computes a 384-dimensional embedding for each clip as it comes in. Stored as a binary blob in SQLite alongside the clip. When you say &quot;find that thing about the Grafana alert&quot;, it does cosine similarity across all stored embeddings and surfaces the best match — even if you don&#39;t remember the exact words.</p><p>The model runs fully offline. No data leaves your machine.</p><h3>The 9 MCP tools</h3><p>Your AI assistant calls these automatically based on what you say — you never need to name them:</p><p>get_recent_clips — ”what did I copy”, “analyse this”</p><p>search_clips — ”find the AWS error”, “look up the thing from earlier”</p><p>semantic_search — ”what was that Slack thread about Grafana”</p><p>get_debug_context— ”fix this error”, “what&#39;s wrong”, “debug this”</p><p>pin_clip — ” keep this”, “pin that”</p><p>unpin_clip— ”unpin clip 5&quot;</p><p>delete_clip — ”delete clip 3&quot;</p><p>get_clip_stats— ”how many things have I copied today”</p><p>clear_history — “clear my clipboard history”</p><h3>Data privacy</h3><p>Everything stays local. SQLite database lives in ~/.clipmcp/history.db. Embeddings are computed on-device. Sensitive clips (API keys, tokens, passwords) are flagged and never surfaced to the assistant in full unless you explicitly ask.</p><h3>Setting it up</h3><pre>git clone https://github.com/susmetaa01/clipmcp.git<br>cd clipmcp<br>pip install -e .</pre><p>Then point your AI client at it.</p><p><strong>Claude Desktop</strong> — open ~/Library/Application Support/Claude/claude_desktop_config.json and add:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;clipmcp&quot;: {<br>      &quot;command&quot;: &quot;python3&quot;,<br>      &quot;args&quot;: [&quot;-m&quot;, &quot;clipmcp&quot;],<br>      &quot;cwd&quot;: &quot;/path/to/clipmcp/src&quot;<br>    }<br>  }<br>}</pre><p>Restart Claude Desktop and the server will connect automatically.</p><p><strong>Cursor</strong> — add to ~/.cursor/mcp.json:</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;clipmcp&quot;: {<br>      &quot;command&quot;: &quot;python3&quot;,<br>      &quot;args&quot;: [&quot;-m&quot;, &quot;clipmcp&quot;],<br>      &quot;cwd&quot;: &quot;/path/to/clipmcp/src&quot;<br>    }<br>  }<br>}</pre><p><strong>VS Code</strong> (v1.99+ with Copilot) — create .vscode/mcp.json in your workspace:</p><pre>{<br>  &quot;servers&quot;: {<br>    &quot;clipmcp&quot;: {<br>      &quot;type&quot;: &quot;stdio&quot;,<br>      &quot;command&quot;: &quot;python3&quot;,<br>      &quot;args&quot;: [&quot;-m&quot;, &quot;clipmcp&quot;],<br>      &quot;cwd&quot;: &quot;/path/to/clipmcp/src&quot;<br>    }<br>  }<br>}</pre><p>Once connected, copy anything and ask your assistant: <em>“What did I just copy?”</em> — it’ll call get_recent_clips and show you. That&#39;s all it takes.</p><h3>What’s next</h3><p>A few things on the roadmap I’m genuinely excited about:</p><ul><li><strong>OCR on screenshot clips</strong> — right now a screenshot of a stack trace is stored as image, not error. Adding OCR would let the categoriser read it and route it correctly into debug context.</li><li><strong>Selective encryption</strong> — sensitive clips should be encrypted at rest, not just flagged.</li><li><strong>Menu bar UI</strong> — a lightweight status bar app so you can see what’s been captured without opening your AI client.</li><li><strong>Windows / Linux support</strong> — the architecture is already abstracted for this, the clipboard reader is the only platform-specific piece.</li></ul><h3>Try it out</h3><p>The repo is open: <a href="https://github.com/susmetaa01/clipmcp"><strong>github.com/susmetaa01/clipmcp</strong></a></p><p>If the “wait, where did that go?” problem sounds familiar, give it a try. And if you’ve got ideas on what to build next — OCR, encryption, a better UI — PRs are very welcome. The <em>CONTRIBUTING.md</em> has the full architecture walkthrough to get you started.</p><blockquote><em>All data stays on your machine. No third-party clipboard app required. Works with Cursor, VS Code, Claude Desktop, or any MCP-compatible client.</em></blockquote><p><em>Copy Once. Ask Forever.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=706549b114eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Latent Personalities: Comparing Design Philosophies in DALL-E 3 and Gemini’s Nano Banana]]></title>
            <link>https://medium.com/@susmetaa01/latent-personalities-comparing-design-philosophies-in-dall-e-3-and-geminis-nano-banana-c7ddf3e4143d?source=rss-e3e0d70681c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7ddf3e4143d</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[nano-banana]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[dall-e-3]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Susmeta Anandhan]]></dc:creator>
            <pubDate>Mon, 26 Jan 2026 10:43:16 GMT</pubDate>
            <atom:updated>2026-01-26T10:43:16.104Z</atom:updated>
            <content:encoded><![CDATA[<p>Even with identical instructions, every AI model has a distinct “creative logic” that dictates the final result. To explore this, I ran a side-by-side image generation experiment using <strong>OpenAI’s DALL-E 3</strong> and <strong>Google’s Nano Banana</strong> (the engine behind Gemini).</p><p>By feeding both models a specific character prompt, I wanted to see how each would interpret character identity, color, and environmental logic.</p><p>The Prompt: <strong><em>“Generate a 2D illustration of a fictional character that looks cute and is butter yellow. The character, Crookshanks, is riding a bicycle in a skate park.”</em></strong></p><figure><img alt="dall e3 vs gemini generated images" src="https://cdn-images-1.medium.com/max/1024/1*BuO3FTv_2kbd40DsfS8TOA.png" /></figure><p>The results weren’t just different — they represented two entirely different philosophies of digital creation.</p><h4>The Visual Breakdown</h4><p><strong>DALL-E 3</strong> tended to produce a single, cohesive, “poster-style” image. It prioritizes high fidelity to the artistic flair of the prompt on the first try, aiming for a finished look that feels ready for a portfolio.</p><figure><img alt="OpenAI’s DALL-E 3 generated image" src="https://cdn-images-1.medium.com/max/1024/1*vHUJz4yYqN-aj9zVlVzGOg.png" /></figure><p><strong>Nano Banana (Gemini)</strong> took a more pragmatic approach. It focused heavily on scene logic, often adding practical environmental details — like a helmet for safety or scarves for style — to make the world feel lived-in and “plausible.”</p><figure><img alt="Google’s Nano Banana generated image" src="https://cdn-images-1.medium.com/max/1024/1*3fBJ8ztFPMDHO4Tucy4Nqw.png" /></figure><h3>Why the Disconnect? An “Under the Hood” View</h3><h4>1. The Design Philosophy: Painter vs. Architect</h4><ul><li><strong>DALL-E 3 is the Meticulous Painter.</strong> It wants to deliver a finished masterpiece by deeply interpreting every descriptive adjective you provide in one go.</li><li><strong>Nano Banana is the Fast Sketch Artist.</strong> It’s built for a conversational workflow. It provides a solid foundation, assuming you’ll want to “talk” it through further iterations to get the details just right.</li></ul><h4>2. The Logic of “Hidden Expansion”</h4><p>DALL-E 3 is famous for internally expanding your prompt. If you type one sentence, it writes a paragraph behind the scenes to add texture and lighting.</p><p>Gemini, however, relies on <strong>World Knowledge</strong>. When it sees “skate park,” it accesses its data on what skate parks actually look like — often leading to “logical” additions like graffiti or safety gear that you didn’t explicitly ask for, but that make sense in context.</p><h4>3. The “Crookshanks” Conflict</h4><p>This experiment highlighted a fascinating nuance in AI training. In the <em>Harry Potter</em> universe, Crookshanks is a ginger cat. When the prompt asked for a “butter yellow” version, the models hit a fork in the road:</p><ul><li><strong>DALL-E 3</strong> generally prioritized the prompt’s color instruction over the character’s famous history.</li><li><strong>Gemini</strong> occasionally experienced a “logic conflict.” Because it’s so deeply integrated with web knowledge, it has to decide whether to follow your instructions or stay “lore-accurate.”</li></ul><h4>4. Subject Consistency</h4><p>This is where the two models truly diverge.</p><ul><li><strong>Gemini</strong> is built for <strong>Identity Locking</strong>. If you want to see the same Crookshanks eating pizza in a second image, Gemini is designed to preserve those specific features across different scenes.</li><li><strong>DALL-E 3</strong> treats every click of the “Generate” button as a fresh start. While it’s brilliant at following text, maintaining the exact same character proportions and eye color across multiple sessions can be a challenge.</li></ul><h3>How to Bridge the Gap</h3><p>If you need consistent results regardless of the model you use, you have to reduce the AI’s “creative guesswork” by locking down the variables:</p><ul><li><strong>Define the Species:</strong> Instead of “character,” use “round, cat-like creature.”</li><li><strong>Call the Shots:</strong> Use technical terms like “eye-level shot” or “wide angle” to fix the perspective.</li><li><strong>Standardize the Style:</strong> Swap subjective words like “cute” for concrete descriptors like “flat 2D vector” or “watercolor storybook.”</li></ul><h3>Which One Should You Use? A cheat-sheet</h3><blockquote><strong>Character Consistency</strong> (Same lead for a story) — <strong>Nano Banana</strong></blockquote><blockquote><strong>One-Shot Quality</strong> (A single, detailed poster) — <strong>DALL-E 3</strong></blockquote><blockquote><strong>In-Image Text</strong> (Signs, shirts, or labels) — <strong>Nano Banana</strong></blockquote><blockquote><strong>Creative Stylization</strong> (Finding a unique “look”) — <strong>DALL-E 3</strong></blockquote><p>Ultimately, these models are just different brushes in your digital kit; Understanding these “model personalities” changes the game from guessing to directing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7ddf3e4143d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[InfluxDB Data Updates: Navigating through the Immutability Challenge]]></title>
            <link>https://medium.com/@susmetaa01/influxdb-data-updates-navigating-through-the-immutability-challenge-64dc7199a65d?source=rss-e3e0d70681c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/64dc7199a65d</guid>
            <category><![CDATA[flux]]></category>
            <category><![CDATA[time-series-database]]></category>
            <category><![CDATA[influxdb]]></category>
            <category><![CDATA[updates]]></category>
            <category><![CDATA[influx]]></category>
            <dc:creator><![CDATA[Susmeta Anandhan]]></dc:creator>
            <pubDate>Sat, 05 Jul 2025 18:50:47 GMT</pubDate>
            <atom:updated>2025-07-05T18:50:47.460Z</atom:updated>
            <content:encoded><![CDATA[<p>InfluxDB is awesome for handling tons of time-series data. It’s built for speed when you’re writing new data, but here’s the kicker: there’s no “<em>oops, let me just edit that</em>” button for existing points. This design choice is intentional, prioritizing the efficiency of handling massive streams of data, making the data immutable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CSWqDKO4iV-eUA-5ABSrdg.png" /></figure><p>Since there’s no direct <strong>UPDATE</strong> function, here are a few ways of spoofing it.</p><h4><strong>1. Read, Delete, and Rewrite</strong></h4><p>This is probably the most straightforward way you’d think to “update” something, mimicking a traditional database update.</p><p><strong><em>Mechanism</em></strong></p><p><strong>Read:</strong> Query the existing point(s) to be modified.</p><p><strong>Delete:</strong> Utilize a Flux query or SDK DeleteAPI to remove the identified point(s) from the database.</p><p><strong>Write:</strong> Ingest a new point with the desired updated values and any new tags.</p><p><strong><em>Technical Considerations</em></strong></p><ul><li><strong>Performance Overhead:</strong> This three-step process introduces latency. In high-throughput environments, this can lead to performance bottlenecks and potential data lag. Not ideal if you’re aiming for real-time coolness.</li><li><strong>Data Consistency Window:</strong> There’s a brief period between the deletion and the new point’s ingestion where the data might be temporarily absent or inconsistent if queried. Might require robust error handling and transactional logic to maintain data integrity.</li><li><strong>Flux for Deletion:</strong> Deletion operations are typically performed via Flux, which might require separate client calls or integration patterns compared to standard line protocol writes.</li></ul><h4><strong>2. Soft Deletion via Field Modification</strong></h4><p>This approach avoids explicit deletion by marking older points as inactive and inserting new ones.</p><p><strong><em>Mechanism</em></strong></p><p><strong>Read:</strong> Retrieve the existing point(s) that require modification.</p><p><strong>Write Modified Point:</strong> Ingest a new point based on the original, but with the fields intended for update set to a null equivalent (e.g., <em>0</em> for numerical fields, an empty string <em>“”</em> for string fields).</p><p><strong>Write New Point:</strong> Ingest a second new point containing the updated field values and potentially new tags.</p><p><strong>Exclusion Key:</strong> To prevent the “soft-deleted” point from impacting aggregations, a new field (e.g.,<em> is_active: false</em> or <em>status: ‘deprecated’</em>) can be added to the modified point. Subsequent queries would then filter out inactive points based on this key.</p><p><strong><em>Technical Considerations</em></strong></p><ul><li><strong>Increased Storage Footprint:</strong> This method effectively doubles the storage consumption for each logical “update” as both the “modified” and “new” points persist.</li><li><strong>Query Complexity:</strong> Queries become more intricate, requiring explicit filtering logic (e.g., <em>|&gt; filter(fn: (r) =&gt; r.is_active == true)</em>) to exclude the soft-deleted data.</li></ul><h4><strong>3. Tombstoning with Versioning</strong></h4><p>Similar to soft deletion, this method uses a field to indicate the validity of a data point, focusing on versioning or status.</p><p><strong><em>Mechanism</em></strong></p><p>Introduce a field (e.g., <em>version: N</em> or <em>status: ‘active’/’superseded’</em>) within the data point. When an update occurs, a new point is written with an incremented version number or an ‘<em>active</em>’ status, while the older point retains its original version/status. Queries are designed to always select the latest version or ‘active’ status.</p><p><strong><em>Technical Considerations</em></strong></p><ul><li><strong>Grouping Ambiguity:</strong> This method can lead to issues when performing GROUP BY operations on shared tags, potentially resulting in duplicate results if both the “tombstoned” and “active” points match the grouping criteria without proper filtering.</li><li><strong>More Data, Again:</strong> Like soft deletion, you’re keeping all the old versions, which means more storage.</li><li><strong>Query Sophistication:</strong> Queries need to incorporate <em>GROUP BY</em> and <em>SORT</em> clauses, often with <em>LIMIT 1</em> or <em>last()</em> functions, to ensure only the most recent or active version of a point is considered.</li></ul><h4><strong>4. Asynchronous Updates via Scheduled Tasks</strong></h4><p>This approach decouples the update request from its immediate execution by using a separate mechanism for processing.</p><p><strong><em>Mechanism</em></strong></p><p><strong>Update Queue:</strong> Store update configurations (e.g., bucket, measurement, tag key/value for the target point, new field values) in a dedicated persistent store (e.g., a separate InfluxDB measurement acting as a queue, or an external message queue).</p><p><strong>Scheduled Task:</strong> Configure an InfluxDB task or an external cron job/service to periodically read from this update queue.</p><p><strong>Execution and Cleanup:</strong> The scheduled task performs the Read, Delete, and Write operations on the target measurements based on the queued configurations. Upon successful completion, the entry is cleared from the queue.</p><p><strong><em>Technical Considerations</em></strong></p><ul><li><strong>Resource Heavy:</strong> Running periodic tasks, especially those involving multiple database operations, can be computationally expensive and consume InfluxDB resources. Task frequency and complexity need careful tuning to prevent performance degradation.</li><li><strong>Update Latency:</strong> Updates are not real-time; they are processed based on the task’s schedule, introducing a delay between the update request and its application. This makes it unsuitable for low-latency update requirements.</li><li><strong>Operational Overhead:</strong> Requires additional infrastructure or Flux script management for task scheduling, error handling, and retry logic to ensure eventual consistency.</li></ul><p>Each of these strategies presents a unique set of trade-offs regarding performance, data consistency, storage efficiency, and operational complexity, and you have to pick your poison. Although, the best-way depends heavily on your application requirements, data volume, update frequency, and acceptable latency thresholds. Adios!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64dc7199a65d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handling multiple outputs from a datastream in Flink stream processor]]></title>
            <link>https://medium.com/@susmetaa01/handling-multiple-outputs-from-a-datastream-in-flink-stream-processor-a491e185a762?source=rss-e3e0d70681c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a491e185a762</guid>
            <category><![CDATA[data-stream-processing]]></category>
            <category><![CDATA[side-output]]></category>
            <category><![CDATA[flink]]></category>
            <category><![CDATA[parallelism]]></category>
            <category><![CDATA[fault-tolerance]]></category>
            <dc:creator><![CDATA[Susmeta Anandhan]]></dc:creator>
            <pubDate>Thu, 31 Oct 2024 17:46:23 GMT</pubDate>
            <atom:updated>2024-10-31T17:46:23.098Z</atom:updated>
            <content:encoded><![CDATA[<p>Flink Processor is a super-powerful engine that can handle huge amounts of data in real-time, with lightning-fast processing speeds and many other awesome features.</p><p>However, it has been challenging to fetch more than one output from a data stream. Although Flink auto- handles errors and reprocesses failed events, what if we want to define custom logic to process these events, or fetch two outputs from the same data stream and process them separately in the same Flink job?</p><p>Using <strong>SideOutputs</strong> is the go-to solution. This feature by Flink SPP enables emitting additional streams of data from a single processing stream. It basically means that you can split your data stream into multiple streams based on certain conditions.</p><p>Fun fact: you can create as many side outputs as necessary, and the types of these outputs do not need to match the main stream output or any other Side Output.</p><p>So, how do we achieve this?</p><h3>Define the SideOutputs</h3><p>Define the sideoutputs at the main class. Since there can be multiple sideoutputs in the same flink job, include the <em>&lt;OutputTag&gt;</em> to identify a specific side output stream.</p><pre>public static void main(String[] args) throws Exception{<br> ....<br>  OutputTag&lt;outputType&gt; sideoutput1 = new OutputTag&lt;outputType&gt;(&quot;outputTag1&quot;) {};<br>  OutputTag&lt;outputType&gt; sideoutput2 = new OutputTag&lt;outputType&gt;(&quot;outputTag2&quot;) {};<br>  ....<br>}</pre><h3>Publish events to the side output</h3><p>Use the Context parameter of flink to publish the events to the specific side output stream from the processing methods.</p><pre>@Override<br>public void processElement(ProcessFunction&lt;inputType, outputType&gt;.Context context,Collector&lt;outputType&gt; collector) {<br>   .....<br>  context.output(sideoutput1, payload1);<br>  context.output(sideoutput2, payload2);<br>}</pre><h3>Accessing the side output streams</h3><p>Use the <em>getSideOutput</em> method to access the contents of the side output. To retrieve the side outputs of multiple data streams, use the <em>union()</em> operation.</p><pre>DataStream&lt;InputType&gt; eventData = event.process(new EventDataMapper(failedEventTag));<br><br>DataStream&lt;outputType&gt; eventSO1 =<br>       ((SingleOutputStreamOperator&lt;inputType&gt;) eventData).getSideOutput(sideoutput1);<br><br>DataStream&lt;outputType&gt; eventSO2 =<br>       ((SingleOutputStreamOperator&lt;inputType&gt;) eventData).getSideOutput(sideoutput2);`</pre><p>PS: Sideoutputs can only be used with these specific flink methods:</p><ol><li>ProcessFunction</li></ol><p>2. KeyedProcessFunction</p><p>3. CoProcessFunction</p><p>4. KeyedCoProcessFunction</p><p>5. ProcessWindowFunction</p><p>6. ProcessAllWindowFunction</p><h3>Code</h3><pre>public static void main(String[] args) throws Exception{<br> ....<br>  //defining the sideOutput<br>  OutputTag&lt;outputType&gt; sideoutput1 = new OutputTag&lt;outputType&gt;(&quot;outputTag1&quot;) {};<br>  OutputTag&lt;outputType&gt; sideoutput2 = new OutputTag&lt;outputType&gt;(&quot;outputTag2&quot;) {};<br>  ....<br>  //accessing the contents of the sideoutput<br>  <br>  DataStream&lt;InputType&gt; eventData = event.process(new processFunction1(sideoutput1));<br>  <br>  DataStream&lt;outputType&gt; eventSO1 =<br>         ((SingleOutputStreamOperator&lt;inputType&gt;) eventData).getSideOutput(sideoutput1);<br>  <br>  DataStream&lt;outputType&gt; eventSO2 =<br>         ((SingleOutputStreamOperator&lt;inputType&gt;) eventData).getSideOutput(sideoutput2);<br>  <br>  ....<br>  //union operation on sideOutputs<br>  <br>  DataStream&lt;outputType&gt; eventSO1_1 =<br>         ((SingleOutputStreamOperator&lt;inputType&gt;) eventData1).getSideOutput(sideoutput1);<br>  <br>  DataStream&lt;outputType&gt; eventSO1_2 =<br>         ((SingleOutputStreamOperator&lt;inputType&gt;) eventData2).getSideOutput(sideoutput1);<br>  <br>  DataStream&lt;outputType&gt; combinedFailedEvents = eventSO1_1.union(eventSO1_2);<br>  combinedFailedEvents.map(sideoutput1 -&gt; {<br>             return sideoutput1;<br>         });<br>  ....<br>}</pre><blockquote><a href="https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/side_output/"><em>https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/side_output/</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a491e185a762" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>