<?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 Keerthi Gopalavannan  on Medium]]></title>
        <description><![CDATA[Stories by Keerthi Gopalavannan  on Medium]]></description>
        <link>https://medium.com/@keerthigopalm?source=rss-fde66156f309------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TUHaoaKRtpOhVkhf600ISQ.jpeg</url>
            <title>Stories by Keerthi Gopalavannan  on Medium</title>
            <link>https://medium.com/@keerthigopalm?source=rss-fde66156f309------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:11:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@keerthigopalm/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[The Software That Won’t Die: Inside the Strange World of Legacy Information Systems]]></title>
            <link>https://medium.com/@keerthigopalm/the-software-that-wont-die-inside-the-strange-world-of-legacy-information-systems-24fde93d80ed?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/24fde93d80ed</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Sat, 09 May 2026 13:01:41 GMT</pubDate>
            <atom:updated>2026-05-09T13:01:41.503Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Why decades-old code still runs your bank, your airline, and your tax office — and what it actually takes to drag it into the present.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*UzvYK8-J9fAQtp5zbXgRkA.png" /><figcaption><em>Server rooms like these still run a meaningful share of the world’s banking, government, and airline systems.</em></figcaption></figure><h4>Why This Topic Matters More Than People Think</h4><p>There’s a quiet, slightly embarrassing fact about modern computing: a huge fraction of the software running the world today was written before most of its current users were born. The mainframe processing your salary deposit was probably first programmed in the 1970s. The reservation system that issued your last plane ticket has roots going back to the 1960s. The tax platform your government runs on may have been built when floppy disks were cutting-edge.</p><p>These are legacy information systems — large, business-critical software systems that have been in continuous operation for so long that nobody fully understands them anymore, yet replacing them is harder than keeping them alive. They are the unsung infrastructure of the digital world, and managing them is one of the most underrated skills in software engineering.</p><p>In this article, I’ll walk through what legacy systems actually are, why they refuse to die, the standard strategies for dealing with them — wrapping, migration, and replacement — and where the field is heading in an era of cloud, microservices, and AI-assisted code analysis.</p><h4>What Counts as a Legacy System?</h4><p>The textbook definition is simple but unsatisfying: a legacy system is any software still in active use that was built using outdated technology, methods, or architecture. The reality is more interesting. A system becomes “legacy” not when it gets old, but when it crosses a specific threshold:</p><p>• <strong>The original developers are gone.</strong> Documentation is incomplete, tribal knowledge has retired, and nobody remembers why a particular module behaves the way it does.</p><p>• <strong>The technology stack is no longer mainstream.</strong> Think COBOL, FORTRAN, PL/I, RPG, mainframe assembly, or early-2000s J2EE on application servers nobody has heard of in years.</p><p>• <strong>Change is risky.</strong> A small modification in one place breaks something seemingly unrelated three modules away. Regression testing is patchy because the test harness was never built.</p><p>• <strong>It still does its job.</strong> This is the kicker. The system works. It runs the business. It cannot simply be turned off.</p><p>A bank’s core ledger written in COBOL in 1985, processing millions of transactions a day with five-nines uptime, is the textbook example. So is the FAA’s air traffic control system, the IRS’s tax processing platform, and Sabre — the airline reservation backbone that started life on IBM mainframes in the 1960s and still routes a meaningful percentage of global flight bookings today.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*AdQ_0Z_8dmKQ2cQ7Jz11LQ.png" /><figcaption><em>COBOL code, written decades ago, still processes trillions of dollars in daily transactions.</em></figcaption></figure><h4>Why Legacy Systems Are So Hard to Kill</h4><p>If these systems are so old, why don’t organizations just rewrite them? The honest answer is that they’ve tried, and they’ve usually failed.</p><p>The Commonwealth Bank of Australia spent roughly A$1 billion over five years modernizing its core banking platform — a project considered one of the most successful in the industry, but one that very few institutions have the appetite to repeat. The UK’s NHS attempted a national IT overhaul in the 2000s that was eventually written off at a cost north of £10 billion. The US state of California has tried multiple times to replace its decades-old payroll system, with each attempt running over budget and being cancelled.</p><p>The reasons are remarkably consistent:</p><p>• <strong>Hidden business rules.</strong> Decades of regulatory tweaks, edge cases, and customer-specific exceptions are baked into the code. Nobody has a complete written specification — the code is the specification.</p><p>• <strong>Integration sprawl.</strong> A legacy system rarely lives alone. It’s wired into dozens of other systems through batch files, message queues, and direct database connections accumulated over decades.</p><p>• <strong>Risk asymmetry.</strong> If the new system fails, the company makes the news. If the old system keeps running, nobody notices. The political incentives favor inaction.</p><p>• <strong>Cost of correctness.</strong> A modern e-commerce site can afford a bug or two. A core banking system literally cannot afford to lose a single cent.</p><p>This is why most organizations don’t replace their legacy systems — they manage them. And there’s a well-developed playbook for doing so.</p><h4>The Three Standard Strategies</h4><p>When a team finally decides something must be done, the response usually falls into one of three categories: wrapping, migration, or replacement. Each has its own trade-offs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*wjLzpMk7I9OAO3IeUQs4FA.png" /><figcaption><em>Three strategies dominate legacy modernization: wrap it, move it, or replace it piece by piece.</em></figcaption></figure><h4>Strategy 1: Wrapping</h4><p>Wrapping is the gentlest approach. You leave the legacy system alone and put a modern interface in front of it — typically a REST API, a message bus, or a service layer. New applications talk to the wrapper; the wrapper talks to the legacy system using whatever ancient protocol it requires.</p><p>This approach has saved countless organizations enormous rewrite costs. A bank can expose its 1980s COBOL core through a clean JSON API, and a mobile app developer never needs to know that their “transfer money” call eventually runs through a green-screen 3270 terminal emulator behind the scenes.</p><p>The strength of wrapping is speed and low risk. The weakness is that you’ve added another layer of complexity without removing any. The legacy system still has to be maintained. Performance can suffer, especially when modern usage patterns hit a system designed for batch processing. And the wrapper itself becomes a piece of code somebody has to own forever.</p><p>A real-world example: many financial institutions still run mainframe-backed Open Banking APIs. The shiny REST endpoint required by regulators is a thin facade over CICS transactions that have been running for thirty years.</p><h4>Strategy 2: Migration</h4><p>Migration means moving the system to a new platform without fully rewriting the business logic. There are several flavors:</p><p>• <strong>Lift and shift.</strong> Move the existing system, more or less unchanged, onto modern infrastructure — a virtual machine, a container, or a cloud-hosted mainframe emulator like AWS Mainframe Modernization or Micro Focus Enterprise Server. The code barely changes; only the surroundings do.</p><p>• <strong>Replatforming.</strong> Translate the code from one technology to another while preserving its behavior. Tools now exist that automatically convert COBOL to Java or C#, though the output usually needs significant cleanup before it’s maintainable.</p><p>• <strong>Database migration.</strong> Move the underlying data store from a hierarchical or flat-file system to a modern relational or NoSQL database, while keeping the application logic intact for as long as possible.</p><p>Migration is more invasive than wrapping but less risky than full replacement. The catch is that the migrated system often inherits the structural problems of the original — you’ve moved the spaghetti to a nicer kitchen, but it’s still spaghetti.</p><h4>Strategy 3: Replacement</h4><p>Replacement means building a new system from scratch and eventually retiring the legacy one. This is the option everyone wants and few organizations execute well.</p><p>The most successful replacement pattern in modern practice is the Strangler Fig pattern, named by Martin Fowler after the tropical strangler fig vine that grows around a host tree, gradually overtaking it until the original tree is hollow but the structure remains. In software terms: route incremental pieces of functionality to a new system, one at a time, until the legacy system has nothing left to do and can be quietly switched off. Amazon, ING, and many large banks have used this pattern to migrate off monoliths over multi-year programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*HoMQI8G5EwvZNdDDlcxKKA.png" /><figcaption><em>The Strangler Fig pattern — named after a vine that quietly overtakes its host tree — is the safest way to replace a legacy system.</em></figcaption></figure><p>The advantage is that you avoid the catastrophic “big bang” cutover that has killed so many replacement projects. The disadvantage is that you live with two parallel systems — and the integration between them — for years. Discipline is everything.</p><h4>Planning a Legacy Project</h4><p>Whatever strategy you pick, the planning phase is where most projects are won or lost. The key elements of a serious legacy modernization plan include:</p><p>• <strong>Reverse engineering and documentation.</strong> Before you can change a system, you need to understand it. Modern tools can extract structure, dependencies, and call graphs from millions of lines of COBOL or PL/I in days rather than months. AI-assisted code summarization is starting to genuinely help here.</p><p>• <strong>Business value mapping.</strong> Not every line of code is worth migrating. Some legacy modules are dead. Others run rarely but matter enormously when they do. A good plan maps technical debt against business value before deciding what to keep, transform, or retire.</p><p>• <strong>Incremental delivery.</strong> The systems that successfully modernize do so in slices that deliver value within months, not years. Anything else loses executive support and gets cancelled.</p><p>• <strong>Data strategy.</strong> Data migration is almost always harder than code migration. Years of historical records, format inconsistencies, and silent assumptions need to be cleaned up — and the new system has to keep working with them.</p><p>• <strong>Test harness construction.</strong> Legacy systems rarely come with good test coverage. Building a test harness before changing anything is the difference between a project that succeeds and one that breaks production every Friday.</p><h4>Where the Field Is Heading</h4><p>Legacy modernization used to be a field defined by patience and consultancy hours. That’s changing fast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*6QxKnKOQFNb9CmXE0YxrGA.png" /><figcaption><em>AI-assisted code analysis is finally making it practical to understand million-line legacy codebases.</em></figcaption></figure><p><strong>Cloud-native modernization</strong> has become the default destination. Even mainframe vendors now offer pathways to AWS, Azure, and GCP, with services specifically aimed at running or replacing legacy workloads in the cloud.</p><p><strong>AI-assisted code analysis</strong> is the genuinely new frontier. Large language models trained on COBOL, RPG, and other legacy languages can now summarize complex modules, suggest refactorings, and even generate equivalent modern code. IBM’s watsonx Code Assistant and similar tools from the major cloud providers are aimed squarely at the millions of lines of COBOL still running in financial services.</p><p><strong>Low-code and process-mining platforms</strong> let organizations rebuild legacy workflows without writing as much code from scratch. Tools like Celonis can analyze how a legacy system is actually used in practice — often revealing that 80% of the functionality is rarely touched, dramatically narrowing what actually needs to be replaced.</p><p><strong>API-first architectures</strong> mean new systems are designed from day one to be wrapped, replaced, and decomposed without the trauma their predecessors caused. The legacy systems being built today will be far easier to modernize in 2050 than the ones built in 1985 are in 2025.</p><h4>Conclusion</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*WJEdLVjd7JoQ_ldLOlNp-A.png" /><figcaption><em>Modernization is rarely a sprint — it’s a multi-year journey from old to new.</em></figcaption></figure><p>Legacy information systems are often dismissed as embarrassing artifacts of older eras, but that view misses the point. These systems survive because they work — and the discipline of keeping them working, evolving them carefully, and eventually replacing them without breaking the business is one of the most consequential skills in software engineering.</p><p>The future of the field isn’t about a heroic rewrite that sweeps the old code away. It’s about a quieter, more thoughtful craft: understanding what the old system actually does, choosing the lightest intervention that delivers value, and replacing pieces incrementally with the patience of a strangler fig. The engineers who learn this craft become indispensable, because the work never really ends. There’s always another decades-old system somewhere, quietly running the world, waiting for someone who knows how to talk to it.</p><p><em>Originally published on Medium. Link: [paste URL here]</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24fde93d80ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Marshalling Across the Wire: How CORBA CDR, Java Serialization, and XML Solved the Same Problem…]]></title>
            <link>https://medium.com/@keerthigopalm/marshalling-across-the-wire-how-corba-cdr-java-serialization-and-xml-solved-the-same-problem-22c655c33f31?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/22c655c33f31</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Sat, 09 May 2026 08:17:25 GMT</pubDate>
            <atom:updated>2026-05-09T08:17:25.772Z</atom:updated>
            <content:encoded><![CDATA[<h3>Marshalling Across the Wire: How CORBA CDR, Java Serialization, and XML Solved the Same Problem Three Different Ways</h3><p><em>Why every distributed system needs an “external data representation” — and how the three classic answers shaped what we use today.</em></p><h3>The Problem Nobody Warns You About</h3><p>The first time you write a networked program, you discover something unsettling: the bytes you send aren’t always the bytes the other side reads. You write a 32-bit integer on your laptop, send it across the wire, and the receiver — running on a different CPU, OS, or language — interprets those four bytes as a different number entirely.</p><p>This is the <strong>external data representation</strong> problem. Two computers cannot exchange in-memory structures directly because they may not agree on byte order (big-endian vs little-endian), word size, floating-point format, character encoding, or object layout.</p><p>The fix is a two-step dance called <strong>marshalling</strong> (assembling data into a transmission-ready form) and <strong>unmarshalling</strong> (reconstructing it on the other side). The format used in between is the <em>external data representation</em>.</p><p>In this post, I’ll compare and contrast the three classic approaches: <strong>CORBA CDR, Java Object Serialization, and XML</strong>. Each was the right answer in its era. Each has weaknesses that drove the next generation of formats — Protocol Buffers, MessagePack, Apache Avro — that we use today.</p><h3>Approach 1: CORBA CDR — The Binary Standard for Polyglot Object Systems</h3><h4>Technical Design</h4><p>CORBA (Common Object Request Broker Architecture) was the 1990s answer to “how do objects in C++ talk to objects in Java talk to objects in Ada?” Its data format, <strong>Common Data Representation (CDR)</strong>, defines a compact binary encoding for 15 primitive types — short, long, float, double, char, boolean, octet, plus unsigned variants — and composite types like structs, sequences, arrays, and unions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*Hu3X946doYqu1uqY.jpg" /></figure><p>Key design choices:</p><ul><li><strong>Binary-compact.</strong> A 32-bit integer takes 4 bytes, not 11 ASCII digits.</li><li><strong>Aligned.</strong> Each primitive sits on its natural boundary, so receivers can read directly into memory without bit-shifting.</li><li><strong>Type-driven, not self-describing.</strong> The wire format contains <em>only the values</em>, not their types. Both sides must already know the structure from a shared <strong>IDL (Interface Definition Language)</strong> file.</li><li><strong>Endianness-tagged.</strong> A flag byte at the start of the message tells the receiver whether to byte-swap.</li></ul><p>A CORBA IDL definition looks like this:</p><pre>idl<br>struct Person {<br>    string name;<br>    long   age;<br>    double salary;<br>};</pre><p>The IDL compiler generates language-specific stubs and skeletons that handle marshalling automatically — both ends read and write the same byte stream regardless of language.</p><h4>Strengths</h4><ul><li><strong>Compact and fast.</strong> Binary encoding plus alignment makes CDR one of the fastest formats ever shipped.</li><li><strong>Language-neutral.</strong> C++, Java, Python, Ada — if there’s an IDL compiler, there’s CDR support.</li><li><strong>Strongly typed.</strong> The IDL contract is enforced at compile time on both sides.</li></ul><h4>Weaknesses</h4><ul><li><strong>Tight coupling.</strong> Both sides must have the <em>exact</em> IDL. Change a field, regenerate, redeploy everywhere.</li><li><strong>Operational complexity.</strong> CORBA itself is heavy — ORBs, naming services, vendor incompatibilities. The protocol is solid; the ecosystem killed it.</li><li><strong>Firewall-hostile.</strong> Binary on arbitrary TCP ports — not designed for the public internet.</li></ul><h4>Best fit</h4><p>Tightly controlled internal systems with strict performance budgets — telecom backplanes, financial trading floors, defense systems.</p><h3>Approach 2: Java Object Serialization — The Single-Language Convenience Engine</h3><h4>Technical Design</h4><p>Java Object Serialization solves a narrower but very Java-shaped problem: take a <em>graph of objects</em> in the JVM and turn it into a byte stream that can be reconstituted in another JVM.</p><ul><li>A class implements java.io.Serializable — a marker interface with no methods.</li><li>ObjectOutputStream.writeObject(obj) walks the object&#39;s fields recursively, writing class metadata followed by field values.</li><li>Object graphs are handled with reference-tracking: if A holds two references to B, B is serialized once and referenced by handle the second time. Cycles are handled correctly.</li><li>A 64-bit serialVersionUID is written with every serialized class. On deserialization, if the receiving JVM&#39;s class has a different UID, an InvalidClassException is thrown.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Kp71u6ksBf5mUtOt.jpg" /></figure><p>A typical example:</p><pre>public class Person implements Serializable {<br>    private static final long serialVersionUID = 1L;<br>    private String name;<br>    private int    age;<br>    private double salary;<br>}<br><br>// Marshalling<br>try (var out = new ObjectOutputStream(new FileOutputStream(&quot;p.ser&quot;))) {<br>    out.writeObject(new Person(&quot;Ada&quot;, 36, 95_000.0));<br>}<br><br>// Unmarshalling<br>try (var in = new ObjectInputStream(new FileInputStream(&quot;p.ser&quot;))) {<br>    Person p = (Person) in.readObject();<br>}</pre><h4>Strengths</h4><ul><li><strong>Zero boilerplate.</strong> No IDL, no schema, no codegen. Add implements Serializable and you&#39;re done.</li><li><strong>Handles object graphs natively.</strong> Cycles, shared references, polymorphism, and inheritance all work.</li><li><strong>Pluggable.</strong> Override writeObject/readObject for custom logic, or implement Externalizable for full control.</li></ul><h4>Weaknesses</h4><ul><li><strong>Java-only.</strong> A Python service cannot read a Java serialized object without a bridge.</li><li><strong>Brittle versioning.</strong> Add a field, forget to update serialVersionUID, and every existing serialized blob breaks.</li><li><strong>A notorious security risk.</strong> Deserializing untrusted bytes can trigger arbitrary code execution via crafted “gadget chains” — this attack class led to the Equifax breach (CVE-2017–9805) and many others. Modern guidance is <em>never</em> deserialize data you didn’t produce.</li></ul><h4>Best fit</h4><p>Pure-Java environments where both ends are under your control — RMI between trusted services, JVM-only caches, session replication. Avoid for anything crossing a trust boundary.</p><h3>Approach 3: XML — The Self-Describing Lingua Franca of the Web</h3><h4>Technical Design</h4><p>XML went the opposite direction from CDR: instead of stripping the wire format down to bare values, it makes everything <strong>self-describing</strong>. Values are wrapped in named tags, schemas (XSD) describe valid structure, and namespaces resolve naming conflicts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6nzKyQ_uhGnMNSbH.png" /></figure><p>A serialized Person in XML:</p><pre>&lt;Person xmlns=&quot;http://example.com/people&quot;&gt;<br>    &lt;name&gt;Ada&lt;/name&gt;<br>    &lt;age&gt;36&lt;/age&gt;<br>    &lt;salary&gt;95000.0&lt;/salary&gt;<br>&lt;/Person&gt;</pre><p>Wrapped in SOAP for a web service call, it grows further:</p><pre>&lt;soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;<br>    &lt;soap:Body&gt;<br>        &lt;getPerson xmlns=&quot;http://example.com/people&quot;&gt;<br>            &lt;id&gt;42&lt;/id&gt;<br>        &lt;/getPerson&gt;<br>    &lt;/soap:Body&gt;<br>&lt;/soap:Envelope&gt;</pre><p>XML became the foundation of the SOAP web services stack — WSDL described interfaces, SOAP carried messages, and the WS-* ecosystem grew up around it.</p><h4>Strengths</h4><ul><li><strong>Human-readable.</strong> You can curl an endpoint and immediately understand what&#39;s wrong.</li><li><strong>Self-describing and extensible.</strong> New fields can be added without breaking older parsers — they simply ignore unknown tags.</li><li><strong>Universally supported.</strong> Every language has multiple XML parsers; firewalls and proxies all understand text-over-HTTP.</li><li><strong>Rich tooling.</strong> XSD validation, XPath, XSLT, signatures, and encryption are all part of the ecosystem.</li></ul><h4>Weaknesses</h4><ul><li><strong>Verbose.</strong> That &lt;Person&gt; payload is roughly ten times the size of the equivalent CDR encoding. At scale, that&#39;s real bandwidth and parsing cost.</li><li><strong>Slow to parse.</strong> Streaming parsers (SAX, StAX) help, but XML will never match binary formats on throughput.</li><li><strong>Schema complexity.</strong> XSD, namespaces, and the WS-* stack became infamous for over-engineering.</li></ul><h4>Best fit</h4><p>Cross-organization integration where readability matters more than bytes on the wire — government, healthcare (HL7), banking (FIX, SWIFT), and contexts where partners need to read the wire format directly.</p><h4>Side-by-Side Summary</h4><p><strong>Format.</strong> CDR uses aligned binary. Java Serialization is binary but JVM-specific. XML is textual and tag-based.</p><p><strong>Self-describing.</strong> CDR isn’t and relies on a shared IDL. Java Serialization is partial via embedded class metadata. XML is fully self-describing through tags and schemas.</p><p><strong>Language support.</strong> CDR is multi-language via IDL compilers. Java Serialization is Java-only. XML works everywhere.</p><p><strong>Size on the wire.</strong> CDR is smallest, Java Serialization sits in the middle, XML is largest.</p><p><strong>Speed.</strong> CDR is fastest to parse, Java Serialization fast, XML slowest.</p><p><strong>Versioning.</strong> CDR requires an IDL recompile. Java Serialization relies on matching serialVersionUID. XML lets you add tags freely without breaking older parsers.</p><p><strong>Security.</strong> CDR benefits from strong typing. Java Serialization is notoriously risky with untrusted data. XML benefits from schema validation.</p><p><strong>Sweet spot.</strong> CDR for polyglot internal RMI. Java Serialization for trusted JVM-to-JVM. XML for public, cross-organization integration.</p><h3>What Came Next</h3><p>None of these three formats dominate today, but each shaped its successor.</p><ul><li><strong>Protocol Buffers</strong> (Google, 2008) is CDR’s spiritual heir: schema-driven, binary, compact, polyglot — with a far simpler ecosystem than CORBA. It powers gRPC.</li><li><strong>Apache Avro</strong> (Hadoop, 2009) ships the schema <em>with</em> the data, so writers and readers can evolve independently — a direct response to the brittleness of serialVersionUID.</li><li><strong>MessagePack</strong> is “binary JSON” — schema-less, self-describing, roughly as fast as Protobuf for small messages.</li><li><strong>JSON over HTTP</strong> quietly replaced XML for most public APIs by trading heavyweight tooling for radical simplicity.</li></ul><p>The pattern across all three classics — and their successors — is the same trade-off triangle: <strong>size, speed, self-description</strong>. You can have any two cheaply; the third costs you.</p><h3>Wrapping Up</h3><p>CORBA CDR optimized for speed and size at the cost of self-description. Java Serialization optimized for developer convenience inside a single language at the cost of portability and security. XML optimized for self-description and ecosystem reach at the cost of size and parse time. Every modern format is a deliberate move on this same triangle.</p><p>The takeaway for designing distributed systems today: there is no universal best format. There is only a clear-eyed match between your trust boundaries, your performance budget, and how independently your producers and consumers need to evolve. Pick well and the wire format will quietly do its job for years — the highest praise you can give it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22c655c33f31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockchain: A Deep Dive Into the Distributed System That Refuses to Trust Anyone]]></title>
            <link>https://medium.com/@keerthigopalm/blockchain-a-deep-dive-into-the-distributed-system-that-refuses-to-trust-anyone-52358226d898?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/52358226d898</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Tue, 05 May 2026 04:07:22 GMT</pubDate>
            <atom:updated>2026-05-09T08:21:07.645Z</atom:updated>
            <content:encoded><![CDATA[<p>How a network with no boss, no central database, and no global clock still manages to agree on the truth.</p><figure><img alt="Block chain" src="https://cdn-images-1.medium.com/max/840/0*W9fnNwX3RQRtGQX9.png" /></figure><h3>Why Blockchain Is Worth Understanding</h3><p>When most people hear <em>blockchain</em>, they think of Bitcoin, NFTs, or someone trying to sell them a JPEG of a monkey. But underneath the hype, blockchain is one of the cleanest real-world examples of a distributed system you can study. It has no central server, no single point of failure, no global clock — yet thousands of strangers’ computers manage to agree on a shared history of transactions every few seconds.</p><p>In this post, I’ll cover what blockchain is, how it’s used, what <em>type</em> of distributed system it represents, and how it delivers the seven properties every serious distributed system aspires to <strong>fault tolerance, high availability, recoverability, consistency, scalability, predictable performance, and security.</strong></p><h3>What Is Blockchain, Really?</h3><p>A blockchain is an append-only, replicated ledger maintained by a network of nodes that don’t trust each other. Each block contains a batch of transactions, a timestamp, a cryptographic hash of the previous block, and a consensus proof — a Proof-of-Work solution or a validator signature. Because every block points back to the one before it, tampering with any historical block would require recomputing every block after it, across the majority of the network. That is computationally and economically impractical.</p><p>Three ingredients make this work:</p><ul><li><strong>Cryptographic hashing</strong> (typically SHA-256) chains the blocks together so any change is immediately visible.</li><li><strong>Public-key cryptography</strong> lets users sign transactions without revealing private keys.</li><li><strong>A consensus algorithm</strong> — Proof of Work, Proof of Stake, PBFT, and others — lets nodes agree on the next block without a central coordinator.</li></ul><p>The result is a database that nobody owns, everybody can read, and nobody can quietly rewrite.</p><h3>How Blockchain Is Used in the Real World</h3><p>Blockchain is no longer a science experiment. It powers:</p><ul><li><strong>Cryptocurrencies</strong> like Bitcoin and Ethereum, which together settle hundreds of billions of dollars in transactions each year.</li><li><strong>Smart-contract platforms</strong> running DeFi, lending, and insurance protocols on Ethereum, Solana, and Polygon.</li><li><strong>Supply-chain tracking</strong> used by Walmart and Maersk via Hyperledger Fabric to trace food and shipping containers from origin to shelf.</li><li><strong>Digital identity and credentials</strong> through projects like Sovrin and the EU’s EBSI.</li><li><strong>Central Bank Digital Currencies</strong> currently piloted by China (e-CNY), the EU (digital euro), and others.</li></ul><p>The common thread: parties who don’t fully trust each other still need a shared, tamper-evident record of what happened.</p><h3>What Type of Distributed System Is It?</h3><p>Distributed systems are usually classified by architecture: client-server, three-tier, N-tier, and peer-to-peer. Blockchain is a textbook <strong>peer-to-peer (P2P) system</strong>. There are no privileged servers; every full node stores the entire ledger, validates transactions, and propagates blocks to its neighbors using a gossip protocol. Responsibilities are uniformly distributed.</p><p>It also belongs to two more specialized categories: a <strong>replicated state machine</strong>, where every node executes the same transactions in the same order so they all converge to the same state, and a <strong>Byzantine fault-tolerant system</strong>, where nodes are assumed to potentially <em>lie</em> — not just crash. That last point is what makes blockchain genuinely novel: it solves a harder version of the consensus problem than most enterprise systems ever attempt.</p><h3>How Blockchain Delivers the Seven Desired Properties</h3><p>This is where blockchain really earns its reputation. Let’s walk through each property in turn.</p><h3>1. Fault Tolerance</h3><p>Blockchain is built on the assumption that nodes will crash, go offline, get hacked, or actively misbehave. The Bitcoin network can lose a huge fraction of its tens of thousands of full nodes overnight and continue producing valid blocks because each one holds a complete copy of the ledger. Consensus algorithms like Proof of Work and Proof of Stake tolerate up to a defined fraction of faulty participants — under 50% in PoW, under one-third in BFT-style systems. Failure of any individual node never produces incorrect results; the chain ignores it and moves on.</p><h3>2. High Availability</h3><p>Because the ledger is fully replicated across thousands of geographically dispersed nodes, the probability of the entire network going down is vanishingly small. Bitcoin’s main network has had over 99.98% uptime since 2009 — longer than most banks’ core systems. Even when entire countries block access (as has happened repeatedly), nodes elsewhere keep the network alive, and users in the blocked region can rejoin via VPNs, satellite, or mesh networks like Blockstream Satellite.</p><h3>3. Recoverability</h3><p>When a blockchain node comes back online after a crash, it asks its peers for any blocks it missed, verifies them against the chain it already has, and catches up to the current tip — a process called <em>initial block download</em> or <em>fast sync</em>. No manual intervention is required, and no data is lost, because the block history is held by every other node. This is recoverability built directly into the protocol rather than bolted on as a backup-and-restore procedure.</p><h3>4. Consistency</h3><p>Without a global clock, blockchain achieves consistency through <strong>eventual consensus</strong>. When two miners produce valid blocks at nearly the same time, the chain temporarily forks, and nodes briefly disagree on the latest block. The longest-chain rule (or heaviest-chain rule in Proof of Stake) resolves this within a few blocks: nodes converge on whichever fork has the most accumulated work or stake behind it. After roughly six confirmations on Bitcoin, the probability of reorganization becomes negligible. Strictly speaking, this is <em>eventual consistency</em> rather than strong consistency — the trade-off blockchain makes to remain available and partition-tolerant under the CAP theorem.</p><h3>5. Scalability</h3><p>This is blockchain’s most controversial property. A system is scalable if the cost of adding a user grows as a constant amount of resources. Bitcoin and Ethereum’s base layers struggle here, capped at roughly 7 and 15 transactions per second respectively, far below Visa’s 24,000+. The community has responded with a layered approach reminiscent of how DNS solved its own scalability problem decades ago: <strong>Layer-2 solutions</strong> (Lightning Network, Optimistic and zk-Rollups) handle most traffic off-chain; <strong>sharding</strong> (planned in Ethereum, used in Near) splits the network into parallel chains; and <strong>lighter consensus mechanisms</strong> like Proof of Stake and DAG-based ledgers (Hedera, IOTA) sidestep the energy and throughput limits of Proof of Work. Scalability remains a moving target, but the architectural pattern — push work down a hierarchy — is a well-proven distributed-systems strategy.</p><h3>6. Predictable Performance</h3><p>Blockchain is unusual here: it deliberately trades raw latency for predictability. Bitcoin produces a block roughly every 10 minutes, and Ethereum every 12 seconds, because the protocol <em>adjusts difficulty</em> to keep block intervals stable regardless of how much computing power joins or leaves the network. Users may not get sub-second confirmations, but they get a known, bounded waiting time. For settlement systems, predictable finality is often more valuable than low average latency — a property banks and clearinghouses care about deeply.</p><h3>7. Security</h3><p>Security covers confidentiality, integrity, and availability. Blockchain handles each one differently:</p><ul><li><strong>Integrity</strong> is the property blockchain is most famous for. Cryptographic hashing makes the ledger tamper-evident, changing one transaction in block 500,000 would invalidate every block after it.</li><li><strong>Authentication</strong> is enforced via digital signatures. Only the holder of the correct private key can spend a given UTXO or send from a given account — your key <em>is</em> your identity.</li><li><strong>Availability</strong> is protected by replication and the economic cost of attack. Mounting a 51% attack on Bitcoin would currently cost billions per day in hardware and electricity.</li><li><strong>Confidentiality</strong> is the weakest link in public blockchains: every transaction is visible to all. Privacy chains like Monero and Zcash, plus zero-knowledge systems like zk-SNARKs, address this where needed.</li></ul><h3>Closing Thoughts</h3><p>What I find genuinely interesting about blockchain as a distributed system is how directly it stress-tests every classical concept. No global clock? Solved with timestamping and longest-chain rules. Independent failures? Assumed by default. Concurrency? Handled by deterministic transaction ordering. Each classical challenge has a specific blockchain answer, and each answer comes with its own trade-offs.</p><p>Blockchain is not a perfect distributed system — its scalability and energy costs are real and unsolved — but it is one of the most thoroughly <em>adversarial</em> distributed systems ever deployed. It assumes that other participants are not just unreliable but actively malicious, and it still manages to coordinate billions of dollars of activity every day.</p><p>If you take one thing away from this post, let it be this: the seven properties of a good distributed system aren’t a checklist. They’re a set of dials, and every real-world system — blockchain included — has chosen which ones to maximize and which to compromise on. Understanding those trade-offs is what turns distributed-systems theory into engineering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52358226d898" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Computing]]></title>
            <link>https://medium.com/@keerthigopalm/cloud-computing-9a35691672b9?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a35691672b9</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Sun, 26 Oct 2025 04:25:52 GMT</pubDate>
            <atom:updated>2025-10-26T04:25:52.874Z</atom:updated>
            <content:encoded><![CDATA[<p>Everything you need to know about the cloud and how it powers today’s digital world</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*zohitJAxZN2CSKBmfQsLIQ.avif" /></figure><p><strong>What Is Cloud Computing?</strong></p><p><strong>Cloud Computing</strong> is the delivery of <strong>computing services</strong> — such as servers, storage, databases, networking, software, and analytics — <strong>over the Internet</strong> (<strong><em>“The cloud”)</em></strong> instead of running them on your local computer.</p><p><em>‘Cloud computing lets you use IT resources </em><strong><em>on-demand</em></strong><em>, </em><strong><em>anywhere</em></strong><em>, and </em><strong><em>without owning or managing the hardware</em></strong><em>.’</em></p><p>Ex:- Think about <strong>Google Drive</strong>.<br> You can store files, share them, and access them from any device — without worrying about managing servers or disks.<br> That’s cloud computing in action.</p><p><strong>How Cloud Computing Works?</strong></p><p>Cloud providers like AWS, Azure, and Google Cloud own <strong>data centers</strong> full of servers.<br> They use <strong>virtualization</strong> to divide physical servers into multiple virtual machines that users rent as needed.</p><p>When you use the cloud</p><ol><li>You <strong>request a resource</strong> (like a virtual machine or database).</li><li>The <strong>cloud provider</strong> allocates and manages it for you.</li><li>You <strong>pay only for what you use</strong>.</li></ol><h4><strong>Cloud Computing Architecture</strong></h4><p>Cloud computing typically has <strong>three main layers</strong></p><ol><li><strong>Frontend</strong> — The user interface (like a web browser or app).</li><li><strong>Backend</strong> — Servers, databases, and storage that perform tasks.</li><li><strong>Cloud Platform</strong> — Manages communication, security, and resource allocation between front and back ends.</li></ol><h4><strong>Key Characteristics of Cloud Computing</strong></h4><ol><li>On-Demand Self-Service -</li><li>Broad Network Access - Accessible from anywhere with an Internet connection.</li><li>Resource Pooling - Resources are shared across multiple users dynamically.</li><li>Rapid Elasticity - Resources can scale up or down automatically based on demand.</li><li>Measured Service - Pay only for what you use (metered usage).</li></ol><h4><strong>Cloud Service Models</strong></h4><p>Cloud computing offers <strong>three main service models</strong> IaaS, PaaS, and SaaS often called the <strong>Cloud Stack</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/271/1*MiC8NByfHdAyaM3O2NdGfg.png" /></figure><h4>1. Infrastructure as a Service (IaaS)</h4><p>Provides <strong>virtualized computing resources</strong> over the Internet.<br> You rent hardware, networking, and storage.</p><ul><li>Ex:- AWS EC2, Google Compute Engine, Microsoft Azure VM</li><li>Users manage:- OS, apps, and runtime</li><li>Best for:- System admins and developers</li></ul><p>Hosting virtual machines, servers, or backups</p><h4>2. Platform as a Service (PaaS)</h4><p>Provides a <strong>development and deployment platform</strong>.<br> You don’t manage the infrastructure — only your applications.</p><ul><li>Ex:- Google App Engine, AWS Elastic Beanstalk, Heroku</li><li>Users manage:- Applications only</li><li>Best for:- Developers who want to focus on coding</li></ul><p>Building and deploying web apps without managing servers</p><h4>3. Software as a Service (SaaS)</h4><p>Provides <strong>ready-to-use software applications</strong> over the Internet.</p><ul><li>Ex:- Gmail, Google Docs, Salesforce, Zoom</li><li>Users manage:- Nothing — everything is handled by the provider</li><li>Best for:- End users</li></ul><p>Email, file sharing, CRM, project management tools</p><h4><strong>Cloud Deployment Models</strong></h4><p>There are <strong>four main types of cloud deployments</strong>, depending on ownership and access.</p><h3>1. Public Cloud</h3><p>Owned and managed by third-party providers. Shared among multiple users.</p><ul><li>Ex:- AWS, Microsoft Azure, Google Cloud</li><li>Pros:- Low cost, scalable, easy setup</li><li>️ Cons:- Less control, possible security concerns</li></ul><h3>2. Private Cloud</h3><p>Used exclusively by one organization.</p><ul><li>Examples: VMware, OpenStac</li><li>Pros: High security, full control</li><li>Cons: Expensive to set up and maintain</li></ul><h3>3. Hybrid Cloud</h3><p>Combination of public and private clouds, connected to share data and applications.</p><ul><li>Pros: Flexibility, scalability, control</li><li>️ Cons: Complex integration</li></ul><h3>4. Multi-Cloud</h3><p>Using services from multiple cloud providers at once (e.g., AWS + Azure).</p><ul><li>Pros: Avoids vendor lock-in, increased redundancy</li><li>️ Cons: More management complexity</li></ul><h4>Advantages of Cloud Computing</h4><p>Cost Efficiency</p><p><strong>Scalability</strong></p><p><strong>Accessibility</strong></p><p>Security</p><p>Reliability</p><p>Automatic Updates</p><h4>Challenges and Risks</h4><p>Data Security &amp; Privacy</p><p><strong>Cost Management</strong></p><p>Internet Dependency</p><p>Vendor Lock-In (Hard to move to another provider)</p><p>Compliance Issues</p><p><strong>Real-World Applications of Cloud Computing</strong></p><p>Business - Data storage, ERP, CRM (Salesforce)</p><p>Gaming - Cloud gaming</p><p>Education - Online learning platforms (Google Classroom, Coursera)</p><p>Healthcare - Medical record systems, telemedicine</p><p>AI &amp; Data Science - Machine learning model training and deployment</p><p>Mobile Apps - Backend hosting and user authentication</p><h4>Major Cloud Providers</h4><ul><li>Amazon Web Services (AWS)</li><li>Microsoft Azure</li><li>Google Cloud Platform (GCP)</li><li>IBM Cloud</li><li>Oracle Cloud</li></ul><h3>Future of Cloud Computing</h3><p>Cloud computing continues to evolve rapidly with trends like</p><ul><li><strong>Serverless Computing</strong> — Run code without managing servers (AWS Lambda, Azure Functions).</li><li><strong>Edge Computing</strong> — Processing data closer to devices for faster response.</li><li><strong>AI &amp; Machine Learning in Cloud</strong> — Cloud-based AI tools like AWS SageMaker, Vertex AI.</li><li><strong>Quantum Cloud Computing</strong> — Early-stage tech for solving complex problems.</li></ul><p>Cloud computing has transformed the way the world runs technology.<br> From storing photos on Google Drive to deploying AI models on AWS, cloud technology powers nearly everything around us.</p><p>As a developer or engineer, understanding how cloud systems work and how to build, deploy, and scale in the cloud is a must-have skill for the future.</p><p><em>“The cloud is not the future, it’s the present.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a35691672b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Redux in React]]></title>
            <link>https://medium.com/@keerthigopalm/redux-in-react-14553448a378?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/14553448a378</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Tue, 21 Oct 2025 18:31:01 GMT</pubDate>
            <atom:updated>2025-10-21T18:31:01.235Z</atom:updated>
            <content:encoded><![CDATA[<p>Simplify state management in React apps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*51nAe6PlqPJobGBI24D7GQ.png" /></figure><p>If you’ve ever worked on a growing React application, you’ve probably noticed that managing state can become complicated.<br> As components grow, data starts moving up and down the component tree, and you end up with what developers call <strong>“prop drilling”</strong> — passing the same data through multiple layers.</p><p>That’s exactly the kind of problem <strong>Redux</strong> was created to solve.</p><h3><strong>What Is Redux?</strong></h3><p><strong>Redux</strong> is a <strong>state management library</strong> for JavaScript applications.<br> It helps you manage and share data (state) across your entire app in a predictable way.</p><p>Redux keeps all your app’s state in <strong>one central place (a store)</strong> instead of scattering it across components.</p><p>“React + Redux = Easier data flow and cleaner structure.”</p><h3><strong>Why Use Redux?</strong></h3><ol><li><strong>Centralized State</strong></li><li>Predictable Updates</li><li>Easier Debugging</li><li>Consistent Data Flow</li><li>Better Testing</li></ol><p>Redux shines in <strong>medium to large</strong> applications, where multiple components need access to the same data — for example, a shopping cart, authentication system, or dashboard.</p><h3><strong>Core Concepts of Redux</strong></h3><p>Redux is built around <strong>three main principles</strong>.</p><ol><li><strong>Store</strong></li></ol><p>The <strong>store</strong> is a single JavaScript object that holds the whole application state.</p><pre>import { createStore } from &#39;redux&#39;;<br>const store = createStore(reducer);</pre><p>2. <strong>Actions</strong></p><p>An <strong>action</strong> is a simple JavaScript object that describes what you want to do. It must have a <em>type </em>property.</p><pre>const addToCart = (product) =&gt; {<br>  return {<br>    type: &#39;ADD_TO_CART&#39;,<br>    payload: product,<br>  };<br>};</pre><p>Think of it like saying, <em>“Hey Redux! Add this product to the cart!”</em></p><blockquote>3. <strong><em>Reducers</em></strong></blockquote><p>A <strong>reducer</strong> is a pure function that takes the current state and an action, and returns a <em>new</em> state.</p><pre>const cartReducer = (state = [], action) =&gt; {<br>  switch (action.type) {<br>    case &#39;ADD_TO_CART&#39;:<br>      return [...state, action.payload];<br>    default:<br>      return state;<br>  }<br>};</pre><p>Reducers decide <em>how</em> the state should change when an action is triggered.</p><p><strong>How It Works Together</strong></p><ol><li>A <strong>component</strong> dispatches an <strong>action</strong>.</li><li>The <strong>reducer</strong> receives that action and updates the <strong>store</strong>.</li><li>Components <strong>subscribe</strong> to the store and re-render when the state changes.</li></ol><p>Visual flow: <em>Component → Action → Reducer → Store → Component</em></p><p>That’s the <strong>unidirectional data flow</strong> that makes Redux so predictable.</p><h3><strong>Using Redux in a React App</strong></h3><p>Step -1- Install</p><pre>npm install redux react-redux</pre><p>Step -2- Create a Store and Reducer</p><pre>// store.js<br>import { createStore } from &#39;redux&#39;;<br><br>const counterReducer = (state = 0, action) =&gt; {<br>  switch (action.type) {<br>    case &#39;INCREMENT&#39;: return state + 1;<br>    case &#39;DECREMENT&#39;: return state - 1;<br>    default: return state;<br>  }<br>};<br><br>export const store = createStore(counterReducer);</pre><p>Step -3- Provide the Store to React</p><pre>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom/client&#39;;<br>import { Provider } from &#39;react-redux&#39;;<br>import App from &#39;./App&#39;;<br>import { store } from &#39;./store&#39;;<br><br>ReactDOM.createRoot(document.getElementById(&#39;root&#39;)).render(<br>  &lt;Provider store={store}&gt;<br>    &lt;App /&gt;<br>  &lt;/Provider&gt;<br>);</pre><p>Step -4- Use Redux Hooks in Components</p><pre>import { useSelector, useDispatch } from &#39;react-redux&#39;;<br><br>function Counter() {<br>  const count = useSelector((state) =&gt; state); // get state<br>  const dispatch = useDispatch(); // send actions<br><br>return (<br>    &lt;div&gt;<br>      &lt;h2&gt;Count: {count}&lt;/h2&gt;<br>      &lt;button onClick={() =&gt; dispatch({ type: &#39;INCREMENT&#39; })}&gt;+&lt;/button&gt;<br>      &lt;button onClick={() =&gt; dispatch({ type: &#39;DECREMENT&#39; })}&gt;-&lt;/button&gt;<br>    &lt;/div&gt;<br>  );<br>}<br><br>export default Counter;</pre><p>That’s it!<br>Component now reads and updates data from the <strong>Redux store</strong> without prop drilling.</p><p><strong>When to Use Redux</strong></p><p>You <strong>don’t need Redux for every app</strong>.<br> If your state is simple or used only in a few components, React’s useState or Context API is enough.</p><p>Use Redux when:</p><ul><li>You have <strong>complex global state</strong> (auth, user data, theme, etc.)</li><li>Many components need to share and update the same data</li><li>You want <strong>predictable, testable</strong> state transitions</li></ul><p>Redux might seem intimidating at first, but once you understand its flow <strong><em>Action → Reducer → Store → UI</em></strong><em> </em>it becomes a powerful tool for organizing your React app’s state.</p><p>Modern Redux (with <strong>Redux Toolkit</strong>) makes things even easier and more developer-friendly, but the core principles remain the same.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14553448a378" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Exceptions -Java]]></title>
            <link>https://medium.com/@keerthigopalm/custom-exceptions-java-32b82e1a207e?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/32b82e1a207e</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 18:31:59 GMT</pubDate>
            <atom:updated>2025-10-20T18:31:59.257Z</atom:updated>
            <content:encoded><![CDATA[<h3>Custom Exceptions in Java</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*DtmjVfetcxhRf-R9KGL6lQ.png" /></figure><p><strong>What Is a Custom Exception?</strong></p><p>A <strong>Custom Exception</strong> is a user-defined class that extends either (checked) Exception or RuntimeException (unchecked).<br> It allows developers to create meaningful and descriptive error messages tailored to their application’s context.</p><p>Example :</p><p>If you are building a banking system, instead of throwing a generic Exception, you can create your own</p><pre>throw new InsufficientFundsException(&quot;Balance is too low for this withdrawal!&quot;);</pre><p>This message clearly explains what went wrong — much better than “Exception occurred”.</p><p><strong>Why Use Custom Exceptions?</strong></p><p>Custom exceptions make your code more,</p><ul><li><strong>Readable</strong> — clearly states the problem instead of generic messages.</li><li><strong>Maintainabl</strong>e — makes debugging easier and logs more meaningful.</li><li><strong>Modular</strong> — keeps error handling close to your domain logic.</li><li><strong>Reusabl</strong>e — can be caught and handled separately across layers (controller, service, etc.).</li></ul><p><strong>Types of Custom Exceptions</strong></p><p><em>Checked Custom Exception</em></p><p>If you want the compiler to ensure handling, extend the Exception class.</p><pre>public class InvalidAgeException extends Exception {<br>    public InvalidAgeException(String message) {<br>        super(message);<br>    }<br>}</pre><p>Use it like this</p><pre>public void registerUser(int age) throws InvalidAgeException {<br>    if (age &lt; 18) {<br>        throw new InvalidAgeException(&quot;User must be 18 or older to register&quot;);<br>    }<br>}</pre><p>And handle it</p><pre>try {<br>    registerUser(16);<br>} catch (InvalidAgeException e) {<br>    System.out.println(&quot;Error: &quot; + e.getMessage());<br>}</pre><p>Checked exceptions are checked <em>at compile-time</em>, so the method must handle or declare them.</p><p><em>Unchecked Custom Exception</em></p><p>If you don’t want the compiler to enforce handling, extend RuntimeException.</p><pre>public class InvalidInputRuntimeException extends RuntimeException {<br>    public InvalidInputRuntimeException(String message) {<br>        super(message);<br>    }<br>}</pre><p>Use it like</p><pre>public void processData(String input) {<br>    if (input == null) {<br>        throw new InvalidInputRuntimeException(&quot;Input cannot be null&quot;);<br>    }<br>}</pre><p>Unchecked exceptions are checked <em>at runtime</em>. Use them for programmer errors or logic validation.</p><p><strong>Best Practices for Custom Exceptions</strong></p><p>✔Use <strong>meaningful names (Eg: </strong>UserNotFoundException , InvalidTransactionException)<br> ✔ Keep <strong>constructors simple</strong> — usually, a message and a cause are enough.<br> ✔ Don’t create unnecessary custom exceptions — only when built-in ones don’t fit.<br> ✔ Log exceptions once — avoid multiple redundant logs.<br> ✔Add <strong>contextual messages</strong> to make debugging easier.</p><p><strong>Real-World Example</strong></p><p>building an <strong>online payment system</strong></p><pre>// 1. Base Exception<br>public class PaymentException extends Exception {<br>    public PaymentException(String message) {<br>        super(message);<br>    }<br>}<br><br><br>// 2. Specific Exception<br>public class InsufficientBalanceException extends PaymentException {<br>    public InsufficientBalanceException(String message) {<br>        super(message);<br>    }<br>}</pre><p>Usage</p><pre>public void processPayment(double balance, double amount) throws PaymentException {<br>    if (balance &lt; amount) {<br>        throw new InsufficientBalanceException(&quot;Not enough funds to complete the payment&quot;);<br>    }<br>    System.out.println(&quot;Payment successful!&quot;);<br>}</pre><p><strong>Handling:</strong></p><pre>try {<br>    processPayment(200.0, 500.0);<br>} catch (PaymentException e) {<br>    System.out.println(&quot;Transaction failed: &quot; + e.getMessage());<br>}</pre><p>Custom exceptions give your Java applications more <em>clarity</em>, <em>control</em>, and <em>context</em> when something goes wrong. They help bridge the gap between <em>technical errors</em> and <em>business-level understanding</em>, making debugging and maintenance far easier.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32b82e1a207e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exception Handling -Java]]></title>
            <link>https://medium.com/@keerthigopalm/exception-handling-java-c29a027411c0?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/c29a027411c0</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 04:07:44 GMT</pubDate>
            <atom:updated>2025-10-20T04:07:44.285Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xdPA67OkIXwcWpCS1oxAbQ.jpeg" /></figure><p><strong>What Is an Exception?</strong></p><p>An <strong>Exception</strong> is an <em>unexpected event</em> that disrupts the normal flow of a program’s execution.<br> For example, dividing a number by zero or accessing a file that doesn’t exist are common exceptions in Java.</p><p><strong>What Is Exception Handling?</strong></p><p><strong>Exception handling</strong> is the process of managing run-time errors (exceptions) to maintain the normal flow of the program.<br> Instead of abruptly stopping the program, Java allows us to “handle” these issues gracefully using constructs like try, catch, throw, throws, and finally.</p><p><strong>Exception Hierarchy in Java</strong></p><p>In Java, all exceptions and errors are subclasses of the class Throwable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*VOtcIToe4nPhlx8yvtok9g.jpeg" /></figure><ul><li><strong>Exception</strong>: Events that can be handled.</li><li><strong>Error</strong>: Serious problems that cannot usually be recovered from (like OutOfMemoryError).</li></ul><p><strong>Difference Between Error and Exception</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*wtXyScgkb6vQNlpB1qrSQA.png" /></figure><p><strong>Checked vs Unchecked Exceptions</strong></p><p>Java divides exceptions into <strong>checked</strong> and <strong>unchecked</strong> based on how the compiler enforces handling them.</p><p><em>Checked Exceptions</em></p><p>Checked exceptions must be either <strong>handled</strong> using a try-catch block or <strong>declared</strong> in the method signature using the throws keyword.<br> They are checked at <em>compile-time</em>.</p><p><strong>Examples:</strong></p><ul><li>IOException</li><li>SQLException</li><li>FileNotFoundException</li><li>ClassNotFoundException</li></ul><p>Ways to handle:</p><ol><li>Handle inside the method using try-catch</li><li>Declare in the method signature using throws</li></ol><pre>public void readFile() throws IOException {<br>    FileReader reader = new FileReader(&quot;data.txt&quot;);<br>}</pre><p><em>Unchecked Exceptions</em></p><p>Unchecked exceptions are not checked at compile time. These occur due to programming mistakes and are handled at <em>runtime</em>.</p><p><strong>Examples:</strong></p><ul><li>ArithmeticException</li><li>NullPointerException</li><li>ArrayIndexOutOfBoundsException</li><li>ClassCastException</li></ul><p>Even though the compiler doesn’t force us to handle them, it’s still good practice to do so where necessary.</p><h3><strong>Exception Propagation</strong></h3><p>The exception is thrown from the method where it happens. If the error is not handled in that method, it moves back to the method that calls it. This process happens until it is caught and handled by a method or until the main method. If that exception is not handled in there either, then the thread crashes.</p><p>Only automatic propagation can happen in unchecked exceptions. Unless in a checked exception, the compiler doesn’t allow to happen automatic propagation. It wants to be handled by rethrow.</p><p>It is a best practice to handle the exceptions in levels where they can be resolved.If an exception cannot be handled elsewhere because of a specific reason,it is acceptable to handle it the main method. Other than that it is not a acceptable thing.<br>Because the main method is where the program starts.So, if we handle it in there,</p><p>01. It means we don’t know what the exact problem is and where it happens in lower-level methods.</p><p>02. Although it catches and logs in there, the stacktrace might be useless, making it harder to understand the real problem.</p><p><strong>Rethrowing Exception</strong></p><p>Sometimes we catch an exception but can’t fully handle it — so we <strong>rethrow</strong> it to be handled by another method higher up the stack.</p><pre>try {<br>    riskyMethod();<br>} catch (IOException e) {<br>    System.out.println(&quot;Logging the error...&quot;);<br>    throw e; // rethrowing the same exception<br>}</pre><p>This is especially useful for <strong>checked exceptions</strong>, where you can log additional context before rethrowing.</p><p><strong>Wrapping an Exception</strong></p><p>Wrapping is catching an exception and throwing it as a new exception of a different type, while keeping the original one as it is. Wrapping is a specific type of rethrowing.</p><pre>try {<br>    riskyMethod();<br>} catch (SQLException e) {<br>    throw new RuntimeException(&quot;Database operation failed&quot;, e);<br>}</pre><p>We wrap both checked and unchecked exceptions. But wrapping an unchecked exception is less useful. Because the compiler doesn’t force handling them. If we throw an exception without handling or by doing something is pointless. The main use of wrapping is to allow a checked exception to propagate as an unchecked exception.</p><p>Exception handling is a broad topic, and there is much more to explore. it’s about writing <em>clean, stable, and maintainable</em> code. By properly managing exceptions, you can prevent your application from crashing, Provide meaningful error messages, Simplify debugging and maintenance</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c29a027411c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Building Secure E-Commerce with OIDC, PayPal, and MERN Stack]]></title>
            <link>https://medium.com/@keerthigopalm/building-secure-e-commerce-with-oidc-paypal-and-mern-stack-1f201ba5eded?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f201ba5eded</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 11:59:09 GMT</pubDate>
            <atom:updated>2025-09-06T11:59:09.851Z</atom:updated>
            <content:encoded><![CDATA[<p>When building modern apps, <strong>authentication</strong> and <strong>security</strong> are as important as features. For my project <strong>GreenWorld</strong>, a MERN-based e-commerce platform, I integrated <strong>OAuth2 login</strong>, <strong>PayPal payments</strong>, and hardened my APIs against <strong>OWASP Top 10 vulnerabilities</strong>.</p><p>In this blog, I’ll walk you through the key highlights, challenges, and what I learned.</p><h3>OAuth2 Login/Logout Flow</h3><p><em>Login</em></p><ul><li>User clicks <strong>Continue with Google</strong>.</li><li>Redirects to Google’s OAuth consent screen.</li><li>On success → Redirects back to my app with an <strong>authorization code</strong>.</li><li>Backend exchanges this code for an <strong>access token</strong> (and optionally refresh token).</li><li>Backend uses the access token to fetch user profile info from Google’s API (https://www.googleapis.com/oauth2/v3/userinfo).</li><li>After retrieving the profile, my app creates its own <strong>JWT</strong> containing the user’s ID, email, and role, and returns it to the frontend.</li></ul><p>Logout</p><ul><li>I simply clear the user’s JWT/session on logout.</li><li>Optionally, revoke Google tokens via Google API for extra security.</li></ul><h3>Using Access Token for Authorization</h3><ul><li>After the user logs in, the application issues a JWT (JSON Web Token) that contains the user’s identity and role.</li><li>This token is stored securely in the frontend (e.g., in memory or cookies).</li><li>Whenever the user performs an action (like viewing orders or placing one), the frontend attaches the token to the request.</li><li>The backend checks this token before processing the request. If it’s valid and the user has the right role (e.g., admin vs. customer), the request is allowed. Otherwise, access is denied.</li></ul><h3>Preventing OWASP Top 10 Issues</h3><p>Security was a top priority. Here’s how I mitigated common vulnerabilities:</p><ol><li><strong>SQL Injection (SQLi)</strong> → Not applicable directly since I used <strong>MongoDB</strong>, but I sanitized all inputs with express-mongo-sanitize.</li><li><strong>Cross-Site Scripting (XSS)</strong> → Escaped user input, used React (auto-escapes JSX), and applied helmet CSP headers.</li><li><strong>Cross-Site Request Forgery (CSRF)</strong> → Used <strong>JWT + SameSite cookies</strong> instead of session IDs.</li><li><strong>Broken Authentication</strong> → Auth0 manages login, token expiration, and refresh securely.</li><li><strong>Sensitive Data Exposure</strong> → .env secrets never committed, HTTPS enforced in production.</li><li><strong>Broken Access Control</strong> → Role-based authorization (user vs admin).</li><li><strong>Security Misconfiguration</strong> → helmet, rate-limit, dotenv applied.</li><li><strong>Insecure Deserialization</strong> → No eval/unsafe JSON parsing.</li><li><strong>Using Vulnerable Components</strong> → Regular npm audit and dependency updates.</li><li><strong>Insufficient Logging &amp; Monitoring</strong> → Centralized error middleware and request logger.</li></ol><h3>Payment Integration (PayPal + COD)</h3><p>I integrated <strong>PayPal Checkout</strong> for card payments and <strong>Cash on Delivery (COD)</strong> for offline orders.</p><ul><li><strong><em>PayPal Flow</em></strong></li><li>Frontend calls POST /api/orders → Backend creates PayPal order → Returns approval link.</li><li>User approves → Backend captures payment → Marks order as <em>Paid</em>.</li><li><strong><em>COD Flow</em></strong></li><li>Simply stores order with paymentStatus = Pending.</li><li>Updated by admin once delivered.</li></ul><h3>Challenges Faced</h3><ul><li>Understanding OIDC token flows and properly validating JWTs.</li><li>Getting OAuth2 redirect URIs configured correctly in Google Cloud.</li><li>Exchanging authorization code for tokens securely on the backend.</li><li>Handling PayPal sandbox vs live.</li><li>Avoiding security pitfalls while keeping checkout smooth.</li></ul><h3>Key Learnings</h3><ul><li><strong>OAuth2 is simpler than OIDC</strong>, but requires extra steps to fetch profile info.</li><li><strong>Security-first development</strong> → Following OWASP Top 10 made my app safer.</li><li><strong>Payments need careful testing</strong> → Sandbox helps a lot.</li><li><strong>MERN + OAuth2 + PayPal</strong> is a solid stack for production-ready apps.</li></ul><h3>GitHub Repository</h3><p>👉<a href="https://github.com/keerthigopalm/GreenWorld"> https://github.com/keerthigopalm/GreenWorld</a></p><h3>Final Thoughts</h3><p>GreenWorld was more than a coding project — it was my <strong>security bootcamp</strong>. OAuth2, JWTs, PayPal, and OWASP guidelines all came together to help me build a <strong>secure and functional e-commerce platform</strong>.</p><p>If you’re learning MERN stack, I highly recommend adding <strong>OAuth login + secure payments</strong> to your projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f201ba5eded" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Version Control]]></title>
            <link>https://medium.com/@keerthigopalm/version-control-320ca8e41f57?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/320ca8e41f57</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Sat, 10 May 2025 21:16:01 GMT</pubDate>
            <atom:updated>2025-05-10T21:16:01.109Z</atom:updated>
            <content:encoded><![CDATA[<p>Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.</p><p>Importance of Version Control</p><ul><li><strong>Tracks Code History:</strong> Records who made changes, what was changed, when, and why.</li><li><strong>Facilitates Collaboration:</strong> Multiple developers can work on the same project without conflicts.</li><li><strong>Supports Rollback:</strong> Easily revert to previous versions to undo mistakes.</li><li><strong>Enables Parallel Development:</strong> Branching allows separate work on features, bug fixes, or experiments.</li></ul><p><strong>Types of Version Control Systems</strong></p><p>Version Control Systems (VCS) come in three main types: <strong>Local</strong>, <strong>Centralized</strong>, and <strong>Distributed.</strong> Local VCS, like RCS, stores versions of code on a developer’s local machine, making it simple but limited to individual use.</p><p>Centralized VCS (CVCS), such as SVN, uses a single central server where all code versions are stored, allowing multiple developers to check in and out code but creating a single point of failure.</p><p>Distributed VCS (DVCS), like Git and Mercurial, provides each user with a complete copy of the repository, including full history, enabling offline work, enhanced collaboration, and greater resilience against server issues.</p><p><strong>Git</strong> is the industry standard today. You always work with a full repository locally, then sync to <strong>remote</strong> servers like GitHub/GitLab/Bitbucket.</p><p><strong><em>GitHub</em></strong></p><p>GitHub is a collaboration <strong>cloud-based </strong>platform that uses <strong><em>Git</em></strong> for versioning.<br>GitHub is a popular place to share and contribute to open-source software.</p><ul><li>Hosts your <strong>Git repositories</strong></li><li>Provides <strong>tools</strong> to collaborate, review, and manage code</li><li>Automates workflows (CI/CD, security checks)</li></ul><p>A <strong><em>repository</em></strong> is a project containing files and folders.<br>A repository tracks versions of files and folders. Repositories can have multiple collaborators and can be either public or private.</p><p>A <strong><em>branch </em></strong>is a parallel version of your repository.<br>By default, your repository has one branch named “<strong><em>main”</em></strong><em> </em>and it is considered to be the definitive branch.<br>Creating additional branches allows you to copy the <em>main</em> branch of your repository and safely make any changes without disrupting the main project.<br>Many people use branches to work on specific features without affecting any other parts of the project.</p><p>Branches allow you to separate your work from the <em>main </em>branch.<br>In other words, everyone&#39;s work is safe while you contribute.</p><p>A <strong><em>profile README</em></strong> is essentially an “About me” section on your GitHub profile where you can share information about yourself with the community on GitHub.com.<br>GitHub shows your profile README at the top of your profile page.</p><p>A <strong><em>commit </em></strong>is a set of changes to the files and folders in a project. A commit exists in a branch.</p><p>Similar to saving a file that’s been edited, a commit records changes to one or more files in your branch. Git assigns each commit a unique ID, called a SHA or hash, that identifies:</p><ul><li>The specific changes</li><li>When the changes were made</li><li>Who created the changes</li></ul><p>When you make a commit, you must include a commit message that briefly describes the changes.</p><p>Collaboration happens on a <strong><em>pull request</em></strong>. The pull request shows the changes in your branch to other people and allows people to accept, reject, or suggest additional changes to your branch. In a side by side comparison, this pull request is going to keep the changes you just made on your branch and propose applying them to the main project branch.</p><p>A <strong><em>merge</em></strong> adds the changes in your pull request and branch into the main branch.</p><h3>Best Practices (Real World GitHub)</h3><ul><li>Always write a clear <strong>README.md</strong></li><li>Use <strong>Issues</strong> + <strong>Projects</strong> to track work</li><li>Protect <strong>main branch</strong> (require PR reviews)</li><li>Use <strong>PR templates</strong> + <strong>Issue templates</strong></li><li>Enable <strong>CI/CD with GitHub Actions</strong></li><li>Tag <strong>releases</strong> with versions</li><li>Keep repo <strong>public</strong> if open-source friendly</li><li>Archive unused repos to reduce clutter</li></ul><p>Version control, especially with tools like Git and GitHub, is essential for efficient software development, enabling collaboration, version tracking, and safe experimentation. Understanding the different types of VCS, using branches effectively, and following best practices ensures a smooth workflow. This approach makes code management easier, scalable, and secure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=320ca8e41f57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Design & Architecture]]></title>
            <link>https://medium.com/@keerthigopalm/software-design-architecture-0f20a197320e?source=rss-fde66156f309------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f20a197320e</guid>
            <dc:creator><![CDATA[Keerthi Gopalavannan ]]></dc:creator>
            <pubDate>Wed, 07 May 2025 15:01:01 GMT</pubDate>
            <atom:updated>2025-10-19T08:10:27.278Z</atom:updated>
            <content:encoded><![CDATA[<p>Building Better Software with Patterns and Principles</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*csbEfRD8IqcN8KbgWArE6g.avif" /></figure><p><strong>What is Software Design?</strong></p><p><strong>Software design</strong> is the process of defining how individual parts (components, modules, classes) of a software system should interact to achieve the system’s requirements.</p><p>It happens <strong>after requirement analysis</strong> and <strong>before actual coding</strong>.</p><p>A good design</p><ul><li>Breaks complex problems into <strong>manageable components</strong></li><li>Specifies <strong>clear relationships</strong> between components</li><li>Makes code <strong>easier to maintain, reuse, and scale</strong></li></ul><p><strong>What is Software Architecture?</strong></p><p><strong>Software architecture</strong> is the <strong>high-level structure</strong> of a software system. It defines how software components are organized and how they interact with each other. Think of it as the <strong>blueprint</strong> for the system.</p><p>If software design is about <strong>building a house room by room</strong>,<br> software architecture is about <strong>laying out the blueprint of the entire house</strong> (where the kitchen and bedrooms).</p><p>Key architectural decisions include</p><ul><li>How components communicate</li><li>Where data is stored</li><li>How services are deployed and scaled</li></ul><p><strong>Why are Design and Architecture Important?</strong></p><ul><li>Code is clean, modular, and readable</li><li>Changes are isolated and safe</li><li>System can handle more users and features easily</li><li>Easy for new developers to understand the system</li><li>Features are faster to implement and test</li></ul><p>Good design saves time, reduces bugs, and makes software last longer.</p><p><strong>Categories of Design Patterns</strong></p><ul><li>Creational — How objects are created</li><li>Structural — How objects/classes are composed</li><li>Behavioral — How objects/classes interact &amp; communicate</li></ul><h4>Key Software Design Patterns</h4><p>A <strong>design pattern</strong> is a <strong>general, reusable solution</strong> to a common software problem. Think of it as a <em>proven template</em> that developers can apply to similar situations.</p><h4><strong>1. Singleton Pattern</strong></h4><p>Ensures a class has <strong><em>only one instance</em></strong> and provides a global point of access to it.</p><p>A creational design pattern.</p><h4><strong>2. Factory Pattern</strong></h4><p>Create objects <strong><em>without specifying exact class.</em></strong></p><p>A creational design pattern.</p><h4><strong>3. Observer Pattern</strong></h4><p>Defines a <strong><em>one-to-many relationship</em></strong><em>,</em> where if one object changes, its dependents are notified automatically.</p><p>A behavioral design pattern.</p><h4><strong>4. Decorator Pattern</strong></h4><p>Attach additional responsibilities to an object dynamically.</p><p>A structural design pattern.</p><h4><strong>5. Adapter Pattern</strong></h4><p><strong><em>Convert</em></strong> one interface to another.</p><p>A structural design pattern</p><p><strong>Key Software Architectural Patterns</strong></p><p>These patterns describe <strong>how systems are structured at a high level, </strong>how components talk to each other, how data flows, and how features are separated.</p><ol><li><strong>Layered (N-Tier) Architecture</strong></li></ol><p>Divides the system into layers, each with a specific responsibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHrsmsQzT9qn2rJdl9xaTQ.png" /><figcaption>N-tier Architecture</figcaption></figure><p>Presentation Layer — user interface</p><p>Business Layer — Business logic (rules, calculations)</p><p>Data Access Layer — Talks to the database</p><p>Database Layer — Stores the data</p><p><strong>Example:</strong> <strong>Java Spring Boot</strong></p><p>2. <strong>Client-Server Architecture</strong></p><p><strong>Separates the system into clients and a server.</strong><br> The <strong>client</strong> requests services, the <strong>server</strong> provides them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*BZujOHZKgeJXOtR6fVuW5g.png" /></figure><p>All data is<strong> stored on the server</strong>, which generally offers a greater control of security than client machines.</p><p><strong>Example:</strong> A web browser (client) accessing a website (server)</p><p>3.<strong> Data-centered architecture</strong></p><p>A data <strong>store resides at the center</strong> of this architecture and is accessed frequently by other components that update, add, delete, or otherwise modify data within the store.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*OuHz9IchPAiUsgpq0YMJKg.png" /><figcaption>Data centered</figcaption></figure><p>Data-centered architecture consists of different components that communicate through shared data repositories.</p><p>4. <strong>Service-Oriented Architecture (SOA)</strong></p><p>A service Oriented Architecture is a set of components which can be invoked and whose interface descriptions can be published and discovered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*0PXmaB1zQ65OGIZlEq7Rig.png" /></figure><p>Service-oriented architecture (SOA) enables application functionality to be <strong>provided as a set of services</strong>, and the creation of applications that make use of software services.</p><p>5.<strong> Monolithic Architecture</strong></p><p>All functionality is built into one single application.</p><p>Scaling monolithic applications can often be a challenge.</p><p>Limited re-use is realized across monolithic applications.</p><p><strong>Example:</strong> Early versions of WordPress</p><p>6. <strong>Microservices Architecture</strong></p><p><strong>Breaks the application into small, independent services, </strong>each responsible for one business capability.</p><p>Scalable, independent deployments</p><p><strong>Example:</strong> Netflix — separate services for accounts, recommendations, payments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*eis7-mOBCBt8ZXtiwTGKFQ.jpeg" /></figure><h3>Best Practices for Better Design &amp; Architecture</h3><ul><li>Follow <strong>SOLID principles</strong> — guidelines for clean code</li><li>Break code into <strong>small, reusable modules</strong></li><li>Prioritize <strong>readability</strong> and <strong>maintainability</strong></li><li>Keep <strong>documentation</strong> updated</li><li>Use <strong>UML diagrams</strong> (class diagrams, sequence diagrams) to visualize designs</li></ul><p>In software development, design and architecture are essential for creating scalable and maintainable systems. Design focuses on the internal structure of components, while architecture provides a high-level blueprint for their interaction. Applying proven design patterns and architectural patterns helps developers build robust software. By following principles like SOLID and using UML diagrams for visualization, developers can create clear, efficient, and adaptable solutions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f20a197320e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>