<?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 Pranay Bhatnagar on Medium]]></title>
        <description><![CDATA[Stories by Pranay Bhatnagar on Medium]]></description>
        <link>https://medium.com/@pranaybhatnagar2025?source=rss-678c35ffda59------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sCle1im0Wfui0gGzLq6DHQ.jpeg</url>
            <title>Stories by Pranay Bhatnagar on Medium</title>
            <link>https://medium.com/@pranaybhatnagar2025?source=rss-678c35ffda59------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 19:50:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pranaybhatnagar2025/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[Why My OCR Stack Changed 5 Times?]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/why-my-ocr-stack-changed-5-times-07284a13b749?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/07284a13b749</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[tesseract]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 09:10:00 GMT</pubDate>
            <atom:updated>2026-01-22T09:10:00.435Z</atom:updated>
            <content:encoded><![CDATA[<h3>And Why “Good Enough” OCR Almost Killed The Product</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4KwKsqY88gL032gtjaEjw.png" /></figure><p>OCR always looks easy at the beginning. You point it at a PDF, text comes out, and for a brief, dangerous moment, it feels like the problem is solved.</p><p>Then the real documents arrive, scanned, rotated, multi-columned, half-digital, half-image, occasionally upside down, and the confidence evaporates. This is usually the stage where phrases like “edge case” and “good enough” enter the conversation, only to become architectural decisions quietly.</p><p>What follows is not an OCR implementation, but a slow education in why documents are adversarial by default and why extracting text was never the actual problem.</p><h3>1. The Comfortable Lie About OCR</h3><p>There is a comforting belief among engineers that OCR is a solved problem.</p><p>The logic typically follows this sequence: PDFs contain text, OCR engines exist, and modern machine learning has been sufficiently developed to handle this task reliably. On the surface, this sounds reasonable. In practice, it is deeply misleading.</p><p>OCR is effectively solved only for a very narrow slice of reality: clean documents, digitally generated PDFs with single-column layouts, minimal font variation, low overall document volume, and no downstream systems that depend on precise layout or structural accuracy.</p><p>The moment you step outside this bubble, OCR stops being a text extraction problem and turns into a <strong>systems problem</strong>.</p><p>Real-world documents are rarely homogeneous. They contain:</p><ul><li>Scanned pages mixed with embedded text</li><li>Tables alongside free-form paragraphs</li><li>Diagrams, engineering drawings, stamps, and handwritten annotations</li><li>Inconsistent DPI, skew, and compression artifacts</li></ul><p>At that point, OCR is no longer just about <em>getting text out</em> of a document; it becomes a process focused on preserving the correct reading order, maintaining the spatial relationships between elements on the page, accurately identifying semantic regions such as headers, tables, and body text, and producing structured output that downstream systems can reliably trust and build upon.</p><p>The most dangerous thing about OCR is that it often <strong>fails quietly</strong>.<br> It produces output that <em>looks</em> correct at a glance but is structurally wrong underneath. And structural correctness matters far more than raw character accuracy once OCR feeds into search, analytics, or GenAI pipelines.</p><p>This is why OCR is often underestimated. The failure modes do not announce themselves immediately. They surface later, at scale, when users depend on the extracted data and systems begin making decisions based on it.</p><p>OCR isn’t “hard” because the models are weak.<br>It’s hard because documents are adversarial by nature.</p><h3>2. When the First OCR Stack “Worked” (But Only in Theory)</h3><p>Like many engineers, I started with <strong>Tesseract</strong>.</p><p>On the surface, it feels like the obvious choice because it is open source, easy to integrate, offers reasonable accuracy on clean text, and is well-documented and widely used across the industry.</p><p>For small-scale experimentation, Tesseract performs adequately. If you feed it high-quality scanned pages or digitally generated PDFs with minimal layout complexity, it delivers results that inspire confidence.</p><p>This is where the trap lies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oosYY_H_G9t-w-Xp2066Zw.png" /></figure><h4>2.1 Why Tesseract Looks Good Initially</h4><p>Tesseract truly shines in controlled environments where the text is in a single language, layout variation is minimal, page counts are low, and CPU-only execution is sufficient to feel “fast enough” for the task at hand.</p><p>Early tests often involve only a handful of PDFs, maybe a few hundred pages at most, and at this scale, latency is tolerable, errors can be manually corrected, and performance bottlenecks remain effectively invisible.</p><p>This creates a false sense of readiness.</p><h4>2.2 What Breaks When Reality Enters</h4><p>The moment document volume increases and layouts become complex, Tesseract’s limitations surface aggressively.</p><h4>A. CPU-Bound Architecture</h4><p>Tesseract does not leverage GPU acceleration, so every page is processed sequentially on the CPU, and scaling effectively comes down to adding more machines, increasing queue wait times, and accepting linear cost growth as document volume increases.</p><p>With thousands of pages, throughput becomes the bottleneck. At tens of thousands, it becomes a blocker.</p><h4>B. Poor Performance on Complex Layouts</h4><p>Tesseract struggles significantly when faced with multi-column documents, tables with merged or irregular cells, engineering drawings and diagrams, and pages that contain a mixture of text and image content within the same layout.</p><p>Its layout analysis is limited, which means:</p><ul><li>Reading order breaks</li><li>Text from different regions gets merged incorrectly</li><li>Bounding boxes become unreliable</li></ul><p>The output may still contain “correct text,” but its <strong>context is corrupted</strong>.</p><h4>C. Scaling Reveals Latency, Not Accuracy</h4><p>Accuracy degradation is not always the first issue you notice. Performance is.</p><p>At scale, Tesseract becomes painfully slow, and processing pipelines that worked during testing suddenly fall behind ingestion rates, accumulate growing backlogs, and introduce unpredictable and inconsistent processing times.</p><p>This isn’t just an engineering inconvenience; it becomes a <strong>product risk</strong>.</p><h4>D. No Real Concept of Production-Grade Structure</h4><p>Tesseract was never designed to be a document intelligence system. It extracts text; it does not truly understand documents.</p><p>Once you reach a point where you need reliable bounding boxes, stable layout hierarchies, and consistent structural output across different document types, the limitations become impossible to ignore.</p><p>You are forced to bolt on additional logic, heuristics, post-processing rules, and custom fixes. Each fix introduces fragility, and the system becomes harder to reason about over time.</p><h4>2.3 The Core Realization</h4><p>Tesseract didn’t fail because it’s a bad tool.<br> It failed because it was being asked to solve a problem it was never designed for.</p><p>The stack “worked” in theory, during early validation and controlled testing.<br>In production conditions, it exposed a fundamental truth:</p><blockquote>OCR systems don’t fail at small scale.<br>They fail when consistency, speed, and structure start to matter.</blockquote><p>This was the first lesson in a much longer journey, and it set the pattern for every stack change that followed.</p><h3>3. Five Stack Changes, One Brutal Pattern</h3><p>After Tesseract, the instinctive reaction was not to abandon OCR — it was to <strong>optimize it</strong>.</p><p>The assumption was simple:</p><blockquote>The problem isn’t OCR itself. It’s the specific tool.</blockquote><p>That assumption led to a pattern that repeated itself five times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-kjIDpXKlf3DZ6DoAhvd0w.png" /></figure><h4>Phase 1: Speed Becomes the First Constraint</h4><p>When throughput became unacceptable, the focus shifted to performance-oriented OCR engines. Tools like <strong>PaddleOCR</strong> immediately felt like a step forward.</p><ul><li>Faster inference</li><li>Better handling of scanned pages</li><li>Cleaner results under load</li></ul><p>At a moderate scale, this solved the latency problem. Pages moved faster. Pipelines cleared queues more reliably.</p><p>But speed exposed the next bottleneck.</p><h4>Phase 2: Structure Starts to Matter More Than Text</h4><p>As documents became more complex, ranging from invoices and schedules to detailed engineering specifications, raw text extraction was no longer sufficient. The system now required accurate bounding boxes, a stable and reliable reading order, and predictable grouping of text blocks to ensure the output could be meaningfully interpreted and consistently used downstream.</p><p>This is where performance-focused OCR systems began to struggle. They were excellent at <strong>recognizing characters</strong>, but inconsistent at <strong>preserving structure</strong>.</p><p>In structured documents, this distinction is critical. A table where rows drift, or columns collapse, is worse than missing text entirely, because downstream systems assume correctness.</p><h4>Phase 3: PDFs Are Not Always Text (And That Changes Everything)</h4><p>The next realization came from PDFs themselves.</p><p>Libraries like PyMuPDF initially seem promising because they bypass OCR entirely for digital PDFs, allowing text to be extracted directly from the document’s internal structure in a way that is extremely fast, highly accurate, and very cheap to run at scale.</p><p>Until the moment images appear.</p><p>Most real-world PDFs are hybrids, where some pages are fully digital, others are scanned images, and many contain embedded images with overlaid or partially extractable text, making uniform processing far more complex than it initially appears.</p><p>At that point, the extraction pipelines fracture. You are forced to:</p><ul><li>Detect page types</li><li>Branch logic</li><li>Merge OCR and non-OCR outputs</li></ul><p>Each merge introduces inconsistency. Text alignment shifts. Bounding boxes no longer share a common coordinate system. The output becomes brittle.</p><h4>Phase 4: Accuracy Improves, Costs Explode</h4><p>Layout-aware systems finally solved what earlier tools could not: <strong>document understanding</strong>.</p><p>Region detection worked.<br>Tables stayed intact.<br>Reading order stabilized.</p><p>But this introduced a different constraint, <strong>economic viability</strong>.</p><p>Per-page pricing that seems reasonable at low volume becomes untenable at scale. What looked like a technical win revealed itself as a business liability.</p><h4>Phase 5: Stability Becomes the Primary Metric</h4><p>The final stack didn’t win because it was perfect.<br>It won because it was <strong>predictable</strong>.</p><ul><li>Stable structure across document types</li><li>Consistent performance at scale</li><li>Fewer edge-case heuristics</li><li>Less post-processing glue code</li></ul><p>The pattern was impossible to ignore:</p><blockquote>Each stack failed at a different layer of the system,<br>and each failure only surfaced when the product depended on it.</blockquote><p>This wasn’t tool hopping.<br>It was requirement discovery, one painful lesson at a time.</p><h3>4. The “Good Enough” OCR Fallacy</h3><p>This is where most OCR discussions lose the plot.</p><p>Accuracy metrics, 90%, 95%, even 98%, sound impressive. They are also deeply misleading.</p><p>OCR does not fail uniformly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i1p-SOQTqx63fHidfSEgNw.png" /></figure><h4>4.1 Why High Accuracy Can Still Be a Failure</h4><p>OCR errors tend to cluster around the most sensitive parts of documents, headers that define context, tables where structure matters more than text, numerical fields where a single character can change meaning, and small but semantically critical text that downstream systems rely on for correctness.</p><p>In isolation, a missing character is trivial. In context, it can invalidate an entire document.</p><p>Examples:</p><ul><li>A single-digit misread in a quantity column</li><li>A bounding box shift that moves a value to the wrong row</li><li>A section header merged into body text, breaking hierarchy</li></ul><p>The OCR output may look “mostly correct,” but <strong>the document is no longer trustworthy</strong>.</p><h4>4.2 Structure &gt; Text</h4><p>Once OCR output starts feeding into search indexes, rule-based extractors, analytics pipelines, and GenAI summarization systems, structural integrity becomes far more important than sheer textual perfection, because downstream reliability depends on consistent layout, hierarchy, and relationships rather than flawless character-level accuracy.</p><p>A system can tolerate missing words.<br>It cannot tolerate misplaced meaning.</p><h4>4.3 Why “Good Enough” Is a Product Risk</h4><p>Users rarely complain about OCR quality in explicit terms; instead, they say things like “the numbers don’t match,” “this export feels off,” or “I don’t trust this output.” These reactions aren’t really about raw accuracy at the character level, they’re signals of broken confidence, where small structural or semantic inconsistencies undermine trust in the entire system.</p><p>And confidence, once lost, is almost impossible to recover.</p><p>The most dangerous OCR systems are not the ones that crash.<br>They are the ones that silently corrupt trust.</p><h4>4.4 The Hard Truth</h4><p>“Good enough” OCR tends to optimize for faster demos, lower upfront costs, and early validation metrics that make a system look successful in the short term, but production-grade systems optimize for consistency, predictability, and, above all, sustained user trust over time.</p><p>These goals are often in direct conflict.</p><blockquote>In OCR-heavy products, accuracy is a baseline.<br>Trust is the real success metric.</blockquote><h3>5. How Bad OCR Quietly Destroys Products</h3><p>The most dangerous aspect of OCR failure is not incorrect text.</p><p>It is <strong>downstream amplification</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pzzM5iyB-QYiRHcu0jDqWQ.png" /></figure><p>OCR systems rarely exist in isolation. Once deployed, their output becomes an upstream dependency for multiple layers of a product:</p><ul><li>Search and indexing</li><li>Rule-based extraction</li><li>Analytics pipelines</li><li>GenAI summarization and reasoning</li><li>User-facing exports and reports</li></ul><p>When OCR output is structurally incorrect, every dependent system inherits that error, often without visibility into its origin.</p><h4>5.1 Error Propagation Is Non-Linear</h4><p>A single OCR mistake does not remain a single mistake.</p><p>Examples:</p><ul><li>A misaligned bounding box in a table causes column values to shift</li><li>Shifted columns break deterministic parsers</li><li>Broken parsers feed incorrect context to LLMs</li><li>LLMs confidently generate summaries from corrupted input</li></ul><p>At no point does the system “fail.”<br>It continues to function, just incorrectly.</p><p>This makes debugging extremely difficult because the symptom appears far removed from the cause: users report incorrect summaries, engineers end up inspecting GenAI prompts, and only later does it become clear that the root cause actually lives several layers upstream in flawed OCR layout extraction.</p><h4>5.2 Search and Retrieval Degrade First</h4><p>Search systems are often the first visible casualty.</p><p>OCR noise introduces issues such as token fragmentation, broken word boundaries, and incorrect positional metadata, and as a result, relevant documents stop ranking correctly, keyword matches begin to feel inconsistent, and users gradually lose confidence in even the most basic retrieval and search functionality.</p><p>Search does not crash.<br>It simply becomes unreliable.</p><h4>5.3 GenAI Makes the Problem Worse, Not Better</h4><p>There is a common assumption that LLMs can “clean up” OCR output.</p><p>In reality:</p><ul><li>LLMs assume the input is semantically coherent</li><li>They do not understand document geometry</li><li>They cannot infer missing structure reliably</li></ul><p>Poor OCR output causes LLMs to hallucinate with confidence.<br>This is more damaging than missing data, because it produces <strong>plausible but incorrect answers</strong>.</p><p>Bad OCR turns GenAI from an assistant into a liability.</p><h4>5.4 The Silent Metric That Actually Moves</h4><p>What ultimately degrades is not accuracy; it is <strong>trust latency</strong>.</p><ul><li>Users double-check outputs</li><li>Teams stop relying on automation</li><li>Manual verification creeps back in</li><li>The product loses its leverage</li></ul><p>No error logs capture this.<br>No alert fires.</p><blockquote>Products rarely die from visible OCR failures.<br>They die from accumulated doubt.</blockquote><h3>6. Why OCR Stacks Keep Changing (And That’s Not a Failure)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*djwMttSuzP-46cRQ5svcmw.png" /></figure><p>OCR stack churn is often framed as poor decision-making.</p><p>In reality, it is a <strong>signal of evolving requirements</strong>.</p><h4>6.1 OCR Requirements Are Not Static</h4><p>Early-stage systems tend to optimize for proof of concept, rapid time to first result, and minimal infrastructure complexity, whereas production systems are designed to optimize for deterministic behavior, reliable throughput under load, and structural stability across a wide range of document types.</p><p>The OCR stack that satisfies the first set of requirements is seldom sufficient for the second.</p><h4>6.2 Scale Reveals New Classes of Failure</h4><p>Certain OCR problems only appear at scale:</p><ul><li>Rare layout edge cases</li><li>Long-tail font and scan quality issues</li><li>Performance cliffs under concurrency</li><li>Cost inflection points tied to volume</li></ul><p>These are not solvable through better tuning.<br>They require <strong>architectural change</strong>.</p><h4>6.3 Document Diversity Forces Adaptation</h4><p>As products mature, document diversity inevitably increases, driven by onboarding more customers, expanding into new geographies, supporting a wider range of formats, and inheriting growing volumes of legacy data that were never designed with automation in mind.</p><p>An OCR system optimized for a narrow distribution will fail as that distribution widens.</p><p>Stack changes are not unstable.<br>They are adaptations.</p><h4>6.4 The Stabilization Point Is the Product, Not the OCR</h4><p>OCR stacks stop changing only when:</p><ul><li>Input data stabilizes</li><li>Business rules solidify</li><li>Output contracts become strict</li><li>Trust becomes non-negotiable</li></ul><p>Until then, iteration is inevitable.</p><blockquote>OCR stacks do not converge early.<br>They converge only after the product understands itself.</blockquote><p>Recognizing this early fundamentally changes how systems are designed, pushing teams toward modular pipelines, clear abstraction boundaries between stages, explicit handling of uncertainty at each layer, and far fewer assumptions that the initial architecture will ever be “final.”</p><p>Iteration stops being reactive and becomes intentional.</p><h3>7. What I’d Do Differently If I Started Again</h3><p>If I were to rebuild an OCR-heavy system from scratch today, I would make fewer assumptions and design for failure much earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nlWNnSJvsRnFJDA4xDUD9w.png" /></figure><h4>7.1 Treat OCR as Infrastructure, Not a Feature</h4><p>OCR should not live as a peripheral utility. It is foundational infrastructure.</p><p>That means defining clear contracts around output formats and guarantees, versioning OCR outputs as schemas evolve, and making OCR failures explicit and observable rather than allowing them to remain hidden and implicit within downstream systems.</p><p>When OCR is treated as a feature, its limitations surface too late.</p><h4>7.2 Optimize for Structural Correctness First</h4><p>Character-level accuracy is easy to measure and tempting to optimize.<br>Structural correctness is harder to quantify, and far more important.</p><p>If structure fails, tables collapse, sections lose their hierarchy, and downstream systems lose critical context, which is why I would prioritize stable bounding boxes, a deterministic and repeatable reading order, and consistent classification of regions across documents.</p><p>Even at the cost of slightly lower raw text accuracy.</p><h4>7.3 Design for Correction, Not Perfection</h4><p>No OCR system is perfect.</p><p>Instead of chasing an unattainable notion of perfect accuracy, I would focus on building feedback loops for correction, allowing human-in-the-loop validation where the stakes are high, and explicitly tracking confidence and uncertainty throughout the pipeline so downstream systems can make informed decisions.</p><p>Systems that admit uncertainty are more reliable than systems that pretend it does not exist.</p><h4>7.4 Budget for Iteration Upfront</h4><p>OCR evolution is not a sign of failure; it is a cost of reality.</p><p>I would plan from the outset for multiple stack revisions, enable controlled experimentation as assumptions are tested, and favor modular replacements over large, risky rewrites as the system evolves.</p><p>The mistake is not changing the stack.<br>The mistake is pretending it will not need to change.</p><h3>8. OCR Is Never “Just OCR.”</h3><p>OCR looks deceptively simple because the output is text.</p><p>But the real output of OCR systems is <strong>trust</strong>.</p><p>Trust ultimately comes down to confidence that a number belongs to the correct row, that a section heading truly represents the content beneath it, and that a generated summary faithfully reflects the intent and facts of the original document rather than a distorted or misaligned interpretation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zre4qDt3MgQZjessYY_9lg.png" /></figure><p>When OCR fails, it rarely fails loudly.<br>It erodes trust incrementally, invisibly, and irreversibly.</p><p>This journey taught me that OCR is not a preprocessing step.<br>It is a <strong>contract between messy human documents and deterministic systems</strong>.</p><p>Surviving that contract requires patience with imperfect data, humility in system design, and a deep respect for just how chaotic and unpredictable real-world documents truly are.</p><p>OCR is formatting chaos, layout unpredictability, and long-tail edge cases disguised as text extraction.</p><p>Learning that the hard way made me a better engineer, not because I found the “right” tool, but because I stopped believing there was one.</p><p>So yes, OCR <em>is</em> “just OCR”, until a table drifts by two pixels, a number lands in the wrong column, a summary confidently hallucinates, and suddenly everyone is in a meeting asking why the system can’t be trusted. At that point, the problem is no longer text extraction, performance tuning, or model choice.</p><p>It’s damage control.</p><p>OCR doesn’t fail loudly or heroically; it succeeds just enough to pass demos and quietly undermine production.</p><p>And if this journey taught me anything, it’s that PDFs are not documents; they’re stress tests wearing a file extension.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07284a13b749" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If You Think Celery Is a Queue, This Article Is for You]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/if-you-think-celery-is-a-queue-this-article-is-for-you-02be81b361e6?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/02be81b361e6</guid>
            <category><![CDATA[production]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[celery]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Tue, 16 Dec 2025 11:58:37 GMT</pubDate>
            <atom:updated>2025-12-16T11:58:37.724Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>The Celery, Redis, and RabbitMQ Confusion That Breaks the System</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ckdYXT298YnYSomkSyB5Gw.png" /></figure><p>Celery is one of those tools that almost everyone uses before they fully understand it. It works beautifully in development, passes tests, and quietly ships to production with a mental model that feels “good enough.” <em>Until one day, tasks disappear, retries behave strangely, or a restart changes system behavior in ways no one can explain.</em></p><p>This article is not about Celery APIs or setup. It’s about fixing the mental model that breaks systems long before code does.</p><h3>1. The Misconception That Starts It All</h3><p>Most developers meet Celery the same way: through a single line of code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rbj1BTaegrNyS0uBn5p7HA.png" /></figure><p>It feels intuitive.<br>You call .delay(), the function runs in the background, and your API responds instantly. The task executes, logs appear, and everything looks exactly like what you’d expect from a queue. Naturally, a conclusion forms:</p><blockquote><em>“Celery is the queue.”</em></blockquote><p>This assumption isn’t careless; it’s reinforced by experience. In local development, Redis is running, workers are alive, and tasks are executed almost immediately. There’s no visible separation between <em>sending</em> a task and <em>executing</em> it. The system feels atomic.</p><p>But this is where the misunderstanding quietly hardens.</p><p>In reality, what just happened was <em>not</em> “Celery queued a task.”<br>What happened was:</p><ul><li>Celery serialized a task message</li><li>Sent it to a broker</li><li>A worker pulled it</li><li>Executed it</li><li>Optionally stored a result elsewhere</li></ul><p>Those steps are invisible at first, so the brain compresses them into a single concept: <em>queue</em>.</p><p>The problem is that this compressed model survives into production.</p><p>When developers scale Celery, they scale workers.<br>When tasks disappear, they restart workers.<br>When retries behave oddly, they tweak Celery configs.</p><p>And for a while, this works, mostly because the system hasn’t failed <em>yet</em>.</p><p>The misconception only reveals itself under specific conditions:</p><ul><li>a broker restart</li><li>A worker crashes mid-task</li><li>network partitions</li><li>memory pressure</li><li>high throughput with slow consumers</li></ul><p>Suddenly, tasks are “lost,” duplicated, or delayed indefinitely. Logs look clean. Celery reports tasks as sent. Workers appear healthy. And the first instinct is almost always the same:</p><blockquote><em>“Celery is unreliable.”</em></blockquote><p>But Celery didn’t lose your task.<br>Celery never <em>owned</em> it in the first place.</p><p>This is the dangerous part of the misconception: once you believe Celery <em>is</em> the queue, you stop thinking about delivery guarantees, durability, acknowledgements, and back-pressure. You assume retries imply safety. You assume .delay() implies persistence. You assume scaling workers improves reliability.</p><p>In development, these assumptions go unchallenged.<br>In production, they fail silently.</p><p>And by the time the failure is visible, the system is already architecturally confused, because the wrong component was trusted with the wrong responsibility.</p><p>This article starts here because every other problem, Redis task loss, RabbitMQ tuning, retry storms, ghost tasks, traces back to this single misunderstanding.</p><blockquote>“Celery is not the queue.”<br>And until that distinction is clear, the system will never behave predictably.</blockquote><h3>2. What Celery Actually Does (And Why It Gets Blamed Anyway)</h3><p>Let’s simplify this first, because Celery has been carrying a lot of undeserved blame for years.</p><h4>2.1 The simplest truth</h4><p>Celery does <strong>one job</strong>:</p><blockquote><em>“It </em><strong><em>executes tasks</em></strong><em> when someone hands those tasks to it.”</em></blockquote><p>That’s it.</p><p>Celery does <strong>not</strong>:</p><ul><li>store tasks permanently</li><li>guarantee delivery</li><li>decide durability</li><li>protect you from crashes</li><li>remember things forever</li></ul><p>Celery is not a warehouse.<br>Celery is not a post office.<br>Celery is not your memory.</p><p>Celery is closer to a <strong>delivery person who only works when someone gives them a package</strong>.</p><h4>2.2 A real-life example (with honesty)</h4><p>Imagine this system:</p><ul><li><strong>You</strong> → API</li><li><strong>Redis / RabbitMQ</strong> → Courier company</li><li><strong>Celery Worker</strong> → Delivery guy on a bike</li></ul><p>Now imagine you say:</p><blockquote><em>“I gave the delivery guy the package, so it must be safe.”</em></blockquote><p>No.<br>You gave the <em>courier company</em> the package.<br>The delivery guy just shows up, picks it up, and delivers it.</p><p>If:</p><ul><li>The courier warehouse burns down</li><li>The package was never logged properly</li><li>The label fell off</li><li>The warehouse restarts without records</li></ul><p>…the delivery guy didn’t lose your package.</p><p>He never owned it.</p><p>Yet in production, we yell at Celery anyway.</p><h4>2.3 What actually happens when a Celery worker starts</h4><p>When a worker boots up, it does something very boring (and very important):</p><ol><li>Connects to the broker</li><li>Subscribes to queues</li><li>Waits</li><li>Receives a message</li><li>Executes the task</li><li>Acknowledges completion (or failure)</li></ol><p>That’s it.<br>There is no task memory.<br>There is no task backlog inside Celery.<br>There is no “queue” inside the worker.</p><p>If the worker dies mid-task:</p><ul><li>Celery didn’t “lose” anything</li><li>The broker decides what happens next</li></ul><p><em>This distinction matters more than most people realize.</em></p><h4>2.4 Why Celery still gets blamed</h4><p>Because from the developer’s point of view, <strong>Celery is the visible thing</strong>.</p><p>When something breaks:</p><ul><li>Redis is invisible</li><li>RabbitMQ is “some infra thing.”</li><li>Celery logs are right there, screaming at you</li></ul><p>So, Celery becomes the scapegoat.</p><p>It’s like blaming the waiter because the kitchen ran out of gas.</p><h4>2.5 A realistic (and slightly complex) task example</h4><p>Let’s look at a task that <em>feels</em> like Celery owns everything, but doesn’t.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wG4v38htx2DfHVhsb5OxkQ.png" /></figure><p>This task looks serious:</p><ul><li>retries</li><li>backoff</li><li>late acknowledgements</li><li>complex logic</li></ul><p>But notice something important:</p><ul><li>If Redis loses the message</li><li>If RabbitMQ restarts without persistence</li><li>If the broker connection drops before the ack</li></ul><p>Celery never even <em>sees</em> the task.</p><p>And if the worker crashes halfway through:</p><ul><li>Celery didn’t forget</li><li>The broker decides whether the task comes back</li></ul><p>Celery executes.<br>The broker decides fate.</p><h4>2.6 The funny-but-painful truth</h4><p>Celery is like that one coworker who:</p><ul><li>does exactly what you ask</li><li>follows instructions precisely</li><li>never promises more than they can deliver</li></ul><p>But when the system breaks, everyone still says:</p><blockquote><em>“Haan yaar, Celery hi buggy hai.”</em></blockquote><p>Poor Celery.</p><h4>2.7 The key takeaways of this section</h4><p>Celery is:</p><ul><li>An <strong>execution engine</strong></li><li>A <strong>task consumer</strong></li><li>A <strong>worker coordinator</strong></li><li><em>Not a queue</em></li><li><em>Not a durability guarantee</em></li><li><em>Not a reliability layer</em></li></ul><p>Once this clicks, Redis and RabbitMQ stop feeling like configuration details and start feeling like architectural decisions.</p><p>And that’s exactly where things get interesting next.</p><h3>3. Why Redis and RabbitMQ Quietly Decide Your System’s Fate</h3><p>If Celery is the delivery guy, then <strong>Redis and RabbitMQ are the warehouse</strong>.<br>And yet, most systems treat the warehouse like a temporary parking spot.</p><p>Which is… bold.<br>Not recommended.<br>But extremely common.</p><h4>3.1 The uncomfortable truth</h4><p>Most production failures blamed on Celery are actually caused by the broker making a <em>very reasonable decision</em> that the developer didn’t know it was allowed to make.</p><p>Redis and RabbitMQ don’t “assist” Celery in the background; they actively decide how your system behaves under stress.</p><p>They determine whether a task survives a crash, whether it gets retried or silently dropped, whether it is delivered once or multiple times, and whether producers are forced to slow down or allowed to keep spamming the system.</p><p>In practice, most of the reliability characteristics people attribute to Celery are actually dictated by the broker’s behavior.</p><p>Celery just reacts.</p><p>Quietly. Obediently. Like a well-trained intern.</p><h4>3.2 A real-life example (that hurts a little)</h4><p>Imagine a restaurant:</p><ul><li><strong>API</strong> → waiter taking orders</li><li><strong>Broker</strong> → order board in the kitchen</li><li><strong>Celery workers</strong> → chefs</li></ul><p>Now imagine the kitchen uses:</p><ul><li>a <strong>whiteboard</strong> (Redis)</li><li>or a <strong>printed ticket system</strong> (RabbitMQ)</li></ul><p>Both work… until something goes wrong.</p><p>If the whiteboard gets wiped:</p><blockquote>“Sorry, we don’t remember what was ordered.”</blockquote><p>If the printer jams:</p><blockquote>“Orders are still there. We’ll resume.”</blockquote><p>Same chefs.<br>Same recipes.<br>Wildly different outcomes.</p><h4>3.3 Why Redis feels amazing at first</h4><p>Redis as a broker feels attractive because it is fast, simple, and low-latency, with almost zero friction to deploy and an extremely forgiving behavior in development environments. These qualities make systems appear reliable early on, often masking the deeper trade-offs around durability and delivery guarantees that only surface under real production failures.</p><p>It makes Celery feel magical.</p><p>You enqueue a task, it runs instantly, and you think:</p><blockquote>“Wow, this system is solid.”</blockquote><p>But Redis is in-memory by default.<br> And memory has… <strong><em>opinions.</em></strong></p><h4>3.4 Why RabbitMQ feels annoying but honest</h4><p>RabbitMQ is explicit, loud, and strict about how messages are handled, often verbose and occasionally irritating to work with, but that same rigidity is what makes its behavior predictable and trustworthy in production.</p><p>But it’s also very clear about what it promises and what it doesn’t.</p><p>It won’t pretend your message is safe unless you explicitly ask for it.</p><p>Which is annoying… until production day.</p><h4>3.5 Complex code example: producer side (where fate is sealed)</h4><p>This is where most people accidentally make reliability decisions without realizing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2QOXHOrzar24oJhFtru-gQ.png" /></figure><p>Looks responsible, right?</p><p><em>But here’s what you just silently decided:</em></p><ul><li><em>Messages live in memory</em></li><li><em>Persistence depends on Redis config</em></li><li><em>restarts may drop in-flight tasks</em></li><li><em>retries assume messages still exist</em></li></ul><p>Celery didn’t choose this.<br>You did, by choosing the broker.</p><h4>3.6 Same task, different fate (RabbitMQ)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QbSwErijwtKIBnVEEHKMDQ.png" /></figure><p><em>Now you’ve told the system:</em></p><ul><li><em>Don’t lose tasks on restart</em></li><li><em>Don’t overwhelm workers</em></li><li><em>Don’t lie about delivery</em></li><li><em>Block producers if the system is stressed</em></li></ul><p>Same Celery.<br>Completely different behavior.</p><h4>3.7 Why failures show up “randomly”</h4><p>This is the scary part.</p><p>Broker failures rarely look dramatic.</p><p>They look like:</p><ul><li>“task never ran.”</li><li>“Why did this run twice?”</li><li>“retry didn’t retry.”</li><li>“The queue was empty, but work vanished.”</li></ul><p>Nothing crashes.<br>No errors.<br>Everything <em>looks fine</em>.</p><p>And that’s why brokers decide your fate quietly.</p><h4>3.8 The joke that becomes painfully true</h4><p>People say:</p><blockquote>“Redis is fast, RabbitMQ is reliable.”</blockquote><p>The real truth is:</p><blockquote>“Redis is forgiving, RabbitMQ is honest.”</blockquote><p>And production prefers honesty.</p><h4>3.9 What this section wants you to internalize</h4><p>Celery executes tasks.<br>Redis and RabbitMQ <strong>decide what tasks exist</strong>.</p><p>Once you accept this separation, reliability conversations naturally move to the broker, retries stop feeling magical, system behavior becomes predictable, and Celery no longer feels unreliable; it simply does exactly what it was designed to do. And suddenly, your background jobs become… boring.</p><p>Which is the highest compliment in production systems…</p><h3>4. Redis as a Broker: Speed, Simplicity, and Silent Failure Modes</h3><p>Redis-backed Celery deployments are popular because they <em>minimize operational overhead and deliver extremely low latency under normal conditions</em>. As a broker, Redis uses <strong>in-memory data structures</strong> to store task messages, typically lists or streams depending on configuration, and relies heavily on client-side acknowledgement semantics. This design prioritizes throughput over durability, which introduces failure modes that are easy to overlook.</p><p>Redis does not provide native message acknowledgements in the same way as traditional message queues. Instead, Celery simulates acknowledgements using visibility timeouts and re-queuing logic. If a worker crashes after fetching a task but before acknowledging it, Redis relies on timeout-based recovery rather than explicit delivery guarantees. Under memory pressure, eviction policies such as volatile-lru or allkeys-lru can silently discard task messages, breaking delivery assumptions without raising errors.</p><p>Durability is entirely dependent on Redis persistence configuration. Without proper AOF or RDB settings, broker restarts can result in irreversible task loss. Even with persistence enabled, durability is asynchronous and may lag behind message publication, creating windows where acknowledged tasks still vanish after crashes.</p><h4>Redis broker configuration (non-trivial, production-oriented)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JnJxk5OasNdhryKxnQBZsA.png" /></figure><p>This configuration reduces task loss probability but does not eliminate it. Redis remains best suited for workloads where occasional message loss is acceptable, tasks are idempotent, and operational simplicity is prioritized over strict guarantees.</p><h3>5. RabbitMQ as a Broker: Durability, Back-Pressure, and Predictability</h3><p>RabbitMQ implements explicit message delivery semantics using durable queues, persistent messages, and acknowledgement-based consumption. Unlike Redis, message state is managed by the broker itself, not inferred by the client. Tasks are not removed from the queue until a consumer explicitly acknowledges successful processing, making crash recovery deterministic.</p><p>RabbitMQ enforces back-pressure by design. When queues grow or consumers slow down, producers are throttled through flow control mechanisms. This prevents memory exhaustion and forces systems to surface overload conditions early. Prefetch limits further constrain how many tasks a worker can reserve, preventing uneven task distribution and reducing retry storms during worker failures.</p><p>Durability guarantees are opt-in but explicit. When enabled, task messages are persisted to disk before acknowledgement, ensuring survival across broker restarts. The trade-off is higher latency and operational complexity, but the resulting system behavior remains stable and inspectable under failure conditions.</p><h4>RabbitMQ broker configuration (explicit and durable)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5UGlU3Y7eL1Vf8NUMaK5g.png" /></figure><p>With this setup, task delivery, retries, and failure recovery are broker-driven and observable. RabbitMQ is suited for systems where task loss is unacceptable, execution order matters, and operational transparency outweighs raw throughput.</p><h3>6. How a Task Actually Flows: From API Call to Worker Execution</h3><p>Let’s slow everything down and follow <strong>one task</strong>.<br>Not conceptually. Not abstractly.<br>But step by step, exactly as it happens in a real system.</p><p>Because once you <em>see</em> the flow, most Celery confusion permanently disappears.</p><h4>6.1 The story begins at the API</h4><p>A request hits your FastAPI service.</p><p>The endpoint is fast. Clean. Async.<br>It does what APIs are good at: validation, authorization, and orchestration.</p><p>Then you do this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_k3g9DkN7C_QGzIYl_JJg.png" /></figure><p>At this exact moment, <strong>nothing has executed</strong>.<br>No worker has started.<br>No CPU has been burned.<br>No task is “running”.</p><p>All that has happened is <strong>message creation</strong>.</p><p>Celery serializes:</p><ul><li>task name</li><li>arguments</li><li>headers</li><li>retry metadata</li><li>routing info</li></ul><p>And hands that message to the broker.</p><p>Celery is done for now.</p><h4>6.2 The broker takes over (this is where fate lives)</h4><p>The broker receives the message and decides what it means to <em>accept</em> it.</p><p>Depending on the broker:</p><ul><li>It may store it in memory</li><li>It may persist it to disk</li><li>It may replicate it</li><li>It may drop under pressure</li></ul><p>This is the first point where reliability is decided.</p><p>If the broker crashes <strong>before</strong> persistence:</p><ul><li>The task never existed</li><li>Celery never sees it again</li></ul><p>Your API has already returned 200 OK.</p><p>This is why .delay() isn’t a guarantee, it is a <em>request</em>.</p><h4>6.3 Workers are not waiting for you</h4><p>Celery workers are already running.</p><p>They are not tied to your API lifecycle.<br>They don’t know who triggered the task.<br>They don’t care whether it came from FastAPI, a cron job, or another worker.</p><p>They are simply listening.</p><p>When a worker:</p><ul><li>pulls a message</li><li>reserves it (depending on prefetch)</li><li>begins execution</li></ul><p>The broker marks the message as <strong>in-flight</strong>, not completed.</p><p>Still, nothing has been acknowledged.</p><h4>6.4 Execution happens in isolation</h4><p>Now the task function finally runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_k_AValKPrMtB0WMwMK0Jw.png" /></figure><p>Inside this function:</p><ul><li>Celery provides context</li><li>Retries are tracked</li><li>Exceptions are handled</li><li>But <strong>state is local</strong></li></ul><p>If the worker crashes here:</p><ul><li>Celery does not “remember.”</li><li>The broker decides whether the message returns to the queue</li></ul><p>Execution and delivery are still separate.</p><h4>6.5 Acknowledgement is the real finish line</h4><p>Only when the task completes successfully does this happen:</p><ul><li>The worker sends an ACK</li><li>The broker removes the message</li><li>The task officially ceases to exist</li></ul><p>Until this point:</p><ul><li>The task is provisional</li><li>The system is allowed to replay it</li><li>Duplicates are possible</li><li>Retries are broker-mediated</li></ul><p>This is why acknowledgements matter more than retries.</p><h4>6.6 Result backends are afterthoughts</h4><p>If configured, Celery may now:</p><ul><li>write task state to Redis / DB</li><li>mark it SUCCESS / FAILURE</li></ul><p>This does <strong>not</strong> affect execution.<br>This does <strong>not</strong> affect delivery.<br>This does <strong>not</strong> affect durability.</p><p>It is observability, not truth.</p><h4>6.7 End-to-End Flowchart</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*sQi7Dj_miA3QRJgpBKzfUg.png" /></figure><h4>6.8 Why this section matters</h4><p>Once you understand this flow, three things stop being mysterious:</p><ol><li>Why tasks “disappear” without errors</li><li>Why retries don’t equal durability</li><li>Why does celery behave perfectly while the system fails</li></ol><p>Nothing here is accidental.<br>Nothing here is random.</p><p>It’s just a distributed system doing exactly what it was told to do.</p><h3>7. Result Backends, Task State, and the Illusion of Reliability</h3><p>Celery task states feel comforting. PENDING, STARTED, SUCCESS, FAILURE, they look like truth. Unfortunately, they are not. A result backend is not a source of authority; it is a <strong>best-effort status recorder</strong> that runs <em>after</em> execution. Tasks can complete successfully and never update state. Tasks can fail after being marked SUCCESS. Tasks can retry while appearing frozen forever. None of this is a bug, this is exactly how distributed systems behave.</p><p>The biggest mistake is building business logic around task state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nb4SY-s2bQNH5trQUW0o5A.png" /></figure><p>This line works… until Redis restarts, TTL expires, or the backend lags. Now your order never ships, or worse, ships twice. Result backends are for observability, debugging, and dashboards, not control flow. If your system needs truth, it should live in your database with idempotent writes, not in Celery’s memory of what <em>might</em> have happened.</p><p>Celery doesn’t promise correctness here. It promises effort. The illusion only breaks when production traffic shows up.</p><h3>8. The Architecture Mistakes This Confusion Creates</h3><p>Once Celery is mistaken for a queue and task state is mistaken for truth, architectural chaos follows very quickly. Redis starts doing triple duty as broker, cache, and result backend. Retries are treated as durability. Workers are scaled blindly. Back-pressure is ignored. And when something breaks, the system responds by retrying harder, usually making things worse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRp_SJloU6tWprWHmK5cCg.png" /></figure><p>This looks innocent until a transient failure causes the same card to be charged twice. Retries without idempotency are not reliability, they are chaos with a delay.</p><p>Another common pattern is scaling workers to “fix” slow queues while ignoring the broker entirely. This creates retry storms, DB contention, and duplicate work, all while dashboards proudly report that Celery is “healthy.”</p><p>The root cause is never Celery. It’s the mental model. When execution, delivery, and state are treated as the same thing, the architecture becomes fragile. When they’re separated, systems suddenly become boring, and boring systems are the ones that survive production.</p><h3>9. Choosing Between Redis and RabbitMQ for Celery</h3><p>Let’s not do a comparison table.<br>Let’s do a <strong>true story</strong> (with names changed to protect the innocent… and the on-call engineer).</p><p>A team ships a FastAPI service with Celery.<br>They pick Redis as the broker because:</p><ul><li>it’s already running</li><li>it’s fast</li><li>it worked locally</li><li>the tutorial said so</li></ul><p>Everything is peaceful.</p><p>Tasks run.<br>Emails send.<br>Background jobs feel “instant”.</p><p>Then traffic increases.</p><p>Someone restarts Redis during a deployment.<br>No alarms fire.<br>No errors show up.<br>The API keeps returning 200 OK.</p><p>But some tasks… just never run.</p><p>The team investigates.<br>Logs are clean.<br>Celery is healthy.<br>Workers are alive.</p><p>Eventually someone asks:</p><blockquote><em>“Were those tasks… important?”</em></blockquote><p>They were.</p><p>Now rewind. Same system. Different decision.</p><p>RabbitMQ as the broker.</p><p>Setup took longer.<br>There were queues.<br>There were acknowledgements.<br>There were dashboards that felt <em>a bit too honest</em>.</p><p>But when traffic spiked:</p><ul><li>producers slowed down</li><li>queues grew visibly</li><li>workers processed at a stable rate</li><li>nothing disappeared silently</li></ul><p>When RabbitMQ restarted:</p><ul><li>tasks were still there</li><li>workers resumed</li><li>no ghost failures</li></ul><p>The system didn’t feel fast.<br>It felt <strong>predictable</strong>.</p><p>Here’s the uncomfortable rule that emerges:</p><p>If losing a task is:</p><ul><li>acceptable</li><li>recoverable</li><li>idempotent</li></ul><p>Redis is fine.</p><p>If losing a task means:</p><ul><li>money loss</li><li>data corruption</li><li>broken trust</li><li>angry Slack messages at 2 AM</li></ul><p>RabbitMQ is the adult in the room.</p><p>Most teams don’t <em>choose</em> Redis or RabbitMQ.</p><p>They choose based on <strong>what failure they are willing to live with</strong>.</p><p>Redis fails quietly.<br>RabbitMQ fails loudly.</p><p>One lets you sleep early.<br>The other wakes you up immediately.</p><p>Production prefers the one that wakes you up early.</p><p>The right question isn’t:</p><blockquote><em>“Which broker is better?”</em></blockquote><p>It’s:</p><blockquote><em>“Which failure mode do we want to debug when things go wrong?”</em></blockquote><p>Choose accordingly.</p><h3>10. FastAPI, Async, and Why Celery Still Exists</h3><p>Async in FastAPI gives the illusion that background work has become optional. After all, if an endpoint is async, why not just await everything and move on? The problem is simple: async handles <em>waiting</em>, not <em>working</em>. As someone once put it,</p><blockquote><strong>“Async is concurrency, not parallelism.” - </strong>I said it in my previous article.</blockquote><p>Your API can wait on I/O efficiently, but the moment real work shows up, PDF parsing, OCR, billing, notifications—async politely steps aside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8RGgPoOyBeuFFIGjU70Hjw.png" /></figure><p>This is where Celery refuses to retire. Celery exists because production systems need isolation, retries, rate control, and failure boundaries. Async endpoints keep APIs responsive; Celery keeps workloads survivable. Or in simpler terms: <strong>FastAPI talks to users, Celery talks to reality.</strong></p><h3>11. The Mental Model That Finally Works</h3><p>Most background system pain comes from collapsing three responsibilities into one mental box. Execution, delivery, and state are not the same thing, no matter how tempting it feels to treat them that way. Or as distributed systems like to remind us, <strong>“Just because something ran doesn’t mean it was delivered, and just because it was delivered doesn’t mean it finished.”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RnuLwxkA3oqRcw2yReQDsQ.png" /></figure><p>Once this model clicks, systems stop feeling mysterious. Retries stop feeling magical. Brokers stop being configuration details. And Celery stops feeling unreliable, it becomes boring, which is exactly what you want. <strong>Reliable systems aren’t clever; they’re predictable.</strong></p><h3>12. Stop Blaming Celery for Broker Problems</h3><p>By now, one thing should be clear:</p><p><strong><em>Celery is rarely the problem.</em></strong></p><p>It executes what it’s given, exactly how it’s told to. When tasks disappear, duplicate, retry endlessly, or behave unpredictably, it’s almost never because Celery “bugged out.” It’s because the system was built on assumptions instead of understanding, assumptions about brokers, durability, retries, and state that were never true to begin with.</p><p>Celery gets blamed because it’s visible. Brokers are quiet. Configuration lives in YAML files no one reads after copy-pasting them from a blog written in 2016. When production fails, people point at the worker logs and say, “Celery is unreliable,” instead of asking the harder question: <em>What guarantees did we actually configure the system to have?</em></p><p>And this is where the real issue lives.</p><blockquote><strong>“Celery doesn’t break systems.<br>Developers do, by vibe coding distributed systems they don’t understand.”</strong></blockquote><p>Retries are not durability.<br>Async is not background processing.<br>Task state is not truth.<br>And Redis is not a queue just because it worked yesterday.</p><p>Once you stop blaming Celery and start owning the architecture, separating delivery, execution, and state, your systems stop feeling magical and start feeling boring.</p><p><strong><em>Predictable. Debuggable. Reliable.</em></strong></p><p>And in production, boring is the highest compliment you can earn.</p><p>Closing: Stop Blaming Celery for Broker Problems</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02be81b361e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A 5-DAY REVISION CUM COMPLETION LAYOUT FOR QUANTUM PHYSICS.]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/a-5-day-revision-cum-completion-layout-for-quantum-physics-1d63d1901b2a?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d63d1901b2a</guid>
            <category><![CDATA[notes]]></category>
            <category><![CDATA[timetable]]></category>
            <category><![CDATA[quantum-mechanics]]></category>
            <category><![CDATA[quantum-physics]]></category>
            <category><![CDATA[study]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Sun, 21 Apr 2024 10:04:32 GMT</pubDate>
            <atom:updated>2024-04-21T10:04:32.659Z</atom:updated>
            <content:encoded><![CDATA[<p>Condensing a 12-week course into just 5 days is quite ambitious, and it would require intensive studying and dedication. Here’s a suggested layout to cover the topics in the Quantum Mechanics — 1 course offered by IIT Bombay through Swayam in a span of 5 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFExvPwzerXKLQOLr1P1YA.png" /></figure><p>Condensing a 12-week course into just 5 days is quite ambitious, and it would require intensive studying and dedication. Here’s a suggested layout to cover the topics in the Quantum Mechanics — 1 course offered by IIT Bombay through Swayam in a span of 5 days. Please note that this condensed schedule will involve significant time commitment and focus each day:</p><p>Day 1: Foundations of Quantum Mechanics<br>- Morning: Introduction to Quantum Mechanics — I &amp; II<br>- Afternoon: Review of Particle in Box, Potential Well, Barrier<br>- Evening: Harmonic Oscillator — I &amp; II</p><p>Day 2: Quantum Mechanics Principles<br>- Morning: Bound States — I &amp; II<br>- Afternoon: Conditions and Solutions for One-Dimensional Bound States — I &amp; II<br>- Evening: Linear Vector Space (LVS) — I, II &amp; III</p><p>Day 3: Advanced Concepts<br>- Morning: Basis for Operators and States in LVS — I<br>- Afternoon: Function Spaces — I &amp; II<br>- Evening: Postulates of Quantum Mechanics — I &amp; II</p><p>Day 4: Applications and Interpretations<br>- Morning: Classical Vs Quantum Mechanics — I &amp; II<br>- Afternoon: Compatible Vs Incompatible Observables — I &amp; II<br>- Evening: Schrodinger and Heisenberg Pictures — I &amp; II, Solutions to Other Coupled Potential Energies — I &amp; II</p><p>Day 5: Further Topics and Wrap-Up<br>- Morning: Hydrogen Atom Wave Functions, Angular Momentum Operators<br>- Afternoon: Identical Particles — I &amp; II, Quantum Computer — I &amp; II<br>- Evening: Remaining topics (Harmonic Oscillator, Ladder Operators, Stern-Gerlach Experiment, Oscillator Algebra Applications, Angular Momentum, Rotations Groups, Addition of Angular Momentum, Clebsch-Gordan Coefficient, Tensor Operators &amp; Wigner-Eckart Theorem)</p><p>Please keep in mind that this condensed schedule will require you to spend several hours each day studying and understanding complex concepts. It’s important to allocate time for breaks and review sessions to ensure comprehension and retention of the material. Additionally, consider reaching out to online resources, textbooks, or additional lectures if you need further clarification on specific topics.</p><p>I’ll soon add links to resources of every day.</p><p><em>Feel free to comment and don’t forget to follow and upvote for more such content.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d63d1901b2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quantum Mechanics — 1]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/quantum-mechanics-1-9e3cf552d186?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e3cf552d186</guid>
            <category><![CDATA[notes]]></category>
            <category><![CDATA[quantum-mechanics]]></category>
            <category><![CDATA[chandigarh-university]]></category>
            <category><![CDATA[quantum-physics]]></category>
            <category><![CDATA[study]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Sun, 21 Apr 2024 10:00:55 GMT</pubDate>
            <atom:updated>2024-04-21T10:05:16.713Z</atom:updated>
            <content:encoded><![CDATA[<h3>Quantum Mechanics — 1</h3><h3>COURSE OVERVIEW</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFExvPwzerXKLQOLr1P1YA.png" /></figure><p>Quite a horrific subject! Don’t worry about this subject, with this blog I’ll try to help you guys out.</p><p>So the course layout of Quantum Mechanics-I offered by IIT Bombay through Swayam is as follows:</p><p><strong>COURSE LAYOUT:</strong></p><p>Week 1: Introduction to Quantum Mechanics-I, Introduction to Quantum Mechanics-II, Review of Particle in Box, Potential Well, Barrier, Harmonic Oscillator-I, Review of Particle in Box, Potential Well, Barrier, Harmonic Oscillator-II</p><p>Week 2: Bound States-I, Bound States-II, Conditions, and Solutions for One-Dimensional Bound States — I, Conditions, and Solutions for One-Dimensional Bound States—II</p><p>Week 3: Linear Vector Space (LVS) — I, Linear Vector Space (LVS) — II, Linear Vector Space (LVS) — III, Basis for Operators and States in LVS — I</p><p>Week 4: Function Spaces — I, Function Spaces — II, Postulates of Quantum Mechanics — I , Postulates of Quantum Mechanics — II</p><p>Week 5: Classical Vs Quantum Mechanics — I, Classical Vs Quantum Mechanics — II, Compatible Vs Incompatible Observables — I, Compatible Vs Incompatible Observables — II</p><p>Week 6: Schrodinger and Heisenberg Pictures — I, Schrodinger and Heisenberg Pictures — II, Solutions to Other Coupled Potential Energies-I, Solutions to Other Coupled Potential Energies-II</p><p>Week 7: Hydrogen Atom Wave Functions, Angular Momentum Operators, Identical Particles-I, Hydrogen Atom Wave Functions, Angular Momentum Operators, Identical Particles-II, Identical Particles, Quantum Computer-I, Identical Particles, Quantum Computer-II</p><p>Week 8: Harmonic Oscillator -I, Harmonic Oscillator -II, Ladder Operators -I, Ladder Operators -II</p><p>Week 9: Stern-Gerlach Experiment-I, Stern-Gerlach Experiment-II, Oscillator Algebra Applications-I</p><p>Week 10: Angular Momentum-1 -I, Angular Momentum-1 -II, Rotations Groups -I, Rotations Groups -II</p><p>Week 11: Addition of Angular Momentum-I, Addition of Angular Momentum-II, Clebsch-Gordan Coefficient -I, Clebsch-Gordan Coefficient -II</p><p>Week 12: Clebsch-Gordan Coefficient -III, Tensor Operators &amp; Wigner-Eckart Theorem-I, Tensor Operators &amp; Wigner-Eckart Theorem-II, Tensor Operators &amp; Wigner-Eckart Theorem-III.</p><p>Now this was just to let you guys know what you need to cover to ace the exam.</p><p>If you haven’t even touched the subject I’ll be sharing a five-day plan (don’t worry, not just a plan, it’ll consist of resources and everything possible that you’re going to need in these five days).</p><p>Click on the link below: <a href="https://medium.com/@pranaybhatnagar2025/a-5-day-revision-cum-completion-layout-for-quantum-physics-1d63d1901b2a"><strong>A 5-DAY REVISION CUM COMPLETION SPRINT OF QUANTUM MECHANICS</strong></a></p><p><em>Don’t forget to follow me for more such content and upvote if you like it!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e3cf552d186" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to IOT: SUMMARY NOTES]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/introduction-to-iot-summary-notes-64d058306cc4?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/64d058306cc4</guid>
            <category><![CDATA[notes]]></category>
            <category><![CDATA[examination]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[study]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 21:39:28 GMT</pubDate>
            <atom:updated>2023-10-26T21:39:28.229Z</atom:updated>
            <content:encoded><![CDATA[<p>Journey through the Internet of Things: A 10-Week Odyssey</p><p>Welcome to the culmination of our 10-week exploration into the world of the Internet of Things (IoT). This journey has been an exciting one, delving deep into the realm of interconnected devices, smart technologies, and the endless possibilities that IoT offers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VIkeRVyzP2ENzCSHKN67Bg.png" /></figure><p>As we draw the curtains on this series, it’s an excellent opportunity to reflect on the knowledge and insights we’ve gained. Each week has brought us closer to understanding the core concepts, challenges, and applications of IoT, and now, we present you with a summary of this enlightening adventure.</p><ol><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-1-summary-9a975b99c045">Week-1: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introducction-to-iot-week-2-summary-2b451a9cf3d8">Week-2: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-3-summary-ab627ae3265c">Week-3: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-4-summary-a5a533b4acef">Week-4: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-week-5-summary-7908b7e31397">Week-5: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-6-summary-af5080d3420c">Week-6: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-7-summary-44a42e833ad9">Week-7: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-8-summary-d3fea392bfdb">Week-8: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-9-summary-b15675507e39">Week-9: Introduction to IOT</a></li><li><a href="https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-10-summary-52d466c8087f">Week-10: Introduction to IOT</a></li></ol><p>Now, let’s embark on this final chapter where we’ll weave together the key takeaways, lessons learned, and the bigger picture of how IoT is shaping our world. It’s time to reflect, celebrate, and ponder the endless possibilities that IoT brings to the table.</p><p><em>There is a lot more to learn in this exciting undergraduate degree. I’ll keep sharing great content so don’t forget to follow me for more updates.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64d058306cc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to IoT Week-10: SUMMARY]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-10-summary-52d466c8087f?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/52d466c8087f</guid>
            <category><![CDATA[examination]]></category>
            <category><![CDATA[notes]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[nptel]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 21:07:55 GMT</pubDate>
            <atom:updated>2023-10-26T21:07:55.997Z</atom:updated>
            <content:encoded><![CDATA[<p>In Week 10 of our 12-week journey through the realm of IoT, we delve into a topic of paramount importance — IoT security. As we’ve learned, IoT’s vast network of interconnected devices comes with inherent vulnerabilities. Let’s kick off this week by unraveling the critical aspects of securing IoT ecosystems. Join us as we explore the fascinating world of IoT security, an essential layer in the foundation of the Internet of Things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m9t3hyzcJjce1GDzU_u_QA.png" /></figure><p><strong>Smart Cities</strong>, in the context of IoT, refer to urban systems that harness Information &amp; Communication Technology (ICT) to render infrastructure more interactive, accessible, and efficient. The impetus behind the development of Smart Cities stems from several factors, including the rapid expansion of urban populations, the accelerated depletion of natural resources, and the shifts in environmental and climate conditions.</p><p>Smart Cities utilize IoT to enhance urban infrastructure, addressing urban population growth, resource depletion, and environmental shifts. Current focus areas include Smart Homes, Smart Parking Lots, Smart Vehicles, Smart Health, Pollution and Calamity Monitoring, Smart Energy, and Smart Agriculture.</p><p>However, IoT implementation in Smart Cities faces challenges such as security, heterogeneity, reliability, and scalability, alongside legal and social aspects.</p><p>Data fusion helps make large data precise, while stages of data fusion involve sensing, processing, and fusion.</p><p>Mathematical methods and AI play a role in data fusion, particularly in autonomous vehicles and smart parking systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*0Dftxn7Dk8MlhSJ7Fav6Eg.png" /><figcaption>Mathematical Methods of Data Fusion</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*GNkgRc0217sNkJGKZkKasg.png" /><figcaption>AI in IoT decision Making</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*vEQQBuhygf_fXjl7PlJ2ZQ.png" /><figcaption>Data Fusion for Autonomous Vehicles</figcaption></figure><p>Energy management solutions include energy-efficient strategies and energy harvesting. Home Area Networks (HANs) within smart homes enable remote control and integration of various systems. Standards like UPnP, DLNA, KNX, Zigbee, X-10, and more facilitate HANs. The architecture of HANs employs XML, SOA, and central gateways. Initiatives like Hydra and Jini aim to connect devices in an ambient intelligent network.</p><p><strong>Connected Vehicles</strong> are equipped with sensors and communication devices, allowing them to communicate within the vehicle, with other vehicles, and with fixed infrastructure.</p><p>However, challenges like security, privacy, scalability, reliability, quality of service, and the lack of global standards exist.</p><p>The Vehicle to Everything<strong> (V2X) </strong>paradigm is a key component of Intelligent Transportation Systems, enabling vehicles to share information with other vehicles, pedestrians, and infrastructure for enhanced traffic management and safety.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*iPD9D3bj4Vwd8UM49_YgjQ.png" /><figcaption>Intelligent Connected Vehicles (ICVs)</figcaption></figure><p><strong>Content Centric Networking (CCN) </strong>addresses limitations of TCP/IP in V2X by focusing on data rather than location. Vehicular Ad-hoc Networks (VANETs) offer high throughput and low-latency routing for mobile environments. These networks find applications in collision warnings and vulnerable road user safety. V2X communication spans the in-vehicle, ad-hoc, and infrastructure domains, bringing both advantages (traffic safety, fuel efficiency) and disadvantages (privacy concerns, data control issues). The broader IoT ecosystem involves Internet of Vehicles (IoV) and autonomous Intelligent Vehicles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*IrWPFxdbZY0eC_IdygHi2g.png" /><figcaption>V2X Communication</figcaption></figure><p><em>As we conclude this 10th week of our IoT journey, we’ve delved into the fascinating realm of Connected Vehicles and explored the challenges and opportunities they bring.</em></p><p><em>In the next two weeks, we’ll continue our exploration of IoT’s diverse facets. Stay tuned for more insights and knowledge-sharing in the remaining part of this 12-week series. Your journey through the Internet of Things is almost complete, and the horizon of knowledge is within reach.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52d466c8087f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to IoT Week-9: SUMMARY]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-9-summary-b15675507e39?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/b15675507e39</guid>
            <category><![CDATA[notes]]></category>
            <category><![CDATA[summary]]></category>
            <category><![CDATA[nptel]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 20:49:39 GMT</pubDate>
            <atom:updated>2023-10-26T20:49:39.076Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to Week 9 of our Introduction to IoT NPTEL series. In this final stretch, we’ll delve into the fascinating world of IoT applications, exploring how IoT is revolutionizing various industries. Join us as we uncover the real-world impact of IoT technology.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0NPV9W3rH0_K224ez6u5Qg.png" /></figure><p><strong>OpenStack</strong> is a powerful open-source software designed for creating cloud infrastructure, and it has evolved significantly since its inception in 2010 as a collaborative project between Rackspace Hosting and NASA. This dynamic platform is now supported by numerous major companies like IBM, Cisco, HP, Dell, VMware, Red Hat, SUSE, and Rackspace Hosting, with a large and thriving community.</p><p>OpenStack can be used to build both private and public clouds, making it a versatile solution for various cloud computing needs. It has seen numerous versions, from Austin to Zed in 2022, with ongoing development, such as the Bobcat version.</p><p><strong>Key components</strong> of OpenStack include:</p><p>1. Keystone: This component serves as the identity service, providing authentication and authorization features.</p><p>2. Horizon: Known as the dashboard, Horizon offers a graphical user interface (GUI) for the software and provides an overview of the other components within OpenStack.</p><p>3. Nova: As the compute service, Nova is where you launch and manage your virtual instances.</p><p>4. Glance: This image service helps with discovering, registering, and retrieving virtual machine (VM) images, including snapshots.</p><p>5. Swift: Functioning as an object storage service, Swift enables secure, cost-effective, and efficient data storage.</p><p>6. Neutron: This networking service component allows other services to communicate with one another and provides the capability to create custom networks.</p><p>7. Cinder: For block storage virtualization and management, Cinder is a vital component within OpenStack.</p><p>8. Heat: Heat handles orchestration, ensuring the automated management of cloud resources.</p><p>9. Ceilometer: This component focuses on billing and monitors service usage, helping to track what services are being used and for how long.</p><p>OpenStack is a comprehensive solution for building and managing cloud infrastructure, making it a valuable asset for various industries and cloud computing applications.</p><p><strong>Sensor Cloud</strong> is a sophisticated concept that goes beyond merely integrating sensors with cloud computing. It isn’t just about transmitting sensor data to the cloud; it involves the virtualization of sensor nodes and operates on a pay-per-use model. Sensor Cloud creates a layer between sensor nodes and end-users, providing a bridge for efficient sensor data utilization.</p><p><strong>The virtualization concept in Sensor Cloud</strong> is akin to how a single computer host can appear as multiple computers, using the concept of Virtual Machine (VM). Pooling physical resources, optimizes IT throughput and reduces costs. This approach offers various benefits, such as sharing resources, encapsulating a complete computing environment, running independently of the underlying hardware, and enabling VM migration.</p><p><strong>Sensor Cloud: Difference with WSN</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*bcHQUHhoo0OXleo5Bjmb7w.png" /></figure><p>Unlike traditional Wireless Sensor Networks (WSN), Sensor Cloud introduces new actors and dynamics. The <strong>key actors</strong> include:</p><p>1. End-users: These individuals may not be aware of which physical sensors are serving their applications, highlighting the abstraction of the underlying sensor network.</p><p>2. Sensor-owners: They purchase and deploy physical sensor devices in different locations and make them available for use within the sensor cloud.</p><p>3. Sensor-Cloud Service Providers (SCSP): These are business entities charging end-users based on their Sensor as a Service (Se-aas) usage. Well-known examples include AWS IoT, Microsoft Azure IoT, Google Cloud IoT, and IBM Watson IoT.</p><p><strong>The architecture of Sensor Cloud</strong> involves end-users registering themselves, selecting templates, and requesting applications. Sensor-owners deploy a mix of heterogeneous or homogeneous physical sensor nodes across various locations. The SCSP plays a managerial role in orchestrating these resources.</p><p>Some of the management issues in Sensor Cloud include optimizing the composition of virtual sensor nodes, implementing effective data caching strategies, and setting appropriate pricing models for end-users.</p><p><strong>Sensor Cloud: View</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*liF70LkYob1G8UKa93YaKw.png" /></figure><p><strong>Virtual sensors</strong> play a pivotal role in efficient sensor network management. Their formation can be optimized based on two conditions: <strong>CoV-I </strong>for homogenous sensor nodes within the same geographic boundary and <strong>CoV-II </strong>for heterogeneous sensor nodes spread across various regions. This approach tackles the resource constraints and dynamic changes in sensor conditions that are prevalent in traditional networks.</p><p><strong>Dynamic and adaptive caching mechanisms</strong> are essential in the Sensor-Cloud paradigm. They contribute to resource utilization efficiency and accommodate varying environmental conditions. When end-users request sensor data through a web interface, physical sensor nodes continuously collect and transmit data to the Sensor-Cloud. In cases where environmental conditions change slowly, preserving sensed data in an unchanged state is essential to prevent unnecessary energy consumption. To achieve this, an internal cache (IC) handles end-users’ requests and decides whether to provide data directly or retrieve it from an external cache (EC). Periodic re-caching from the external cache ensures the data’s availability. These mechanisms ensure streamlined and sustainable data management within the Sensor-Cloud framework.</p><p><strong>The Architecture of Caching:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*ss94ax7OlDUEcTeI8ro_yA.png" /></figure><p>The <strong>Dynamic Optimal Pricing for Sensor-Cloud Infrastructure</strong> focuses on pricing strategies specifically tailored for Sensor-Cloud services (SeaaS), unlike existing schemes primarily designed for more general services like IaaS and SaaS. This dynamic pricing scheme includes two key components:</p><p>1. Pricing Attributed to Hardware (pH): This component deals with the cost associated with the usage of physical sensor nodes. It aims to optimize pricing based on the hardware infrastructure used.</p><p>2. Pricing Attributed to Infrastructure (pI): This part of the pricing scheme focuses on the pricing associated with the overall infrastructure of the sensor-cloud service, considering factors beyond the physical sensors.</p><p>The primary goals of this proposed pricing scheme are to:</p><p>- Maximize the profit of the Sensor-Cloud Service Provider (SCSP).<br>- Maximize the profit of the sensor owner.<br>- Ensure end users’ satisfaction by offering competitive and efficient pricing structures.</p><p>The emphasis is on enhancing profitability for the SCSP, finding the optimal pricing for end-users, and maintaining user satisfaction. This scheme recognizes the unique requirements of Sensor-Cloud services and seeks to create a dynamic and responsive pricing model that benefits all stakeholders involved in the ecosystem.</p><p><strong>Fog Computing</strong> is an innovative approach is aimed at addressing the challenges associated with cloud computing in the context of processing Internet of Things (IoT) data. Key points about Fog Computing include:</p><p><strong>1. Definition and Origin:</strong> Fog computing, also known as “fogging,” is a term coined by CISCO. It represents the concept of extending cloud computing closer to IoT devices. This approach creates an intermediate layer between the cloud and these devices.</p><p><strong>2. Primary Objective: </strong>The primary aim of fog computing is to overcome the limitations experienced in cloud computing when handling IoT data. By introducing a layer of fog computing, it attempts to enhance data processing efficiency for IoT applications.</p><p><strong>3. Data Explosion:</strong> The scale of data generated by sensors is immense. By 2020, sensors were projected to contribute to 40% of the world’s data. This surge in data volume, about 2.5 quintillion bytes generated daily, presents significant challenges.</p><p><strong>4. IoT Growth:</strong> The IoT industry has experienced rapid growth, with predictions of a $1.7 trillion expenditure on IoT devices by 2020. There was also an anticipation of more than 30 billion IoT devices and 250 million connected vehicles worldwide by the same year.</p><p><strong>5. Challenges of Cloud Computing:</strong> The traditional cloud model struggles to meet the requirements of IoT due to issues related to data volume, latency, and bandwidth. The vast number of online devices generating exabytes of data daily has led to difficulties in processing and storing all this information.</p><p><strong>6. Why Fog Computing:</strong> Fog computing is essential due to the inadequacy of the current cloud model in handling the requirements of IoT. Challenges related to data volume, latency, and bandwidth necessitate the use of fog computing as an intermediary solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*nxHS99AK9Dr_H-r3xWABxA.png" /><figcaption>Latency</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*ruFVigP1wiIBPmGcX2ARPg.png" /><figcaption>Working of Fog</figcaption></figure><p><strong>7. Key Requirements:</strong> The key requirements for IoT data processing are reducing data latency, ensuring data security, maintaining operation reliability, and efficiently monitoring data across large geographical areas. These factors drive the adoption of fog computing.</p><p><strong>8. Architecture of Fog: </strong>The architecture involves extending cloud services to IoT devices through fog, which acts as an intermediary layer. Multiple fog nodes can be deployed, processing sensor data before transmitting it to the cloud. This architecture reduces latency, conserves bandwidth, and optimizes cloud storage usage.</p><p><strong>9. Working of Fog:</strong> Fog nodes operate based on the type of data they receive. They handle very time-sensitive data at the nearest node, process less time-sensitive data at aggregate nodes, and send non-time-sensitive data directly to the cloud for storage and analysis.</p><p><strong>10. Advantages:</strong> Fog computing offers several advantages, including improved security, low operation costs, quick decision-making, better privacy, enhanced business agility, and better data handling. It is also suitable for remote and harsh environments.</p><p><strong>11. Applications: </strong>Fog computing finds applications in real-time health analysis, intelligent power-efficient systems, real-time rail monitoring, pipeline optimization, real-time windmill and turbine analysis, and more.</p><p><strong>12. Challenges:</strong> Challenges of fog computing include increased power consumption compared to centralized cloud, data security concerns in a distributed network, reliability and fault tolerance, dynamic programming architecture, and the need for real-time analysis across a vast number of nodes.</p><p>Fog computing is a pivotal approach addressing the evolving landscape of IoT data processing by bringing cloud capabilities closer to the data source, thereby mitigating key challenges.</p><p><em>As we conclude our 9-week exploration of IoT, fog computing stands out as a crucial bridge between the cloud and IoT devices. It addresses data challenges and offers real-time solutions. From healthcare to power efficiency and more, its applications are vast.</em></p><p><em>See you in Week 10. Till then stay focused!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b15675507e39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to IoT Week-8: SUMMARY]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-8-summary-d3fea392bfdb?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3fea392bfdb</guid>
            <category><![CDATA[nptel]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[summary]]></category>
            <category><![CDATA[swayam]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 20:14:24 GMT</pubDate>
            <atom:updated>2023-10-26T20:14:24.320Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome back to our exciting journey through the world of the Internet of Things (IoT). We’ve now arrived at Week 8 of our comprehensive 12-week series, and the horizon of IoT knowledge is expanding further.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wuR79iHCpzuZ1t67TJ2p6g.png" /></figure><p>This week, we’ll explore SDN for mobile networking, Rule Placement, ODIN, Ubi-Flow, Mobi-Flow, Data-Centric Networking, Anomaly Detection, Cloud Computing, and service models, shedding light on the crucial concepts that drive the IoT ecosystem.</p><p>Whether you’re a newcomer seeking insights into IoT or a seasoned enthusiast looking to deepen your understanding, this blog series aims to cater to all. So, fasten your seatbelts as we embark on another enlightening adventure into the realm of IoT in Week 8.</p><p>In <strong>traditional wireless mobile networks</strong>, several problems are prevalent, including difficulties in scaling the network, managing it effectively, inflexibility in introducing new services, and high costs in terms of capital and operational expenditure.</p><p><strong>SDN for Mobile Networking: </strong>The adoption of Software-Defined Networking (SDN) in mobile networking has introduced several key advantages. SDN’s Flow-Table Paradigm is well-suited for end-to-end communication across various technologies, providing logically centralized control for efficient base-station coordination, path management, and network virtualization. These benefits include centralized control of devices from different vendors, faster integration of new services, and the abstraction of network control and management, ultimately providing a more user-friendly network experience.</p><p>This transformation in mobile networking brings exciting possibilities and improved efficiency to the world of mobile communication.</p><p><strong>Rule Placement at Access Devices: </strong>The rule placement at access devices within Software-Defined Networking (SDN) for mobile networks presents several challenges. General OpenFlow does not directly support wireless networks, and it requires a modified version of OpenFlow to be effective. Mobile users in wireless networks introduce a highly dynamic environment, necessitating frequent changes in rule placement. Additionally, the presence of diverse devices in the network adds complexity to the rule management.</p><p>To address these challenges, various approaches have been developed:</p><p><strong>1. ODIN:</strong> ODIN employs an agent placed at access points to facilitate communication with a controller. It consists of two components, the Odin agent positioned with physical devices and the Odin master located at the controller end. ODIN focuses on the conversion of 802.11 and LVAP (Light Virtual AP).</p><p><strong>2. Ubi-Flow:</strong> Ubi-Flow specializes in mobility management in Software-Defined IoT networks, offering scalable control of access points and fault tolerance. It incorporates features like flow-scheduling, network partitioning, network matching, and load balancing.</p><p><strong>3. Mobi-Flow: </strong>Mobi-Flow takes a proactive approach to rule placement based on users’ movements within the network. It predicts users’ locations at (t+1) time while they are at (t) time and places flow rules at access points associated with the predicted locations. This prediction is done using an Order-K Markov predictor, and linear programming is used to select the optimal access points for rule placement.</p><p>These approaches address the dynamic and heterogeneous nature of wireless mobile networks within the context of SDN, providing solutions for efficient rule placement at access devices.</p><p><strong>Rule placement within the backbone network</strong> of an IoT infrastructure can leverage existing schemes designed for wired networks. Load balancing is a crucial consideration, given the dynamic nature of IoT networks, and dynamic resource allocation methods can be incorporated for improved efficiency.</p><p><strong>Data-centric networking </strong>in this context includes addressing two types of flows:</p><p>1. Mice-Flow: Wildcard rules are placed to handle these flows effectively.<br>2. Elephant Flow: Exact match rules are employed for optimal handling.</p><p>To ensure efficient flow forwarding, it’s essential to classify the flows before inserting flow rules at the network switches.</p><p><strong>Anomaly Detection in IoT Network: </strong>In addition, anomaly detection is vital in IoT networks. Monitoring the network through OpenFlow enables the detection of anomalies by observing individual flows and collecting port statistics from network switches. Anomalies, which may lead to a surge in network traffic, can be detected through this flow monitoring.</p><p><strong>Experimenting with Wireless Network: </strong>For experimentation with wireless networks, tools like Mininet-WiFi can be utilized to deploy a network that supports both wired (Ethernet protocol) and wireless (Wi-Fi protocol, IEEE 802.11 group) communication. ONOS can be employed to manage controllers effectively in this context.</p><p><strong>Cloud computing</strong> is a model that enables convenient, on-demand access to a shared pool of configurable computing resources, including network infrastructures, servers, storage, and applications, as defined by NIST. It represents an evolution beyond utility computing, offering a highly abstracted computation and storage model that can be rapidly allocated and released with minimal management effort. This model features essential <strong>characteristics, service models, and deployment models</strong>, and it provides on-demand services accessible from anywhere at any time.</p><p>The <strong>business advantages of cloud computing</strong> are significant, including minimal upfront infrastructure investment costs, real-time infrastructure availability, improved resource utilization, usage-based costing, and reduced time to market. Cloud computing also boasts <strong>general characteristics</strong> like enhanced agility in resource provisioning, device and location independence (ubiquity), multitenancy for cost sharing, dynamic load balancing, high reliability and scalability, low cost, and maintenance, as well as improved security and access control.</p><p><strong>NIST Visual Model of Cloud Computing:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*V_pQC5WdBTrl1ih4EhL05Q.png" /></figure><p><strong>Characteristics of Cloud Computing: </strong>Cloud computing exhibits several essential characteristics, including:</p><p>1. Broad Network Access: Cloud resources should be accessible over the network using standard mechanisms and support various client platforms, such as mobile devices, laptops, and PDAs.</p><p>2. Rapid Elasticity: Cloud resource allocation should be automatic, dynamic, and elastic. It should allow for rapid scaling up and down to meet changing demands.</p><p>3. On-Demand Self-Service: Users should be able to provision and manage cloud resources as needed, offering a self-service approach.</p><p>4. Resource Pooling: Cloud providers should pool resources to serve multiple users, allocating resources according to user demand. This multi-tenant model optimizes resource usage.</p><p>5. Measured Service: Resource usage is monitored and recorded, allowing for dynamic optimization and cost control while maintaining transparency between the provider and consumer.</p><p>Cloud computing components encompass various clients/end-users, services, applications, platforms, storage, and infrastructure, including Software-as-a-Service (SaaS), Platform-as-a-Service (PaaS), and Infrastructure-as-a-Service (IaaS) service models. These services can be delivered through different deployment models like public cloud, private cloud, hybrid cloud, community cloud, distributed cloud, multi-cloud, and inter-cloud, each catering to specific use cases and requirements.</p><p>In summary, cloud computing offers flexibility, scalability, and accessibility while optimizing resource utilization and service delivery.</p><p><strong>Comparison Of Different Deployment Models:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*1s9Uo_JBq_e-kawwdRKThw.png" /></figure><p><strong>Service Models:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*PyphFBWJCZBtyruX80umjw.png" /></figure><p><strong>Cloud computing</strong> is a paradigm that provides on-demand access to a shared pool of configurable computing resources over a network, as defined by <strong>NIST</strong>. It has evolved from utility computing and offers a high level of abstraction, rapid allocation, and key characteristics, including on-demand services accessible from anywhere. Businesses benefit from cloud computing by reducing upfront infrastructure costs, ensuring real-time resource availability, improving resource utilization, reducing time to market, and allowing for new business model trials.</p><p>Cloud computing’s essential <strong>characteristics</strong> include broad network access, rapid elasticity, on-demand self-service, resource pooling, and measured service. The service models include <strong>Software-as-a-Service (SaaS), Platform-as-a-Service (PaaS), and Infrastructure-as-a-Service (IaaS).</strong></p><p><strong>IaaS</strong> provides basic building blocks like servers, storage, and network access. Users rent these resources, while cloud service providers manage them. It suits new businesses, rapidly growing organizations, and applications with fluctuating demands. It offers scalability, manageability, and accessibility, and its infrastructure resources can be monitored, allocated, and optimized automatically. IaaS can be public, private, or hybrid.</p><p><strong>PaaS</strong> allows developers to create and deploy applications, simplifying the development process. It provides tools for design, development, and hosting, abstracting underlying infrastructure complexities. Users can rent virtualized servers and associated services, offering elastic scaling.</p><p><strong>SaaS</strong> delivers completed end-user applications run and managed by service providers. It operates over the Internet, supporting a pay-as-you-go model with remote access via web browsers. SaaS architecture emphasizes scalability, multi-tenancy, and configurability.</p><p><strong>Comparison of Different Service Models:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*0llyMyADp4OrWSa49saOGQ.png" /></figure><p><strong>Cloud security</strong> is vital, focusing on network, host, and application-level security, as well as data security through identity management, encryption, and access control. Trust and reputation, risk assessment, and authentication are essential for selecting appropriate cloud providers.</p><p><strong>Cloud simulations</strong> using tools like CloudSim and CloudAnalyst facilitate pre-deployment testing, performance evaluation, and issue detection in the rapidly growing cloud computing environment. These simulators help evaluate services, control environments, and design countermeasures.</p><p>In summary, cloud computing offers diverse service models (IaaS, PaaS, SaaS) with essential characteristics like scalability, on-demand self-service, and efficient resource allocation. Security, trust, and risk assessment play a crucial role in selecting cloud providers, while cloud simulations help assess and optimize cloud services.</p><p><em>As Week 8 of our 12-week IoT exploration draws to a close, we’ve uncovered the critical role of cloud computing. We’ve seen how Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service (SaaS) offer scalable solutions with unique advantages and security considerations.</em></p><p><em>We’ve also explored trust, reputation, and risk assessment in the cloud, emphasizing data security and privacy. Cloud simulations, like CloudSim and CloudAnalyst, enable us to optimize services and ensure performance.</em></p><p><em>This journey has shown us that cloud computing is the bedrock of IoT, driving data flow and analytics. We’re now better equipped to navigate the IoT-cloud relationship.</em></p><p><em>Stay tuned for more IoT insights in the weeks ahead, as we dive deeper into sensors, actuators, and IoT applications. Our goal is to provide valuable knowledge for your IoT journey.</em></p><p><em>Thank you for being part of this exciting series, and stay curious, connected, and tuned in!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3fea392bfdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to IoT Week-7: SUMMARY]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-7-summary-44a42e833ad9?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/44a42e833ad9</guid>
            <category><![CDATA[examination]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[nptel]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[introduction]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 19:42:20 GMT</pubDate>
            <atom:updated>2023-10-26T19:42:20.836Z</atom:updated>
            <content:encoded><![CDATA[<p>As Week 7 of our 12-week NPTEL Introduction to IoT series comes to a close, we’re diving deeper into the world of IoT. Real-world applications, trends, and the importance of data analytics have been in focus. With each passing week, we’re gaining practical knowledge that will serve us well on this journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iT7QukyofoLiyMrkTjJQ9A.png" /></figure><p>Network protocols allow us to establish connections between servers and clients, enabling data transmission from clients to servers. Socket programming, in particular, plays a crucial role in creating two-way communication between these network nodes.</p><p>Here’s how it works:</p><ul><li>We create both a server and a client.</li><li>A connection is established between these two nodes.</li><li>The client sends data to the server.</li></ul><p>To kickstart this process, we initiate socket creation using the following syntax: s = socket.socket(SocketFamily, SocketType, Protocol=0)</p><ul><li>SocketFamily can be either AF_UNIX or AF_INET.</li><li>SocketType can take on values SOCK_STREAM or SOCK_DGRAM.</li><li>The Protocol parameter is set to 0 by default.</li></ul><p><strong>Data Processing: </strong>Data splitting/filtering<br>▪ Data from the client is saved in a text file<br>▪ The values are separated by a comma(‘ , ’)</p><p>message = str(h)+’,’+str(t)</p><p>▪ Split() function can be used to split a string into multiple strings depending on the type of separator/delimiter specified.</p><p><strong>Plotting the data:</strong><br>▪ MATPLOTLIB is a Python library used to plot in 2D<br>▪ Plot(x,y): plots the values x and y<br>▪ xlabel(‘X Axis’): Labels the x-axis<br>▪ ylabel(‘Y Axis’): Labels the y-axis<br>▪ title(“Simple Plot”): Adds title to the plot</p><p>import matplotlib.pyplot as myplot<br>myplot.plot([1,2,3,4])<br>myplot.ylabel(‘Y-Axis’)<br>myplot.show()</p><p>By default the values are taken for the y-axis, and values for the x-axis are<br>generated automatically starting from 0 to 9</p><p><strong>Functions Used in Plotting Data:</strong><br>Some other common functions used in plotting:<br>▪ figure(): Creates a new figure<br>▪ grid(): Enable or disable axis grids in the plot<br>▪ ion(): turns on the interactive mode<br>▪ subplot(): Adds subplot in a figure<br>▪ Close(): Close the current figure window<br>▪ Scatter(): make a scatter plot of the given points</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*jGLtF59BwNxa46UoSCKjNg.png" /></figure><p><strong>Limitations of the current Network:</strong><br>1. Vendor-specific architecture of switches limits dynamic configuration according to application-specific requirements.<br>2. Switches are required to be configured according to the installed operating system (OS).<br>3. Centralized control is not feasible in a traditional network.</p><p><strong>Origin of Software Defined Networking: </strong>The origin of Software Defined Networking (SDN) can be traced back to several key milestones. In 2006, a team at Stanford University introduced the concept of a clean-slate security architecture called SANE, which proposed controlling security policies in a centralized manner instead of at the network edges. SDN’s inception was significantly influenced by the OpenFlow project, which emerged in 2008, and further developments took place.</p><p>In 2009, Stanford University published OpenFlow V1.0.0 specifications, and the foundation for SDN began to take shape. Nicira Networks was founded in June 2009, adding to the growing interest in SDN. In March 2011, the Open Networking Foundation was established to promote SDN. Later, in October 2011, the first Open Networking Summit attracted industries like Juniper and Cisco, who announced plans to incorporate SDN into their architectures.</p><p><strong>Basic Concept of SDN: </strong>The fundamental concept of SDN involves separating control logic from hardware switches, centralizing the definition of control logic, enabling control over the entire network, and facilitating communication between applications, control, and data planes through APIs. Key components and attributes of SDN include hardware switches, controllers, applications, flow rules, and application programming interfaces (APIs).</p><p>Currently, companies such as Google have begun implementing SDN in their data center networks, often through phased transitions that promise reduced operational costs and minimized delays resulting from link failures. However, SDN also faces challenges, particularly in areas like rule placement and controller placement, as it continues to evolve and shape the future of networking.</p><p><strong>Rule Placement: </strong>Rule placement is a critical aspect of Software Defined Networking (SDN) which switches forward network traffic based on predefined rules known as ‘Flow-Rules.’ Unlike traditional networks where routing tables are employed in each switch, SDN uses a Flow Table in every switch, with each entry in the Flow Table being referred to as a Flow-Rule. These rules follow specific formats, often dictated by protocols like OpenFlow.</p><p><strong>Challenges of Rule Placement: </strong>The first challenge lies in the size limitation of ternary content-addressable memory (TCAM) at the switches, which restricts the number of rules that can be inserted. TCAM is essential for rapid processing but comes at a considerable cost. The second challenge emerges when a switch receives a request for which no matching flow rule is present. In this scenario, the switch sends a PACKET-IN message to the centralized controller, which then determines a suitable flow rule and inserts it into the switch. This process typically incurs a delay of 3–5 milliseconds for new rule placement.</p><p>Addressing these challenges requires a focus on defining and placing rules at switches while considering available TCAM and designing rules to minimize the number of PACKET-IN messages sent to the controller. Balancing these aspects is crucial for optimizing rule placement in SDN and ensuring efficient network operation.</p><p><strong>Open Flow Control: </strong>The OpenFlow Protocol is the primary protocol employed for rule placement in Software Defined Networking (SDN). It offers various versions, such as 1.0, 1.1, 1.2, 1.3, and more, each supporting a different number of match fields, including Source IP, Destination IP, Source Port, Priority, and others.</p><p>OpenFlow also allows for specifying the duration for which a flow rule should be kept at a switch, known as timeouts. The two types of timeouts include hard timeouts, which involve deleting all rules from the switch when the timer expires, and soft timeouts, which delete a rule when no flow is associated with it for a certain period, essentially clearing unused rules.</p><p>It’s essential to clarify that SDN, or Software Defined Networking, is a broader technology and concept, while OpenFlow is the specific protocol used for communication between the data plane and the control plane. While other protocols for this purpose may exist, OpenFlow is the primary protocol currently in use.</p><p><strong>OpenFlow Switch Software: </strong>OpenFlow is supported by various OpenFlow Switch Software, including Indigo, LINC, Pantou, Of13softswitch, and the highly popular Open vSwitch.</p><p><strong>APIs In SDN: </strong>SDN utilizes different types of APIs, including the Southbound API used for communication between the control layer and infrastructure layer, typically through the OpenFlow protocol. The Northbound API facilitates communication between the control layer and application layer, using standard APIs, while East-Westbound APIs support communication among multiple controllers within the control layer.</p><p><strong>Controller Placement: </strong>When it comes to controller placement in SDN, it is crucial to ensure that controllers can efficiently define flow rules according to application-specific requirements, handle incoming requests from switches without significant delays, and maintain the network’s responsiveness. Controllers should be logically connected to switches within one-hop distance, even though they may be physically located at a multi-hop distance. The number and distribution of controllers are essential considerations to prevent network congestion with control packets like PACKET-IN messages.</p><p><strong>Control Mechanism: </strong>Control mechanisms in Software Defined Networking (SDN) are categorized into two approaches: Distributed and Centralized. <strong>Distributed control</strong> involves decentralized decision-making, with each subnetwork managed by a different controller. In contrast, <strong>Centralized control</strong> makes decisions in a centralized manner, with a single controller managing the entire network. The choice depends on network requirements and design.</p><p><strong>Backup Controller: </strong>To ensure reliability, a Backup Controller acts as a replica of the main controller. In case of failure, the backup controller takes over for uninterrupted network management.</p><p><strong>Security using SDN: </strong>SDN enhances security with features like firewalls, proxies, HTTP, and intrusion detection systems (IDS).</p><p><strong>Experimentation with SDN</strong> is done through simulators and emulators, enabling SDN configuration testing. Infrastructure must support OpenFlow, and controllers can be placed remotely or locally based on needs.</p><p><strong>Switch Deployment</strong> utilizes tools like Mininet, creating a virtual network with OpenFlow-enabled switches, supported in Python. Controllers can be configured using software tools like Pox, Nox, FloodLight, OpenDayLight, or ONOS for effective SDN network management.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*C0UsGzfmVfv3lycE1m4pQA.png" /></figure><p><strong>Benefits of Integrating SDN in IoT: </strong>Integrating SDN into IoT brings notable benefits, including intelligent routing, streamlined operations for information processing, enhanced visibility of network resources tailored to user, device, and application needs, and the capability for intelligent traffic analysis and coordinated decision-making within IoT networks.</p><p><strong>Challenges of Integrating SDN in IoT: </strong>Integrating SDN into IoT presents several challenges, including the need for real-time programming of sensor nodes, compatibility issues with vendor-specific architectures, resource constraints that limit heavy computation, and restricted memory capacities that limit the insertion of control programs. These challenges must be addressed to realize the full potential of SDN in IoT applications.</p><p><strong>Software Defined Wireless Sensor Networks (WSN): </strong>It offers innovative capabilities such as value-centric and ID-centric data forwarding, enabling data transmission based on specific criteria like data value or source node ID. Soft-WSN, a notable system in this context, provides comprehensive sensor device management, allowing multiple sensors on a single board and dynamic adjustments for sensing delay and active sleep modes. Furthermore, Soft-WSN empowers topology management, enabling node-specific and network-specific control over data forwarding, enhancing the adaptability and efficiency of WSNs.</p><p><em>That’s all for Week 7. Week 8 promises even more intriguing insights as our adventure continues. Your engagement is highly valued, so please share your thoughts and be part of our growing community. Thank you for joining us on this learning journey. Stay tuned for what lies ahead in Week 8!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44a42e833ad9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to IoT Week-6: SUMMARY]]></title>
            <link>https://medium.com/@pranaybhatnagar2025/introduction-to-iot-week-6-summary-af5080d3420c?source=rss-678c35ffda59------2</link>
            <guid isPermaLink="false">https://medium.com/p/af5080d3420c</guid>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[summary]]></category>
            <category><![CDATA[examination]]></category>
            <category><![CDATA[nptel]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Pranay Bhatnagar]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 16:52:47 GMT</pubDate>
            <atom:updated>2023-10-26T16:52:47.857Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome back to our IoT journey! Over the past five weeks, we’ve explored the depths of the Internet of Things (IoT), from its inception to practical applications. Now, we’re embarking on Week 6 of NPTEL’s Introduction to IoT course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0I90Kph5Cb25W7ahZAH4w.png" /></figure><p>Week 6 promises to be a gateway to the introduction of Python and exciting practical implementations. Let’s dive in and explore the next chapter of IoT innovation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*Q1Zx2waZh-P1DqwnnCJSVw.png" /></figure><p><strong>Why Python?</strong></p><p>It is a versatile language that is easy to script and easy to read and it doesn’t support strict rules for syntax. With its open-source nature, it forms a strong backbone for building large applications.</p><p><strong>Python IDE: </strong>A free open-source software that is used to write codes, integrate several modules and libraries. Examples: Spyder, Pycharm, etc.</p><p><strong>Data Types in Python:</strong> The course covers essential Python data types, including numbers, strings, lists, tuples, and dictionaries, highlighting their usage and manipulation.</p><p><strong>Control Statements: </strong>Control statements like “if,” “elif,” “else,” “while,” and “for” are explored to enable decision-making and repetitive operations in Python.</p><p><strong>Functions:</strong> The concept of functions in Python is introduced, allowing you to encapsulate code for reuse and modularity. You’ll learn how to define, call, and return values from functions.</p><p><strong>Variable Scope:</strong> The scope of variables, including global and local variables, is explained. You’ll understand how variable scope impacts your Python code.</p><p><strong>Modules: </strong>Python modules, segments of code designed for common tasks, are discussed. The use of modules like “random” for generating random numbers is demonstrated.</p><p><strong>Exception Handling:</strong> Dealing with exceptions, errors that occur during program execution, is explained. You’ll see how to use “try,” “except,” and “else” to handle exceptions gracefully.</p><p><strong>File Read and Write Operations:</strong> Python’s ability to read from and write to files is introduced. Key functions like “open,” “read,” “write,” and “close” are covered, along with best practices for file operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*0zG8XM2azb3rSZQC016TXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*a0RKMWLeS2Ez_VBwVcsGAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*LuBFn1wYsSMHLvGIWIuuZQ.png" /></figure><p><strong>Networking in Python: </strong>It provides network services for the client-server model. Socket support in the operating system allows to implementation of clients and servers for both connection-oriented and connectionless protocols.</p><p><strong>Web Sockets: </strong>Sockets are endpoints for communication between programs on a network. They facilitate inter-process communication by creating named contact points. Three main socket types exist: Stream Sockets (SOCK_STREAM), Datagram Sockets (SOCK_DGRAM), and Raw Sockets (SOCK_RAW).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*qaVmCWg52GALoVAWHD3Ciw.png" /></figure><p><strong>Use of Sockets in Process-To-Process Communication: </strong>Inter-process communication is facilitated by the operating system, allowing processes to communicate with each other. When two processes communicate over a network, they use a pair of sockets, one for each process.</p><p><strong>SYSTEM CALLS: </strong>System calls are used in socket programming:<br>- socket(): Creates a socket descriptor for both the client and the server.<br>- bind(): Associates the function with a specific IP and port.<br>- listen(): Listens for incoming connections in the network and selects a specific client to serve.<br>- connect(): Initiates a connection on the client side with the socket descriptor, remote server address, and the address’s length.<br>- accept(): Extracts a connection from the system’s buffer of pending connections.<br>- send(): Sends messages from the client to the server or vice versa.<br>- recv(): Receives messages at both ends.<br>- close(): Closes the connection.</p><p><strong>Introduction to Raspberry Pi: </strong>Raspberry Pi is a series of small single-board computers developed by the Raspberry Pi Foundation in the United Kingdom. These affordable, credit-card-sized computers have become a popular choice for DIY projects, education, and prototyping.</p><p><strong>Applications:</strong></p><p>1. Education: Raspberry Pi is widely used in schools and educational institutions to teach programming, electronics, and computer science.</p><p>2. Home Automation: It can be used to create smart home systems for controlling lights, appliances, and security.</p><p>3. Media Center: With the right software, it can turn your TV into a media center for streaming content and playing games.</p><p>4. IoT Projects: Raspberry Pi can serve as the brain of various Internet of Things (IoT) projects, from weather stations to home automation.</p><p>5. Robotics: It is an excellent choice for building robots and autonomous vehicles.</p><p>6. Web Server: Raspberry Pi can run a web server, hosting your website or web applications.</p><p>7. Desktop Computer: While not as powerful as a typical desktop PC, Raspberry Pi can handle basic computing tasks like web browsing, word processing, and programming.</p><p><strong>Setting up Raspberry Pi on Windows:</strong></p><p>1. Get the Hardware: You’ll need a Raspberry Pi board, a microSD card (8GB or more recommended), a power supply, an HDMI cable, and a USB keyboard and mouse.</p><p>2. Download the OS: Choose a Raspberry Pi-compatible operating system like Raspberry Pi OS (formerly Raspbian) and download it.</p><p>3. Flash the OS: Use a tool like “Balena Etcher” to flash the OS image onto the microSD card.</p><p>4. First Boot: Insert the microSD card, connect the HDMI cable to a monitor, and plug in the keyboard, mouse, and power supply. Turn on the Raspberry Pi.</p><p>5. Initial Setup: Follow the on-screen instructions to set up your preferences, including language, Wi-Fi, and password.</p><p>6. Software Updates: Open a terminal and run commands to update and upgrade the software.</p><p>7. Explore and Start Projects: Your Raspberry Pi is ready to use. Explore the pre-installed software or start your own projects.</p><p>Raspberry Pi is a versatile and fun tool for learning and creating, making it a fantastic choice for beginners and experienced tinkerers alike.</p><p><em>As we conclude Week 6 of our 12-week journey through NPTEL’s Introduction to IoT, we find ourselves in a more advanced realm of the Internet of Things. This week has been all about expanding our knowledge and diving deeper into IoT technologies and concepts. We’ve explored topics such as Raspberry Pi, Python fundamentals.</em></p><p><em>The foundation laid in the previous weeks continues to support our understanding of these advanced topics. With each passing week, we’re getting closer to becoming IoT experts. It’s exciting to see how IoT applications are transforming the world around us, and we’re equipping ourselves with the skills and knowledge to be a part of this change.</em></p><p><em>As we look ahead to Week 7, expect more exciting insights and hands-on experiences. The journey is far from over, and the world of IoT keeps getting more fascinating with every step.</em></p><p><em>If you’ve enjoyed Week 6 or have any questions and insights to share, please feel free to engage in the comments below. Your participation is greatly valued as we learn and grow together on this IoT adventure.</em></p><p><em>Thank you for joining us on this educational journey. Stay tuned for more in Week 7, and let’s keep exploring the limitless possibilities of the Internet of Things.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af5080d3420c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>