<?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 Lekshmana Perumal on Medium]]></title>
        <description><![CDATA[Stories by Lekshmana Perumal on Medium]]></description>
        <link>https://medium.com/@lekshmana?source=rss-fbe58a4ae304------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*r57xGNmPBkEnajZCw6eo_A.jpeg</url>
            <title>Stories by Lekshmana Perumal on Medium</title>
            <link>https://medium.com/@lekshmana?source=rss-fbe58a4ae304------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:37:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lekshmana/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[Did AI Break RSA-2048? What Actually Happened to Encryption]]></title>
            <link>https://lekshmana.medium.com/did-ai-break-rsa-2048-what-actually-happened-to-encryption-f7c7abc0be37?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7c7abc0be37</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <category><![CDATA[post-quantum-cryptography]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Fri, 04 Dec 2026 18:40:17 GMT</pubDate>
            <atom:updated>2026-12-05T04:09:11.992Z</atom:updated>
            <content:encoded><![CDATA[<p>What AI really did to cryptography research, why quantum computers are a separate and future threat, and how to judge any “encryption broken”</p><blockquote>தமிழில் படிக்க: <a href="https://lekshmana.in/2026/12/05/rsa-2048-ai-quantum-computing-tamil/">செயற்கை நுண்ணறிவால் (AI) RSA-2048 பாதுகாப்பை உடைக்க முடியுமா? உண்மை என்ன?</a></blockquote><figure><img alt="Title card “Did AI break RSA-2048? What actually happened to encryption”, beside a five-rung evidence ladder whose top two rungs are empty." src="https://cdn-images-1.medium.com/max/1024/1*G-xnJwxCRiWwUQcb4C5xSw.png" /><figcaption>Did AI break RSA-2048? What actually happened to encryption</figcaption></figure><p>At the end of November 2026, a claim spread across social media faster than anyone could check it: an artificial intelligence (AI) lab had cracked RSA-2048, one of the algorithms that has helped protect internet security for decades. A well-known computer scientist mentioned that he’d heard rumours; a developer’s post reached millions of views; Elon Musk replied that he had “heard this from a few people.”</p><p>The short answer, as of 4 December: <strong>no.</strong> No one has demonstrated a practical factorisation of an RSA-2048 key, or shown a machine capable of doing it. The theoretical quantum algorithm is known; the hardware needed to run it at this scale does not exist. The US government’s statement a few days later said the recent discoveries “do not present an immediate and widespread threat.”</p><p>But “no” isn’t the whole story. Something real did happen. AI systems are speeding up cryptographic research, sometimes dramatically, and governments and companies changed their plans within days. To see what changed and what didn’t, we’ll build up a few ideas from scratch, then go through the evidence one event at a time.</p><h3>How your connection to a bank is actually protected</h3><p>Imagine sending a payment request to your bank. Between your phone and the bank are networks you don’t control: café Wi-Fi, your mobile operator, the internet’s backbone. Someone along the way could try to read your request, change it (turning 500 into 5,000), or pretend to be the bank. The protections against those three things are called <strong>confidentiality</strong>, <strong>integrity</strong> and <strong>authentication</strong>.</p><figure><img alt="Diagram: your phone and the bank, with three boxes: 1 check who you’re talking to (certificate signature, trust chain, valid for this site: authentication with RSA or elliptic-curve signatures); 2 establish a fresh shared key without sending the key itself (key agreement); 3 lock the payment with that key (symmetric encryption, e.g. AES)." src="https://cdn-images-1.medium.com/max/1024/1*A04SKjNTznZJ_qWzbIVM8w.png" /><figcaption>An HTTPS connection does three separate jobs. This story is about the mathematics in jobs 1 and 2.</figcaption></figure><p>An HTTPS connection does three separate jobs. This story is about the mathematics in jobs 1 and 2.</p><p>The padlock in your browser means <strong>HTTPS (HTTP Secure)</strong>: the web’s usual language, <strong>HTTP (Hypertext Transfer Protocol)</strong>, running inside a protective layer called <strong>TLS (Transport Layer Security)</strong>. A modern TLS connection does three separate jobs:</p><ol><li><strong>Check who you’re talking to.</strong> The bank presents a <strong>certificate</strong>, a digital document that binds the bank’s public key to its website name. Your browser checks the signature on it and the chain of trusted authorities behind that signature, that it hasn’t expired, and that it was issued for the exact site you’re visiting. That’s authentication.</li><li><strong>Establish a fresh shared key without sending the key itself.</strong> This sounds impossible. It’s called <strong>key agreement</strong>, and we’ll see how it works.</li><li><strong>Lock the actual data with that shared key,</strong> using a fast cipher where both sides hold the same key. This is <strong>symmetric encryption</strong>, for example AES (the Advanced Encryption Standard).</li></ol><p>Today’s story is about the mathematics in steps 1 and 2: proving identity and agreeing on keys. Your payment itself is locked in step 3, with symmetric encryption. These are different jobs, often done by different algorithms.</p><h3>Public keys, factoring and RSA</h3><p>How can you lock something for a bank you’ve never met, without first agreeing on a password? The idea that makes it possible is <strong>public-key cryptography</strong>. The bank hands out an open padlock (its <strong>public key</strong>) that anyone can snap shut, and keeps the only key that opens it (its <strong>private key</strong>).</p><p>One of the first ways to build such a padlock is <strong>RSA</strong>, named after its inventors Rivest, Shamir and Adleman (1977). It rests on numbers and their building blocks. Every whole number is a product of numbers that can’t be split further, the <strong>primes</strong>: 12 = 2 × 2 × 3. Finding a number’s primes is called <strong>factoring</strong>. RSA relies on one asymmetry: <strong>multiplying primes is easy; factoring their product is hard.</strong></p><p>A toy example (textbook RSA, with numbers far too small to be secure, and without the safety steps real systems add):</p><ul><li>61 × 53 = 3,233. Easy. Given only 3,233, finding 61 and 53 takes trial and error.</li><li>The public key is (3,233, 17). For this construction, the private key, 2,753, is efficiently derived from the two primes.</li><li>Locking the message 65 with the public key gives 2,790. Only the private key turns 2,790 back into 65.</li></ul><p>In real RSA, the public product is called the <strong>modulus</strong>. A 2,048-bit RSA modulus is approximately 617 decimal digits. The largest publicly reported RSA challenge number factored so far is RSA-896 (September 2026; see below), done with the best known method on large clusters of graphics processing units (GPUs). That record says nothing absolute about all factoring, but 2,048 bits is far beyond it.</p><figure><img alt="Diagram: 61 times 53 gives 3233 (easy); 3233 back to its two primes is hard. Public key (3233, 17), private key 2753. Locking 65 gives 2790; unlocking gives 65. Note: toy numbers, textbook RSA without padding." src="https://cdn-images-1.medium.com/max/1024/1*uH0QEXBqdcwg0E9NJeoZ1A.png" /><figcaption>Toy RSA: easy to multiply, hard to factor. Real RSA uses a 2048-bit modulus of about 617 decimal digits.</figcaption></figure><p>RSA can also <strong>sign</strong>. In the textbook version, the bank applies its private key to 65 and gets 588; anyone can apply the public key to 588 and get 65 back. Real signatures add two important things.</p><ul><li>They first reduce the message to a fixed-size fingerprint, a <strong>hash</strong>, and wrap it in a standard format called <strong>padding</strong>. Without those steps, signatures are easy to forge.</li><li>The mathematics only shows that <em>the holder of a private key</em> signed. Knowing <em>who</em> that holder is comes from the certificate and the chain of authorities behind it.</li></ul><p>Toy RSA: easy to multiply, hard to factor. Real RSA uses a 2048-bit modulus of about 617 decimal digits.</p><p><strong>Where RSA is used today.</strong></p><ul><li>Older versions of TLS could use <strong>RSA key transport</strong>: the browser locked the session key with the server’s RSA public key and sent it. <strong>TLS 1.3 removed this in 2018.</strong></li><li>In modern HTTPS, RSA mostly appears in step 1, as the signature on many certificates (others use elliptic-curve signatures).</li><li>It also signs software updates, and appears in SSH (Secure Shell) server logins and some older systems.</li></ul><p>So “RSA protects online banking” is better put as: <strong>RSA often helps prove who you’re talking to</strong>, through signatures. Key agreement and symmetric encryption are done by other algorithms, and not every HTTPS connection uses RSA at all.</p><h3>Elliptic curves: the same idea, different mathematics</h3><p>Picture a smooth curve with a rule for “adding” two points on it: draw a line through them, see where it meets the curve again, and reflect. You land on a third point on the curve.</p><p>Real <strong>Elliptic Curve Cryptography (ECC)</strong> uses a whole-number version of this, wrapped around a very large prime number, so the points look scattered. Here’s a <strong>teaching model</strong> on a tiny curve you can check yourself: <em>y² = x³ + 2x + 2</em>, counting modulo 17, starting point <em>G</em> = (5, 1). Real software works with enormous numbers and different formulas, but the idea carries over.</p><ul><li><strong>The hops.</strong> Start at a point <em>G</em>. Adding <em>G</em> to itself again and again hops around the grid in a pattern that looks random. Thirteen hops lands on (16, 4).</li><li><strong>The hard direction.</strong> Hopping forwards is easy. But if you’re shown only where someone landed, how many hops did they take? On real curves, nobody knows a practical way to answer. That’s the <strong>elliptic-curve discrete logarithm problem.</strong></li><li><strong>A different problem from RSA’s.</strong> It’s a different mathematical problem from factoring, so a weakness in one doesn’t automatically carry over to the other.</li></ul><p><strong>Key agreement, worked on the teaching curve.</strong></p><ul><li>Asha secretly picks 3, hops three times from <em>G</em>, and publishes where she landed: (10, 6). The bank secretly picks 5, does five hops, and publishes (9, 16).</li><li>Each then hops from the <em>other’s</em> point: Asha three times, the bank five. Both land on (3, 16), fifteen hops from <em>G</em>. That point becomes their shared key, and it never crossed the network.</li><li>This is <strong>Elliptic Curve Diffie–Hellman</strong>. In HTTPS it’s “ephemeral” (ECDHE), a fresh secret for every connection, usually on a curve called <strong>X25519</strong>.</li></ul><figure><img alt="Diagram: the 18 points of the curve y squared equals x cubed plus 2x plus 2 modulo 17 on a grid. G is (5, 1). Asha publishes 3G = (10, 6), the bank publishes 5G = (9, 16), and both compute the shared point (3, 16) = 15G. Labelled as a teaching model." src="https://cdn-images-1.medium.com/max/1024/1*l6f6HjzaEjurx6Cs7SiiOg.png" /><figcaption>Key agreement on a teaching curve, y² = x³ + 2x + 2 (mod 17). Both sides reach the same point without sending it.</figcaption></figure><p>Key agreement on a teaching curve, y² = x³ + 2x + 2 (mod 17). Both sides reach the same point without sending it.</p><p>Elliptic curves also make <strong>signatures</strong> (ECDSA, the Elliptic Curve Digital Signature Algorithm, and Ed25519, an instance of EdDSA, the Edwards-curve Digital Signature Algorithm) for certificates, software and blockchain transactions. So there are two separate jobs: agreeing on keys and signing. And curves are compact: a 256-bit curve gives roughly the strength of 3,072-bit RSA.</p><h3>A ladder for reading “encryption broken” headlines</h3><p>“Broken” means very different things to a mathematician, a security engineer and a newspaper. Ask <strong>which rung of this ladder a result has reached</strong>:</p><ol><li><strong>Mathematical progress</strong>: a new idea or proof.</li><li><strong>Better algorithm</strong>: a faster method, on paper.</li><li><strong>Demonstration on a smaller problem</strong>: it works on reduced sizes.</li><li><strong>Attack at real cryptographic key sizes</strong>: it works against, say, 2048-bit RSA.</li><li><strong>Practical compromise of deployed systems</strong>: real keys, real data.</li></ol><p>Each step up costs years, money, engineering and sometimes physics. Most published cryptanalysis lives on rungs 1 to 3, which is healthy: that’s how weak systems get retired before attackers can use the weakness. Keep <strong>RSA, elliptic curves and lattices</strong> (below) in separate lanes, because they rest on different problems.</p><figure><img alt="Diagram: a five-rung ladder from mathematical progress to compromise of deployed systems, with lanes for RSA, elliptic curves and lattices. Factoring records and a 1024-bit signature lab reproduction sit on rung 3; DeepMind’s new methods on rung 2; Shor’s algorithm, one quantum algorithm threatening both RSA and elliptic curves, on rung 2; Anthropic’s quantum lattice algorithm on rung 2 and its proofs on rung 1. Rungs 4 and 5 read: no demonstrated attack at modern key sizes; no demonstrated comp" src="https://cdn-images-1.medium.com/max/1024/1*okBRU-r6JQ5MjENp7gHkKA.png" /><figcaption>Where each development sits on the evidence ladder, in separate lanes. No demonstrated attack at modern key sizes, and no demonstrated compromise of deployed modern systems.</figcaption></figure><p>Where each development sits on the evidence ladder, in separate lanes. No demonstrated attack at modern key sizes, and no demonstrated compromise of deployed modern systems.</p><h3>Five questions to ask about any such headline</h3><ol><li><strong>Which algorithm, exactly?</strong> RSA, elliptic curves, lattices and AES are different problems.</li><li><strong>Which rung?</strong> New mathematics, an algorithm on paper, a small demonstration, real key sizes, or real systems?</li><li><strong>What key size, and what setting?</strong> 1024-bit RSA was retired years ago. An attack that needs a special lab condition, such as unlimited access to a victim’s signing service, is not an attack on everyone.</li><li><strong>Who has checked it?</strong> A paper with independent review, or code others can run, carries weight. A rumour with no source carries none.</li><li><strong>What do the people responsible say?</strong> Authors, independent reviewers and standards bodies usually state the limits plainly. In this story, they all did.</li></ol><h3>Quantum computers, without the physics degree</h3><p><strong>Ordinary computers</strong> store information as <strong>bits</strong>: switches that are off or on, 0 or 1. They solve problems by following steps very fast. For some problems there’s a clever shortcut; for others they must grind through possibilities.</p><p>A <strong>quantum computer</strong> stores information in <strong>qubits</strong> (quantum bits). When you look at a qubit you get 0 or 1, just like a bit. Before you look, its state is described by two <strong>amplitudes</strong>, numbers that behave like waves rather than like dice. The squared size of an amplitude determines the probability of measuring that result. And because amplitudes behave like waves, they can add up or cancel out. A qubit in such a combination is in <strong>superposition</strong>: not a bit secretly holding both values, but a state that isn’t yet either.</p><p>The popular phrase “it tries every answer at once” is misleading. When you measure, you get <em>one</em> answer, at random. If every answer were equally likely, you’d learn nothing. A quantum algorithm is a carefully designed sequence of operations on the amplitudes, so that some contributions reinforce and others cancel. That’s <strong>interference</strong>, and it can make useful outcomes much more likely to be measured. How it’s arranged depends on the algorithm.</p><p><strong>Entanglement</strong> gives two or more qubits a joint state, so their measurement results can be correlated, even far apart; the kind of correlation depends on the state and on what is measured. A pair of gloves in two boxes is only a partial picture: each glove had its hand from the start, whereas entangled qubits show correlations that can’t be explained by values assigned in advance. Entanglement is an important resource in many quantum algorithms. It doesn’t allow messages to be sent instantly.</p><p>So quantum computers aren’t simply faster. For most tasks they offer no advantage. Promising areas are specific. One is simulating molecules and materials, which are quantum systems themselves. Another is problems with hidden periodic structure.</p><p>The second is the one that matters here. In 1994, Peter Shor showed that factoring can be turned into finding a repeating pattern, a <strong>period</strong>, which a quantum computer can find efficiently using interference. The same approach solves the elliptic-curve discrete logarithm. So <strong>a large enough, reliable quantum computer would break RSA and today’s elliptic-curve cryptography.</strong> That is established mathematics. Symmetric ciphers are different. Grover’s algorithm gives a quadratic speed-up for idealised unstructured search, roughly the square root of the work, so a 256-bit key, as in AES-256, retains a substantial security margin against that particular advantage.</p><figure><img alt="Diagram: a bit is 0 or 1; a qubit has two amplitudes, which can be positive, negative or complex, and the probability of each result is the squared magnitude of its amplitude; and measuring gives one result; interference shows waves adding up or cancelling. Notes on Shor, Grover and physical versus logical qubits." src="https://cdn-images-1.medium.com/max/1024/1*DsPOQpZzzWL3AOAfF8dx7A.png" /><figcaption>Bits, qubits and interference: a quantum algorithm makes useful results more likely; it doesn’t try every answer and show them all.</figcaption></figure><p>Bits, qubits and interference: a quantum algorithm makes useful results more likely; it doesn’t try every answer and show them all.</p><p><strong>Why owning a quantum computer isn’t the same as breaking RSA.</strong></p><ul><li>Qubits are fragile, and noise causes errors. Reliable computation needs <strong>error correction</strong>: many <strong>physical qubits</strong> (the real, error-prone hardware) working together as one <strong>logical qubit</strong> (a reliable one).</li><li>Some dated examples of where hardware stands:</li><li>Google’s Willow chip (December 2024) has 105 physical qubits, and showed one error-corrected logical qubit becoming <em>more</em> reliable as its code grew.</li><li>IBM built a 1,121-physical-qubit chip (2023).</li><li>Separately, Caltech held 6,100 atoms in a laser-trap array (2025), a step towards a different kind of machine, not a working computer; trapped atoms aren’t directly comparable with qubits in a working processor.</li><li>One 2025 estimate from Google says a single RSA-2048 key could be factored in under a week with <strong>fewer than a million noisy physical qubits</strong>, roughly 1,400 logical qubits. That rests on stated assumptions about error rates and speed. It’s an estimate, not a fixed requirement, and estimates have been falling.</li><li>No such machine exists. Real-hardware demonstrations of Shor’s algorithm have only handled very small numbers.</li></ul><h3>Post-quantum cryptography and lattices</h3><p><strong>Post-Quantum Cryptography (PQC)</strong> means new public-key mathematics, running as ordinary software on ordinary computers, built on problems believed to stay hard even for quantum computers. It’s not the same as <strong>Quantum Key Distribution (QKD)</strong>, which uses special physics hardware to share keys.</p><p>The main family uses <strong>lattices</strong>. Picture an orchard planted in perfect rows; tilt and stretch the rows, and you have a lattice: a regular, repeating pattern of points. An intuition for why lattices can be hard: put a target slightly off the grid and ask which grid point is nearest. In two dimensions you see it at a glance. In hundreds of dimensions there’s no picture, and no known efficient quantum algorithm solves the corresponding high-dimensional problems. That’s an analogy. The standards rely on related, structured problems built on so-called <strong>module lattices</strong>:</p><ul><li><strong>ML-KEM</strong> relies on <strong>Module Learning With Errors (Module-LWE)</strong>: solving many equations where each answer has a small random error added.</li><li><strong>ML-DSA</strong>’s security involves Module-LWE and also <strong>Module Short Integer Solution (Module-SIS)</strong>: finding unusually short solutions to a set of equations.</li></ul><p>They’re different mathematical problems; both are believed hard for quantum computers.</p><figure><img alt="Diagram: a tilted grid of points with a target point just off the grid. Text: easy in 2 dimensions, but no known efficient quantum algorithm solves the corresponding high-dimensional problems. ML-KEM relies on Module Learning With Errors; ML-DSA on Module Learning With Errors and Module Short Integer Solution." src="https://cdn-images-1.medium.com/max/1024/1*OjsAgupu7CzZY7k60nZRpA.png" /><figcaption>A lattice is a regular, repeating pattern of points. The nearest-point picture is an analogy; the standards rely on Module-LWE and Module-SIS.</figcaption></figure><p>A lattice is a regular, repeating pattern of points. The nearest-point picture is an analogy; the standards rely on Module-LWE and Module-SIS.</p><p>In August 2024 the US <strong>National Institute of Standards and Technology (NIST)</strong> published the main standards:</p><ul><li><strong>ML-KEM (Module-Lattice-Based Key-Encapsulation Mechanism)</strong> agrees keys. It replaces step 2 of the HTTPS recipe.</li><li><strong>ML-DSA (Module-Lattice-Based Digital Signature Algorithm)</strong> makes signatures.</li><li><strong>SLH-DSA (Stateless Hash-Based Digital Signature Algorithm)</strong> also makes signatures, using only hash functions: bigger and slower, but on very conservative assumptions.</li><li><strong>HQC (Hamming Quasi-Cyclic)</strong> was later selected as a backup key-agreement method built on different mathematics; its standard is in development.</li></ul><p>They aren’t interchangeable. A key-agreement method can’t sign, and a signature scheme can’t agree keys. Many connections now use <strong>hybrid key agreement</strong>: a classical elliptic curve and ML-KEM combined into one key. The intent is that security holds if <em>either</em> component remains secure, <em>provided</em> the combination is designed and implemented correctly. Simply running two algorithms side by side guarantees nothing by itself.</p><p>The new algorithms are also larger. An ML-KEM encapsulation (public) key at the common middle setting is 1,184 bytes, against 32 for X25519. An ML-DSA signature is 3,309 bytes, against 64 for Ed25519. Migration therefore touches protocols, certificates and the authorities that issue them, software libraries, hardware security modules, smart cards, devices that can’t be updated, and every partner system.</p><h3>What actually happened, September to December 2026</h3><p><strong>September: AI as a research engineer.</strong></p><ul><li>Two public factoring records fell: RSA-260 (about 862 bits) on 3 September, then RSA-896 on 19 September.</li><li>In both cases AI wrote or adapted software so that the well-known number field sieve could run on GPUs. There was no new algorithm.</li><li>The RSA-896 researcher wrote that it “does not impact the security of deployed RSA-2048 keys”. It does show that 1024-bit keys, which standards bodies retired years ago, are within reach of anyone with a large GPU fleet.</li><li><strong>Ladder: RSA lane, rung 3.</strong></li></ul><p><strong>5–6 November: DeepMind and legacy 1024-bit RSA signatures.</strong></p><ul><li>Google DeepMind and cryptographers Nadia Heninger and Emmanuel Thomé published two working papers, not peer reviewed.</li><li><strong>The reproduction.</strong> In one, AI agents reproduced a known 1024-bit computation in a special setting. The attacker first obtains about four billion chosen values signed by the victim’s signing service, then forges a signature on a new value. It took 391 central processing unit (CPU) core-years instead of 1,380, a 3.5× saving the authors attribute to implementation, “not of algorithms”. The agents designed, ran and debugged it in under four days.</li><li><strong>Not factoring.</strong> Factoring a 1024-bit key is estimated at 500,000 to 1,000,000 core-years.</li><li><strong>Methods on paper only.</strong> A theoretical improvement for a harder variant is “asymptotic, and we did not run it at this size”. The second paper’s batch-factoring “fan factory” has “not been implemented”.</li><li><strong>No threat to 2048 bits.</strong> Both papers state they don’t threaten 2048-bit RSA. A widely repeated “1,600×” figure does not appear in the paper.</li><li><strong>Ladder: RSA lane, legacy keys; rung 2 for the new methods, one rung-3 reproduction in a special setting.</strong></li></ul><p><strong>Late November: the rumours.</strong></p><ul><li>The earliest traceable public claims we found:</li><li>an X post around 15 November about elliptic-curve signatures (as reported; we couldn’t view it);</li><li>Scott Aaronson’s blog comment on 24 November relaying “many, many rumors”, with “I don’t know how much to credit this”, and later “a rumor is a rumor is a rumor”;</li><li>posts by developer Franz Bruckhoff on 26–27 November;</li><li>Musk’s reply on 29 November.</li><li><strong>Ladder: not on it.</strong></li></ul><p><strong>30 November: Anthropic’s lattice papers.</strong></p><ul><li><strong>What was published.</strong> Anthropic published four mathematics papers with machine-checked proofs.</li><li><strong>What they’re about.</strong> Lattices, not RSA or elliptic curves. The main paper gives a <strong>quantum</strong> algorithm for <strong>certain structured lattice problems</strong> related to the new standards. In theory it becomes much faster than previous methods as those problems grow very large, a statement about the long run.</li><li><strong>The independent review.</strong> The Cryptography Incident Review Group (CIRG), 21 cryptographers including Dan Boneh, Nadia Heninger and Chris Peikert, reviewed the work before publication.</li><li>For the real standards, its initial assessment says the attack “requires vastly more computation than the best previously known attacks”, at a scale it calls galactic, with no improvement for ordinary computers.</li><li>It expects the attack to be improved. It recommends continuing the post-quantum transition, choosing the highest security levels, combining different mathematical foundations and building crypto-agile systems.</li><li><strong>The timing.</strong> Security reporters criticised it: the papers came after days of rumours, without an earlier statement putting them to rest.</li><li><strong>Ladder: lattice lane, rungs 1–2, quantum, far from practical. Nothing deployed is affected.</strong></li></ul><p><strong>2–3 December: governments and companies.</strong></p><ul><li><strong>The joint statement.</strong> The White House Office of the National Cyber Director, the National Security Agency (NSA) and the Cybersecurity and Infrastructure Security Agency (CISA) said American AI companies “have disclosed discoveries that impact the security of some cryptography currently in use”. It said these “do not present an immediate and widespread threat” and that infrastructure should be upgraded “expeditiously.” <strong>It names no algorithm, company or broken key.</strong></li><li><strong>The NSA advisory (as reported).</strong> According to multiple reports, the NSA’s advisory told operators of national security systems to “immediately accelerate” their move to post-quantum cryptography. We could not access the advisory itself (the NSA and Department of Defense servers refused our requests), so we quote only what reports agree on.</li><li><strong>Nine companies.</strong> Amazon, Anthropic, Apple, Cloudflare, Google, Meta, Microsoft, OpenAI and Oracle publicly backed faster migration.</li><li><strong>Cloudflare.</strong> It moved its full post-quantum deadline from 2029 to 2027, quoting the same “no immediate and widespread threat.” <strong>A moved deadline is a precaution, not evidence of a break.</strong></li><li><strong>Ladder: none of this adds a rung.</strong> Nothing reached rung 4 against a modern standard; nothing reached rung 5.</li></ul><figure><img alt="Timeline: 3 Sep RSA-260 factored; 19 Sep RSA-896 factored; 27 Oct NIST IR 8547 final; 5–6 Nov DeepMind 1024-bit signature lab attack (not factoring); 24–29 Nov rumours (as reported); 30 Nov Anthropic lattice papers and CIRG review; 2 Dec joint statement, NSA advisory (as reported), nine companies; 3 Dec Cloudflare moves to 2027." src="https://cdn-images-1.medium.com/max/1024/1*O-rIhaxsrbvMD6bepDvQoQ.png" /><figcaption>What actually happened, September to December 2026. Grey items are unverified rumours.</figcaption></figure><p>What actually happened, September to December 2026. Grey items are unverified rumours.</p><h3>Why AI matters to cryptanalysis</h3><p>None of these results came from a machine that “understands” encryption and simply breaks it. What AI changed is the <strong>speed of the research process</strong>:</p><ul><li><strong>Engineering.</strong> An AI model ported a decades-old factoring tool to GPUs, and the RSA-896 computation then ran in about ten days on otherwise idle hardware. Rung-3 demonstrations become cheaper and more frequent.</li><li><strong>Exploration.</strong> DeepMind’s agents designed, ran and debugged a large computation in under four days, with about twenty short messages from a human. Many variations of a method can now be tried in parallel.</li><li><strong>Mathematics and checking.</strong> Anthropic’s lattice results were discovered by a model, and their main theorems were checked by computer. Machine-checked proofs don’t make a result practical, but they make errors much harder to hide.</li></ul><p>That cuts both ways. Weaknesses that might have stayed hidden for years may surface in months: good news if they’re found and shared responsibly, as the review group asked of AI labs. It also shrinks the time between “new idea” and “everyone must switch,” which is why the ability to switch matters as much as the choice of algorithm.</p><h3>Keeping secrets vs proving identity: why the industry is moving now</h3><p>If nothing is broken, why the urgency? Because the two jobs face different risks.</p><p><strong>Keeping secrets (confidentiality)</strong> faces <strong>“harvest now, decrypt later.”</strong> An attacker records encrypted traffic today and stores it, hoping a future quantum computer can recover the key agreed in step 2. Data that must stay secret for ten or twenty years is already exposed to that future risk. That’s why post-quantum <strong>key agreement</strong> moved first. Cloudflare reports that 73 % of human traffic to its network already uses it. That figure is about key agreement only: the certificates on those connections are still classical.</p><p><strong>Proving identity (authentication)</strong> faces a different threat. A capable quantum computer could derive a private key from its public key and then forge <em>new</em> signatures, such as fake certificates or fake software updates, that systems would still trust. The danger lies in signatures someone relies on <em>after</em> that capability exists. So the whole trust ecosystem has to migrate <strong>before</strong> then: certificate authorities, browsers, operating systems, devices and software-update systems. That ecosystem changes slowly, and much of Cloudflare’s accelerated 2027 plan is about it: post-quantum certificates, tokens, TLS and SSH across its systems and vendors.</p><h3>Two different pressures, two different responses</h3><p>It’s tempting to say “post-quantum cryptography fixes all of this.” It doesn’t, because there are two different pressures:</p><ul><li><strong>Quantum computing</strong> is a different model of computation that threatens the mathematical foundations of RSA and conventional elliptic curves. <strong>Post-quantum cryptography</strong> is primarily the defence against it.</li><li><strong>AI-assisted research</strong> accelerates mathematics, finds weaknesses, improves algorithms and makes attacks cheaper, potentially in any family, including the new ones. The defences are <strong>cryptographic agility</strong> (systems that can switch algorithms quickly), <strong>ongoing cryptanalysis</strong>, careful <strong>implementation</strong> and <strong>algorithm diversity</strong>, so a surprise in one mathematical family isn’t a single point of failure.</li></ul><p>There are also dates, and they’re <strong>migration plans, not predictions</strong> of when anything breaks:</p><ul><li>Under <strong>NIST’s standards and transition guidance</strong> (NIST IR 8547, October 2026), quantum-vulnerable RSA, ECDSA, EdDSA and Diffie–Hellman are <strong>deprecated after 2030 and disallowed after 2035</strong>. These dates govern NIST’s standards; they aren’t legal deadlines for every organisation worldwide.</li><li>Separately, <strong>US federal systems</strong> must adopt post-quantum <strong>key agreement by 31 December 2030</strong> and <strong>signatures by 31 December 2031</strong> (Executive Order 14412 and its implementing memorandum).</li></ul><figure><img alt="Diagram with four boxes: keeping secrets (harvest now, decrypt later, so post-quantum key agreement first); proving identity (future signature forgery, so the trust chain migrates first); quantum computers answered by post-quantum cryptography; faster AI-assisted research answered by agility, review, careful implementation and diverse maths." src="https://cdn-images-1.medium.com/max/1024/1*D50ItYR56xfPUdRezZh5XA.png" /><figcaption>Two jobs with different risks, and two pressures with different answers.</figcaption></figure><p>Two jobs with different risks, and two pressures with different answers.</p><h3>What to do</h3><p><strong>If you’re not an engineer:</strong> keep your devices and apps updated; that’s how these upgrades reach you. Be wary of scams that use scary headlines. There’s no reason to panic.</p><p><strong>If you are:</strong></p><ul><li>inventory your cryptographic dependencies (TLS, SSH, tokens, code signing, backups, hardware security modules);</li><li>adopt supported, standardised hybrid post-quantum key agreement in compatible TLS implementations where available, and confirm it’s actually negotiated (TLS 1.3 alone doesn’t guarantee a post-quantum exchange);</li><li>plan the certificate and signing migration now, because it’s the slow part;</li><li>design for agility, so the next surprise means a configuration change, not a rewrite.</li></ul><p>A mathematical breakthrough, a theoretical attack and a practical compromise are three different things. November 2026 brought real progress on the lower rungs of the ladder, in different lanes, and a rumour that never made it onto the ladder at all.</p><h3>Sources</h3><p><em>All as of 4 December 2026. “As reported” marks items read only through news coverage.</em></p><ul><li>Anthropic, <em>formal-math / lattices</em> README and papers (30 Nov 2026): <a href="https://github.com/anthropics/formal-math/tree/main/lattices">github.com/anthropics/formal-math/tree/main/lattices</a></li><li>Cryptography Incident Review Group, <em>Initial Assessment of Anthropic’s Findings on Lattice Cryptography</em> (30 Nov 2026): <a href="https://cirg.org/statements/1">cirg.org/statements/1</a></li><li>ONCD, NSA, CISA, <em>Joint Statement on Recent Advances in Cryptographic and Cybersecurity Capabilities</em> (2 Dec 2026): <a href="https://whitehouse.gov/wp-content/uploads/2026/12/Encryption-Statement.pdf">whitehouse.gov/wp-content/uploads/2026/12/Encryption-Statement.pdf</a></li><li>NSA, <em>Immediate Actions to Push Toward Post-Quantum</em> (PP-26–4956, Dec 2026). As reported; the primary document was inaccessible to us.</li><li>Industry joint statement on post-quantum cryptography (2 Dec 2026): <a href="https://anthropic.com/news/joint-statement-post-quantum-cryptography">anthropic.com/news/joint-statement-post-quantum-cryptography</a></li><li>Cloudflare, <em>Project Quantum Leap</em> (3 Dec 2026): <a href="https://blog.cloudflare.com/project-quantum-leap">blog.cloudflare.com/project-quantum-leap</a></li><li>Google DeepMind et al., <em>Modular Roots from a Restricted Oracle: Faster Affine Roots and a 1024-bit Computation</em> and <em>Fan Factories: Multiple Number Fields in Factorization Factories and Batch NFS</em> (working papers, Nov 2026)</li><li>S. Weis, <em>RSA-896</em> (19 Sep 2026): <a href="https://saweis.net/posts/rsa-896.html">saweis.net/posts/rsa-896.html</a></li><li>S. Aaronson, Shtetl-Optimized, 24 Nov 2026 post and comment thread: <a href="https://scottaaronson.blog/?p=10362">scottaaronson.blog/?p=10362</a></li><li>C. Gidney, <em>How to factor 2048 bit RSA integers with less than a million noisy qubits</em> (2025): arXiv <a href="https://arxiv.org/abs/2505.15917">2505.15917</a></li><li>NIST FIPS 203 / 204 / 205 (Aug 2024); NIST IR 8547, <em>Transition to Post-Quantum Cryptography Standards</em> (Oct 2026)</li><li>Reporting: BleepingComputer (1 Dec 2026) on the disclosure timing; coverage of the X posts by Yahoo Tech, IBTimes and YourStory</li></ul><p><em>Disclosure: this article was produced with the help of Claude, made by Anthropic. Anthropic’s research is described alongside independent assessments.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7c7abc0be37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Actually Happens When You Click “Ask Copilot”?]]></title>
            <link>https://lekshmana.medium.com/what-actually-happens-when-you-click-ask-copilot-510d8a139fb9?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/510d8a139fb9</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Sun, 14 Jun 2026 03:23:25 GMT</pubDate>
            <atom:updated>2026-06-14T03:23:25.142Z</atom:updated>
            <content:encoded><![CDATA[<p>Part<em> 2 of the series: </em><strong><em>AI for Software Engineers: Removing the Magic</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCKCJRnTjYuXHlafYI87XQ.png" /><figcaption>Every complex AI system begins with a simple question: <strong>“How does this actually work?”</strong></figcaption></figure><blockquote>Every complex AI system begins with a simple question:</blockquote><blockquote><strong><em>“How does this actually work?”</em></strong></blockquote><h3>The Question I Couldn’t Stop Asking</h3><p>During a coding session, I asked AI dozens of questions. Each one took between 2 to 5 seconds to answer.</p><p>Then I asked myself:</p><p><em>What actually happens in those 5 seconds?</em></p><p>Not theoretically. Not philosophically. Literally. Technically. Step by step. What is the journey of my request?</p><p>I thought it would be straightforward: send request → get answer.</p><p>I was wrong.</p><p>What I discovered was a choreography of systems so intricate that it fundamentally changed how I think about AI infrastructure.</p><p>This chapter will follow a single request — yours — from the moment you type in your IDE, through many different system layers, and finally back to your editor.</p><p>By the end, you’ll understand why a 5-second interaction requires millions of dollars of infrastructure.</p><h3>Let’s Follow One Request</h3><p>Imagine you’re in your IDE (VS Code, JetBrains, or whatever you use).</p><p>You’re working on a payment service. You open a file called PaymentProcessor.java.</p><p>You look at a complex method and think, “I need help understanding this.”</p><p>You press the Copilot button and type:</p><blockquote><em>“Explain how this payment reconciliation logic handles duplicate transactions.”</em></blockquote><p>You hit Enter.</p><p>5 seconds later, you have a detailed explanation.</p><p>But what happens in those 5 seconds?</p><p>Let’s trace it.</p><h3>The Complete Journey (Visual Overview)</h3><p>Here’s the path your request takes from your IDE to the answer on your screen:</p><pre>Your IDE<br>    ↓<br>Context Collection (your code, related files, chat history)<br>    ↓<br>Security &amp; Compliance Checks (authentication, authorization, data classification)<br>    ↓<br>Knowledge Retrieval / RAG (find relevant documentation and patterns)<br>    ↓<br>Tokenization &amp; Model Selection (convert to tokens, choose the right model)<br>    ↓<br>GPU Processing (generate response token by token)<br>    ↓<br>Streaming Response (tokens flow back to your IDE in real-time)<br>    ↓<br>Your Screen Shows Answer</pre><p>Total time: 3–5 seconds</p><p>But inside that time, many different systems are coordinating.</p><p>Now let’s break down each layer.</p><h3>Second 0: The IDE Plugin Wakes Up</h3><p>The moment you press Enter, something happens on your local machine.</p><p>The Copilot plugin in your IDE captures your request. But it doesn’t just send your question to the model.</p><p>Instead, it immediately starts collecting context.</p><p><strong>What context?</strong></p><p>The plugin looks at:</p><ol><li><strong>The current file</strong> — PaymentProcessor.java (entire content, or at least a large window around your cursor)</li><li><strong>Related files</strong> — It might find Transaction.java, Ledger.java, PaymentValidator.java in the same project</li><li><strong>Chat history</strong> — Previous questions you asked in this session</li><li><strong>System prompt</strong> — Instructions that tell the model: “You are a Java expert. Be concise. Explain payment systems clearly.”</li><li><strong>Your codebase context</strong> — Snippets from other files that might be relevant to payment reconciliation</li></ol><p>This happens <strong>before</strong> your request even leaves your computer.</p><p>Why?</p><p>Because the model doesn’t know what PaymentProcessor is. It doesn&#39;t understand your architecture. Without this context, it might give you a generic answer about payment systems instead of an answer about <em>your specific code</em>.</p><p><strong>Here’s an important engineering reality:</strong></p><p>If your codebase has circular imports, massive dependency trees, or bloated class files, the context collector pulls in thousands of lines of irrelevant code. This artificially drives up token count and latency before the model even reads your question.</p><p>Bad code structure = slower AI responses. This creates a direct cost impact. Your technical debt becomes your AI latency debt.</p><h3>Second 1: The Request Leaves Your Machine</h3><p>Your IDE plugin packages everything:</p><pre>{<br>  &quot;question&quot;: &quot;Explain how this payment reconciliation logic handles duplicate transactions.&quot;,<br>  &quot;file_content&quot;: &quot;[entire PaymentProcessor.java content]&quot;,<br>  &quot;related_files&quot;: {<br>    &quot;Transaction.java&quot;: &quot;[relevant snippets]&quot;,<br>    &quot;Ledger.java&quot;: &quot;[relevant snippets]&quot;<br>  },<br>  &quot;chat_history&quot;: &quot;[previous questions in this session]&quot;,<br>  &quot;system_prompt&quot;: &quot;[instructions for the model]&quot;,<br>  &quot;user_id&quot;: &quot;user_123&quot;,<br>  &quot;session_id&quot;: &quot;session_456&quot;,<br>  &quot;timestamp&quot;: &quot;2026-06-07T13:35:00Z&quot;<br>}</pre><p>This entire package is sent over HTTPS to Copilot’s servers.</p><p><strong>Important:</strong> Your code is now leaving your machine. It’s traveling across the internet. This matters for security and compliance, which we’ll address in the next layer.</p><h3>Second 1.5: Security &amp; Compliance Checks</h3><p>Before your request even reaches the AI model, it hits a security layer.</p><p>This layer asks questions:</p><ul><li><strong>Authentication:</strong> Is this a valid Copilot user? Do they have a valid license?</li><li><strong>Authorisation:</strong> Is this user allowed to use Copilot in their company? Are there any restrictions based on their organization’s policies?</li><li><strong>Data Classification:</strong> The code you sent — is it public? Internal? Confidential? Restricted?</li><li><strong>Compliance:</strong> If you’re in healthcare, finance, or regulated industries, does this request comply with industry regulations?</li><li><strong>Policy Enforcement:</strong> Your company might have a policy: “Don’t send code from the payments folder to any external AI service.&quot; The system checks this.</li></ul><p>If any of these checks fail, the request stops here. You get an error message.</p><p>If they pass, the request proceeds.</p><p><strong>Why this layer exists:</strong></p><p>Companies don’t want their source code leaked. They need to know where their code goes. They need compliance trails for audits.</p><p>This layer adds latency — maybe 100–200 milliseconds — but it’s non-negotiable for enterprise use.</p><h3>Second 2: Knowledge Retrieval (RAG)</h3><p>Your request now reaches a retrieval system.</p><p>This system asks: “What knowledge should we give the model to answer this question accurately?”</p><p>Specifically, it runs something called <strong>RAG</strong> (Retrieval Augmented Generation).</p><p>Here’s what happens:</p><ol><li><strong>Convert your question to embeddings</strong> — Your question is converted into a mathematical representation that captures the <em>meaning</em> of your question (not just the keywords).</li><li><strong>Search internal knowledge bases</strong> — The system searches your company’s internal documentation, architecture guides, API references, previous Q&amp;A patterns to find anything relevant to “duplicate transaction handling.”</li><li><strong>Find similar past interactions</strong> — If many other engineers have asked similar questions, maybe their answers are relevant too.</li><li><strong>Rank and select</strong> — The system ranks all the results and picks the most relevant snippets.</li><li><strong>Prepare the knowledge bundle</strong> — These snippets are bundled and added to the context sent to the model.</li></ol><p><strong>What does the model now have?</strong></p><ul><li>Your question</li><li>Your code</li><li>Related code from your codebase</li><li>Relevant documentation from your company</li><li>Examples of how other engineers have explained similar concepts</li></ul><p>This is called “grounding” the model in your company’s context.</p><p>Without this, the model might give you a generic answer. With this, it gives you an answer specific to your architecture, your patterns, your company’s way of doing things.</p><p>This layer adds maybe 300–500 milliseconds.</p><h3>Second 2.5: Tokenisation &amp; Model Selection</h3><p>Before your request reaches the GPU clusters, two critical things happen:</p><p><strong>First: Tokenisation (CPU Task)</strong></p><p>At the API Gateway or orchestration layer, your entire request — all the code, documentation, and context — is converted from text into an array of token IDs. This is a lightweight CPU operation using standard libraries.</p><p>Why now, before the GPU?</p><p>Because the GPU cluster doesn’t want to handle string processing. It wants to receive pre-converted token arrays and jump straight into matrix multiplication. This separation of concerns speeds up the entire pipeline.</p><p><strong>Second: Model Selection &amp; Routing</strong></p><p>Here comes a critical decision point:</p><p><strong>Which model should answer this question?</strong></p><p>Your company might have access to multiple models:</p><ul><li><strong>Advanced model</strong> — Expensive, but very capable. Great for complex questions.</li><li><strong>Standard model</strong> — Medium cost and capability. Good for most questions.</li><li><strong>Fast model</strong> — Cheap and quick. Good for simple questions.</li><li><strong>Internal model</strong> — Runs on your own servers. Fast, free, but less capable.</li></ul><p>A router analyses your question and decides:</p><p><strong>Your question:</strong> “Explain how this payment reconciliation logic handles duplicate transactions.”</p><p><strong>Router’s decision:</strong></p><ul><li>This is a complex question about a critical system (payments)</li><li>It requires understanding nuance and explaining reasoning</li><li>Wrong answers could be dangerous</li><li>Use the <strong>advanced model</strong> (expensive but reliable)</li></ul><p>If you’d asked: “What’s the syntax for a Java HashMap?”, the router would pick a cheaper model.</p><p>If you’d asked: “Format this CSV file”, it might use the internal model.</p><p>This decision is made in milliseconds based on:</p><ul><li>Question complexity</li><li>Your subscription tier</li><li>Company budget remaining</li><li>Current GPU capacity</li><li>Model availability</li></ul><p>This routing layer is crucial for cost optimization. Get this wrong, and you’re overspending significantly.</p><h3>Second 3–4: GPU Processing Begins</h3><p>Your request (now as token IDs + metadata) finally reaches the GPU clusters and supporting infrastructure.</p><p>Here’s what happens:</p><ol><li><strong>Embedding Lookup</strong> — Each token ID is converted into a vector (the token’s numerical representation in the model’s learned space)</li><li><strong>Forward Pass</strong> — The model processes all token vectors through its neural network layers. This is matrix multiplication at massive scale.</li><li><strong>Generation begins</strong> — The model doesn’t compute the entire answer at once. Instead, it predicts one token at a time.</li></ol><p>Token 1: “The” Token 2: “payment” Token 3: “reconciliation” Token 4: “logic” …and so on.</p><p>Each token generation requires another forward pass through the neural network.</p><p>For a detailed explanation (maybe hundreds of tokens), this means hundreds of generation steps.</p><p>Hundreds of tokens may require hundreds of generation steps, each taking time to compute.</p><p>But because the company has multiple parallel processors and request batching, your actual wait is optimized. You get your answer in seconds, not minutes.</p><p>This is where most of the latency comes from. And this is where most of the cost comes from.</p><h3>Second 5: The Answer Streams Back</h3><p>As the model generates tokens, they don’t wait to be bundled up and sent all at once.</p><p>Instead, they stream back to your IDE using a persistent HTTP connection (Server-Sent Events / SSE protocol).</p><p>This is why you see the Copilot suggestion appearing word-by-word in your editor. Not all at once, but streaming in real time.</p><p>Why streaming?</p><ol><li><strong>Perceived speed</strong> — Users feel like they’re getting answers faster (even if total time is the same)</li><li><strong>Interruptibility</strong> — If you see the suggestion is going in the wrong direction, you can stop it</li><li><strong>Network efficiency</strong> — Instead of sending a large response all at once, send it in chunks</li><li><strong>Backend efficiency</strong> — The server doesn’t need to buffer the entire response in memory</li></ol><p>As tokens stream back:</p><ol><li><strong>Decode back to text</strong> — Each token is converted back from the model’s numerical representation to human-readable text</li><li><strong>Format for display</strong> — The response is formatted (syntax highlighting, code blocks, etc.)</li><li><strong>Stream to your IDE</strong> — The formatted tokens are sent back to your IDE plugin via the SSE connection</li><li><strong>Display in editor</strong> — Your IDE displays the response in real time</li></ol><p>Meanwhile, in the background:</p><ul><li><strong>Usage is logged</strong> — How many tokens were sent? How many generated? Which model was used? How long did it take?</li><li><strong>Billing is recorded</strong> — Based on tokens used, the cost is calculated and added to your company’s bill</li><li><strong>Metrics are tracked</strong> — Did the user accept the suggestion? Did they ask a follow-up? These metrics inform model improvements</li></ul><h3>Let’s See the Complete Journey With Timing</h3><p>Here’s the full path with realistic timing:</p><pre>Your IDE (VS Code)<br>    ↓<br>Copilot Plugin (1ms)<br>    ↓<br>Context Collection (500ms)<br>    - Your current file<br>    - Related files<br>    - Chat history<br>    - System prompts<br>    ↓<br>Security &amp; Compliance (200ms)<br>    - Authentication<br>    - Authorization<br>    - Data classification<br>    - Policy checks<br>    ↓<br>Knowledge Retrieval / RAG (400ms)<br>    - Search embeddings<br>    - Find relevant docs<br>    - Find similar questions<br>    - Rank and select<br>    ↓<br>Tokenization (100ms - CPU at Gateway)<br>    - Convert all text to token IDs<br>    ↓<br>Model Selection &amp; Routing (50ms)<br>    - Analyze complexity<br>    - Check budget<br>    - Choose model<br>    - Route request<br>    ↓<br>GPU Processing (2000-3000ms)<br>    - Embedding lookups<br>    - Forward passes<br>    - Generate tokens one-by-one<br>    - Stream tokens back<br>    ↓<br>Response Formatting (100ms)<br>    - Decode tokens<br>    - Format for display<br>    - Syntax highlighting<br>    ↓<br>Back to Your IDE (50ms)<br>    - Display in editor<br>    - Log usage<br>    - Record metrics<br>    - Update billing<br>    ↓<br>Your Screen Shows Answer</pre><p><strong>Total time: 3–5 seconds</strong></p><p>But inside that time, many different systems are working together.</p><h3>Now Multiply This By Scale</h3><p>Remember Chapter 1?</p><p>10,000 engineers × 50 requests per day = 500,000 requests per day.</p><p><strong>Every single request</strong> goes through all these layers.</p><p>Every request needs:</p><ul><li>Context collection from the codebase</li><li>Security checks</li><li>Knowledge retrieval</li><li>Tokenization</li><li>Model selection</li><li>GPU processing</li><li>Logging and billing</li></ul><p>Now you see why companies need:</p><ul><li>GPU clusters and supporting infrastructure</li><li>Sophisticated caching layers (to avoid repeating the same knowledge retrieval)</li><li>Load balancing systems (to route requests efficiently)</li><li>Rate limiting (to prevent overload)</li><li>Cost tracking systems (to monitor spending)</li><li>Token counting systems (to predict costs before processing)</li></ul><p>A single slow security check gets multiplied by 500,000. A single inefficient context collector wastes millions per month.</p><p>This is why every millisecond matters.</p><h3>The Invisible Work</h3><p>Here’s what you don’t see when you press Enter:</p><ul><li><strong>Billions of mathematical operations</strong> happening on processors</li><li><strong>Searches through millions of documents</strong> in your company’s knowledge base</li><li><strong>Security systems</strong> checking your identity and permissions</li><li><strong>Cost accounting</strong> tracking every token used</li><li><strong>Distributed systems</strong> coordinating across data centers</li><li><strong>Caching layers</strong> checking if this question has been asked before</li><li><strong>Fallback systems</strong> ready to redirect your request if the primary system is overloaded</li><li><strong>Monitoring systems</strong> tracking latency, errors, and cost</li><li><strong>Audit logs</strong> recording where your code went</li></ul><p>All invisible. All in the background. All in those 5 seconds.</p><h3>A Realisation</h3><p>Before I understood this flow, I thought:</p><p>“AI is fast because the model is fast.”</p><p>After understanding this flow, I realized:</p><p>“AI is fast because many different systems are working together in perfect coordination.”</p><p>The model generates responses quickly. But that’s only one part of the story. The other parts — context collection, security, retrieval, tokenization, routing, and formatting — are equally important.</p><p>The model gets most of the attention.</p><p>But the surrounding engineering platform deserves just as much appreciation.</p><p>And the cost? The model compute is one part. The other part is infrastructure: storage for context, networking, security compliance, monitoring, logging, caching, serving.</p><p>This is why understanding the full path matters.</p><p>Because if you’re a company paying millions for AI, you need to know where every dollar goes.</p><p>And where the biggest opportunities to optimize are.</p><h3>Why This Matters to You</h3><p>If you’re building AI features into your product, you need to understand this path.</p><p>Because every layer is a lever for optimisation:</p><ul><li><strong>Context collection</strong> — Optimise which files you send. Cleaner code = less context = faster processing</li><li><strong>Security layer</strong> — For internal tools, can you skip some checks? For customer-facing, tighten them</li><li><strong>Knowledge retrieval</strong> — Better retrieval = better answers. Worse retrieval = users frustrated</li><li><strong>Tokenisation</strong> — Fewer tokens = faster GPU processing = lower costs</li><li><strong>Model routing</strong> — Pick the right model for the right question. Saves cost and latency</li><li><strong>GPU efficiency</strong> — Batch similar requests. Cache repeated questions. Optimise token count</li></ul><p>If you’re a company paying for AI tools, you need to understand this path.</p><p>Because every layer is a cost:</p><ul><li>If your security layer is too strict, you’re rejecting valid requests</li><li>If your knowledge retrieval is too thorough, you’re wasting compute</li><li>If your model routing is too conservative, you’re overspending on expensive models</li><li>If your context collection pulls in too much code, you’re paying for tokens you don’t need</li><li>If your codebase is poorly structured, every AI request costs more (technical debt becomes AI cost)</li></ul><p>Understanding this journey is the first step to optimizing it.</p><h3>The Biggest Surprise</h3><p>The biggest surprise for me wasn’t how intelligent the model was.</p><p>It was how much engineering happens before the model even starts thinking.</p><p>The model gets most of the attention. But the surrounding engineering platform does most of the work.</p><p>That’s the real AI system.</p><h3>Next in the Series</h3><p><strong>Chapter 3: What Are Tokens? The Most Important AI Concept Nobody Explains</strong></p><p><em>Tokens are the fundamental unit of AI cost, latency, and capability. Understand tokens, and you understand why conversations get expensive, why context windows matter, and how billing really works.</em></p><p><em>We’ll answer: What is a token mathematically? Why does every AI company optimise for tokens? And how do you calculate token usage before you send a request?</em></p><p>Every complex AI system begins with a simple question: “How does this actually work?”</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=510d8a139fb9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Biggest Change Wasn’t the Tool — It Was My Mindset]]></title>
            <link>https://lekshmana.medium.com/the-biggest-change-wasnt-the-tool-it-was-my-mindset-3ccb7aa83089?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ccb7aa83089</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Tue, 09 Jun 2026 14:10:22 GMT</pubDate>
            <atom:updated>2026-06-09T14:10:22.597Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Biggest Change Wasn’t the Tool — It Was My Mindset</h3><p><em>Part 1 of The AI Engineer’s Playbook</em></p><p>Lessons learned while rethinking my personal AI-assisted development workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hWfCyTWaGJmWzP06wE1wUw.png" /><figcaption><strong>The AI Engineer’s Playbook</strong> is a practical series documenting what I’ve learned while integrating AI into real software engineering workflows — focusing on engineering thinking,</figcaption></figure><p>For the past few years, AI has become part of my daily software development workflow. In my organization, I have been using Claude Code extensively, while for my personal projects I relied heavily on GitHub Copilot.</p><p>When my preferred GitHub Copilot workflow became temporarily unavailable, I didn’t immediately look for another subscription. <br>Instead, I spent time understanding how modern AI coding assistants actually work — their context windows, usage limits, costs, and engineering workflows.</p><p>After reading the official documentation, experimenting with different approaches, and analyzing my own development habits, <em>I decided to use Claude Pro with Claude Code CLI for my personal projects.</em></p><p>What surprised me wasn’t the tool itself — it was how much I needed to change the way I worked with it. The biggest lesson was that I needed to change <strong>how I think about AI-assisted development</strong>.</p><p>This article is not intended to prove that one tool is better than another. <em>It is simply a collection of lessons that changed how I think about AI-assisted software engineering.</em></p><h3>The biggest mindset shift</h3><p>The biggest realisation was this:</p><p><strong><em>GitHub Copilot felt like autocomplete.<br>Claude Code feels like collaborating with another engineer.</em></strong></p><p>That changes everything.</p><p>Autocomplete completes lines.</p><p>An engineer understands problems, asks questions, creates plans, and then implements solutions.</p><p>Once I started treating AI as an engineering partner rather than an autocomplete engine, my workflow improved dramatically.</p><h3>The first misconception</h3><p>Most developers ask:</p><blockquote><em>How many prompts do I get?</em></blockquote><p>I now believe this is the wrong question.</p><p>The better question is:</p><blockquote><em>How much context am I carrying?</em></blockquote><p>Consider two prompts.</p><p>Prompt A:</p><p><em>“Rename this variable.”</em></p><p>Prompt B:</p><p><em>“Analyze my repository, understand the architecture, modify twenty files, generate tests, and review everything.”</em></p><p>Both are one prompt.</p><p>They are nowhere near equal in the amount of work required.</p><p>The real optimization is not reducing prompts.<br>The real optimization is reducing unnecessary context.</p><h3>Think like a senior engineer</h3><p>Imagine hiring a senior engineer.</p><p>You would never say: <em>“Fix the entire project.”</em></p><p>Instead you would say:</p><ol><li>Understand the problem.</li><li>Explain your approach.</li><li>Wait for approval.</li><li>Implement.</li><li>Test.</li><li>Review.</li></ol><p>AI coding assistants become significantly more effective when treated the same way.</p><p>My typical workflow today is:</p><pre>Understand.<br>↓<br>Create a plan.<br>↓<br>Wait for approval.<br>↓<br>Implement only Step 1.<br>↓<br>Run tests.<br>↓<br>Review changes.</pre><p>This produces better software and usually consumes fewer resources.</p><blockquote>Every conversation carries context. Unless you intentionally reset it, yesterday’s discussion can become today’s unnecessary baggage.</blockquote><h3>The most important command: /clear</h3><p>If I had to recommend only one command for Claude Code, it would be:</p><p>/clear</p><p>Why? Because every conversation carries history.</p><p>Suppose today’s session looks like this:</p><pre>Bug fixing<br>↓<br>Database migration<br>↓<br>Architecture discussion<br>↓<br>Refactoring<br>↓<br>Documentation</pre><p>Every new prompt forces Claude to carry all of that previous conversation.</p><p>Instead, after completing one task:</p><pre>Task finished<br>↓<br>/clear<br>↓<br>Start new task</pre><p>Your project remains available.<br>Only unnecessary conversation history is removed.</p><p>This improves focus and helps manage usage.</p><h3>When should you use /compact?</h3><p>There is another command:</p><p><em>/compact</em></p><p>Many people confuse it with /clear.</p><p>Think of it this way:<br>If you are switching to a completely different problem:</p><p>Use <em>/clear.</em></p><p>If you are continuing the same feature but the conversation has become long:</p><p>Use<em> /compact.</em></p><p>Claude summarizes previous discussion while preserving important context.</p><p>Rule of thumb:</p><p><em>New task → /clear</em></p><p><em>Continue same task → /compact</em></p><h3>Think of CLAUDE.md as README for AI</h3><p>Many developers repeatedly explain:</p><ul><li>Java version</li><li>Spring Boot version</li><li>Testing strategy</li><li>Coding conventions</li><li>Naming rules</li></ul><p>Instead, place these in a CLAUDE.md file.</p><p>Think of it as a README written for your AI collaborator.</p><p>Instead of repeating the same instructions every day, your project carries its own engineering standards.</p><p>Technically, this acts as a persistent context layer, but you don’t need to think about the terminology.</p><p>Simply think:</p><p><em>README explains the project to people.<br>CLAUDE.md explains the project to your AI collaborator.<br>It is a simple but memorable distinction.</em></p><h3>Don’t paste everything</h3><p>My earlier assumption was:</p><p>More context = Better answers.</p><p>Reality taught me something different.</p><p>More context often means:</p><ul><li>More cost</li><li>More distraction</li><li>Sometimes worse answers</li></ul><p>Instead of pasting an entire file, reference the relevant file and function whenever possible.</p><p>The goal is not to give AI more information. The goal is to give it the right information.</p><p>Focused problems usually produce focused solutions.</p><h3>Sonnet vs Opus</h3><p>Many developers assume they should always use the most powerful model.</p><p>I no longer think that is a good strategy.</p><p>For everyday work:</p><ul><li>REST APIs</li><li>Unit tests</li><li>Refactoring</li><li>Spring Boot development</li></ul><p>Sonnet is usually sufficient.</p><p>Reserve Opus for:</p><ul><li>difficult debugging</li><li>architecture discussions</li><li>large cross-cutting refactors</li><li>complex reasoning</li></ul><p>One workflow I particularly like is:</p><p><em>Plan with Opus.<br>Implement with Sonnet.</em></p><blockquote><em>In my experience, matching the model to the task is often more valuable than simply choosing the largest model every time.</em></blockquote><h3>Hobby projects and production systems are different</h3><p>This distinction matters.</p><h4>Hobby projects</h4><p>Optimize for cost.</p><p>If usage is exhausted, waiting for the reset is perfectly acceptable.</p><p>There is no business impact.</p><h3>Production systems</h3><p>Optimize for time.</p><p>If resolving a critical incident quickly is worth spending a few extra dollars, availability may matter more than cost.</p><p>The correct strategy depends on the problem you are solving.</p><h3>The biggest mistake I made</h3><p>Initially I believed:</p><pre>More context<br>↓<br>Better answers<br>Now I think:<br>Relevant context<br>↓<br>Better answers</pre><p>The objective is not maximum context. The objective is maximum signal with minimum noise.</p><p>AI is not rewarded for reading unnecessary information.</p><p>Just like human engineers, it performs best when the problem is well scoped.</p><h3>My biggest lesson</h3><p>Switching from GitHub Copilot to Claude Code was not the biggest change.</p><p>The biggest change was switching from thinking:</p><p>“AI completes my code.”</p><p>to</p><p>“AI collaborates on my engineering.”</p><p>Once I made that mental shift, my prompts became better, my workflow became more structured, and my usage became more efficient.</p><p>The future of AI-assisted development is not about replacing engineers.</p><p>It is about helping engineers think, plan, and build better systems.</p><p>And like any good teammate, the quality of the collaboration depends on how clearly we communicate.</p><p><em>The best engineers will not be the ones who ask AI to write the most code. They will be the ones who know what information to provide, what information to ignore, and when to start over with a clean context. AI does not remove the need for engineering thinking — it rewards it.</em></p><p>And perhaps that was my biggest lesson: <em>the quality of the collaboration depends far more on how we think than on which tool we choose.</em></p><p><em>These observations are based on my own workflow and current understanding. AI tools evolve rapidly, so the principles in this article are more important than any specific product or model.</em></p><h4>Next in The AI Engineer’s Playbook</h4><p><em>Part 2 — Understanding Context Windows: Why One Prompt Can Cost More Than One Hundred</em></p><blockquote><strong>The AI Engineer’s Playbook : </strong><em>Practical workflows. Better engineering.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ccb7aa83089" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Ask One Question. Why Does Your Company Spend Millions on AI?]]></title>
            <link>https://lekshmana.medium.com/you-ask-one-question-why-does-your-company-spend-millions-on-ai-9b89223c8f37?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b89223c8f37</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 16:49:33 GMT</pubDate>
            <atom:updated>2026-06-07T16:49:33.401Z</atom:updated>
            <content:encoded><![CDATA[<p>Part<em> 1 of the series: </em><strong><em>AI for Software Engineers: Removing the Magic</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCKCJRnTjYuXHlafYI87XQ.png" /><figcaption>Every complex AI system begins with a simple question: <strong>“How does this actually work?”</strong></figcaption></figure><blockquote>Every complex AI system begins with a simple question:</blockquote><blockquote><strong><em>“How does this actually work?”</em></strong></blockquote><h3>The Question That Changed Everything</h3><p>We using an AI coding assistant to understand a piece of Java code or vibe coding. It gave me a useful answer in a few seconds, and I moved on.</p><p>But I didn’t expect that this five-second interaction would eventually make me think about GPUs, enterprise architecture, AI budgets, and billion-dollar investments.</p><p>A few minutes later, a simple question formed in my mind:</p><p><em>If I only typed one sentence, why are companies investing billions of dollars into AI infrastructure?</em></p><p>That question sounded almost silly at first. Surely my tiny request couldn’t possibly require that much engineering, that much hardware, that much infrastructure. But the more I explored, the more I realised that my entire mental model of AI was incomplete.</p><p>This isn’t a story about becoming an AI researcher. <br>This is a story about understanding AI the way software engineers understand APIs, databases, distributed systems, and cloud platforms. <br><em>Not as magic. As architecture.</em></p><h3>I Was Learning AI News, Not AI</h3><p>Every week there is another announcement.</p><p>A new model. <br>A new benchmark. <br>A new coding assistant. <br>A new startup claiming it will transform software development forever.</p><p>For a while, I tried to keep up. I bookmarked articles. I watched conference talks. I listened to podcasts. I saved videos thinking, “I’ll watch this later.”</p><p>Then one day I realised something uncomfortable: <br><strong>I wasn’t actually learning AI. I was only consuming AI and news.</strong></p><p>There’s a big difference.</p><p>Technologies change rapidly. But principles last much longer.</p><p>As software engineers, we’ve seen this pattern before. <br>Years ago, every conversation was about microservices. <br>Then Kubernetes. <br>Then serverless. <br>Then blockchain. <br>Each wave felt urgent. Each wave felt like it would reshape everything.</p><p>Today, the wave is AI. And yes, it’s significant. But chasing every announcement — every new model, every new benchmark, every new startup — is an endless race. I refused to run it.</p><p>I decided I wanted something different. I wanted to understand the foundations.</p><h3>My Original Mental Model</h3><p>Like many people, I unconsciously imagined AI something like this:</p><pre>Question → AI → Answer</pre><p>It looked almost magical. I ask a question. Something happens inside a black box. An answer appears.</p><p>That mental model worked for simple usage. But it completely broke down when I started asking deeper questions: If AI only processes one request at a time, why do companies invest in massive data centers with thousands of GPUs? If I’m asking a simple question, why does my company’s leadership track “AI budget” like an independent P&amp;L line item?</p><p>These weren’t theoretical questions. These were engineering questions. Real companies were making real decisions about real money based on these concepts.</p><p>That’s when I started pulling on the thread.</p><h3>A Familiar Pattern</h3><p>At that moment, I realised something important.</p><p>I had already solved similar problems throughout my career.</p><p>Every time a simple interaction hid a complex system underneath, I’d asked the same questions:</p><ul><li>When Netflix loads a homepage instantly for millions of users, what’s really happening?</li><li>When a payment processes in milliseconds, what systems are coordinating behind the scenes?</li><li>When a distributed system handles failures gracefully, how is that even possible?</li></ul><p>I’d learned that simple surfaces always hide sophisticated architectures.</p><p>AI would be no different.</p><h3>The Mental Model Changed</h3><p>I discovered that before a large language model even starts generating an answer, many things may happen.</p><p>A developer types a question into an IDE plugin.</p><p>That plugin collects context — nearby files, recent conversation, relevant documentation.</p><p>That request travels through a security layer.</p><p>The system determines which model should answer.</p><p>The request travels through a GPU cluster.</p><p>The model generates a response token by token.</p><p>The system tracks usage and billing.</p><p>The answer appears on the developer’s screen.</p><p>The journey is far more complex than the simple question-and-answer interface suggests. Every step along the way — from the moment you press Enter to the moment the answer appears — involves decisions, computations, and infrastructure that remain invisible to the user.</p><p>This was my first big realisation:</p><p><strong>The model itself is only one component. The platform surrounding the model is a sophisticated engineering system.</strong></p><h3>Think Like a Payments Engineer</h3><p>This is where thinking like an engineer became critical.</p><p>I’d spent years working on payment systems. When a customer clicks “Pay” on an e-commerce website, the user experiences this:</p><pre>Click → Success</pre><p>But every payments engineer in the room knows that behind those two steps lies a complex system:</p><pre>UI Handler<br>  ↓<br>API Gateway<br>  ↓<br>Authentication Service<br>  ↓<br>Authorization Check<br>  ↓<br>Fraud Detection Engine<br>  ↓<br>Payment Processor<br>  ↓<br>Ledger Update<br>  ↓<br>Notification Service<br>  ↓<br>Success Response</pre><p>There are DNS lookups. Load balancers. Distributed transactions. Idempotency checks. Retry logic. Monitoring and alerting. Every piece exists for a reason.</p><p>AI is becoming similar.</p><p>The user sees:</p><pre>Question → Answer</pre><p>But an engineer should visualize:</p><pre>Question<br>   ↓<br>Context Collection (which files? which chat history? which documentation?)<br>   ↓<br>Security &amp; Compliance (authentication, data classification, policy checks)<br>   ↓<br>Knowledge Retrieval (relevant code, similar problems, documentation)<br>   ↓<br>Model Selection (which model should answer this? Cost vs. quality trade-off)<br>   ↓<br>GPU Processing (forward pass, token-by-token generation)<br>   ↓<br>Response Assembly (formatting, safety checks)<br>   ↓<br>Billing &amp; Tracking (usage logs, cost allocation)<br>   ↓<br>Answer</pre><p>Once I started thinking this way, many enterprise conversations suddenly made sense.</p><h3>Why Are Companies Spending Billions?</h3><p>Let me make this concrete with numbers.</p><p><strong>A Startup Example:</strong></p><p>5 engineers at a startup.</p><p>Each uses AI maybe 50 times per day.</p><pre>5 engineers × 50 requests = 250 AI requests per day</pre><p>That’s manageable. Almost negligible cost.</p><p><strong>An Enterprise Example:</strong></p><p>10,000 engineers at a mid-sized tech company.</p><p>Each uses AI 50 times per day.</p><pre>10,000 engineers × 50 requests = 500,000 AI requests per day</pre><p>That’s 500,000 requests per day.</p><p>Now add complexity:</p><ul><li>Each request may include large context windows (nearby code files, documentation, chat history)</li><li>Some requests go to advanced models (expensive), others to faster models (cheaper)</li><li>Code retrieval systems search internal codebases</li><li>Documentation retrieval systems search knowledge bases</li><li>Every request uses GPU compute</li><li>Enterprise security runs additional checks on every request</li><li>Monitoring, governance, and audit systems track every interaction</li></ul><p>Here’s the hidden multiplier: if every single request pulls in 5 dependency files and 3 pages of documentation for context, those 500,000 requests scale into massive internal data throughput and millions of tokens processed every hour.</p><p>Suddenly, the question becomes critical: <strong>Which model should answer this question?</strong></p><p>For a complex architectural question, maybe use GPT-4 (expensive but powerful).</p><p>For a simple documentation lookup, maybe use a lightweight model (fast and cheap).</p><p>Get this decision wrong 500,000 times per day, and you’re throwing away millions per month.</p><p>AI is no longer just a chatbot feature.</p><p>It becomes infrastructure.And infrastructure costs money.</p><p>Now consider: <em>what if your company has 50,000 engineers? Or 100,000? Or what if you’re building an AI-first product where every user interaction involves AI?</em></p><p>Netflix doesn’t charge users to watch one episode of a show. But they invest billions in infrastructure because millions of people are streaming simultaneously.</p><p>Similarly, companies don’t charge developers to ask Copilot one question. But they invest millions because thousands of developers are asking thousands of questions every single day.</p><h3>AI Is Becoming Another Engineering Platform</h3><p>The conversations around me started changing.</p><p>People were no longer talking about “AI” in vague, abstract terms.</p><p>They were talking about:</p><ul><li><strong>Tokens</strong> (how do we optimize input and output?)</li><li><strong>Context windows</strong> (how much information can we include?)</li><li><strong>RAG</strong> (how do we ground AI in real data?)</li><li><strong>Model routing</strong> (when do we use expensive models vs. cheap ones?)</li><li><strong>GPU capacity</strong> (do we have enough compute?)</li><li><strong>Enterprise AI platforms</strong> (how do we govern AI at scale?)</li><li><strong>AI budgets</strong> (how much are we spending?)</li></ul><p>These are not buzzwords. These are engineering concepts.</p><p>They’re the same kinds of questions we ask about databases:</p><ul><li>What’s our query performance?</li><li>How do we optimise indexes?</li><li>What’s our data storage cost?</li><li>How do we scale horizontally?</li><li>What’s our replication strategy?</li></ul><p>They’re the same kinds of questions we ask about APIs:</p><ul><li>What’s our latency?</li><li>How do we rate-limit?</li><li>What’s our error handling?</li><li>How do we monitor reliability?</li></ul><p>They’re the same kinds of questions we ask about distributed systems:</p><ul><li>What’s our throughput?</li><li>How do we handle failures?</li><li>What’s our recovery time?</li><li>How do we ensure consistency?</li></ul><p>AI has joined the list of systems that require engineering thinking.</p><h3>Another Surprise</h3><p>I had always assumed AI searched a giant database for answers.</p><pre>Question<br>    ↓<br>Search Huge Database<br>    ↓<br>Find Answer<br>    ↓<br>Return Answer</pre><p>That model made intuitive sense. Questions go in. Answers come out.</p><p>But that’s not how modern language models work at all.</p><p>Instead, they generate responses one token at a time.</p><p>If you ask me to explain the concept of idempotency, I don’t first compose a complete 300-word essay in my head, then speak it out loud. Instead, I start:</p><p><em>“Idempotency…”</em></p><p>Then:</p><p><em>“…is the property…”</em></p><p>Then:</p><p><em>“…of operations that produce the same result…”</em></p><p>My explanation develops word by word. Language models work the same way — except they do it token by token.</p><p>That immediately raised more questions in my mind:</p><ul><li>How does AI generate architecture discussions if it’s only predicting the next word?</li><li>How does it write Java code that never existed before?</li><li>How does it explain the same concept differently to a beginner versus an experienced engineer?</li></ul><p>The deeper I explored, the more fascinating it became.</p><p>Because the answers to these questions reveal something profound: AI isn’t just a lookup tool. It’s a prediction engine that has learned patterns from vast amounts of data.</p><h3>The Turning Point</h3><p>At this point, I realised I had a choice.</p><p>I could keep accepting AI as magic. Ask a question, get an answer, move on.</p><p>Or I could start asking deeper questions.</p><p>What actually happens between pressing Enter and seeing the response?</p><p>Why do companies need so much infrastructure?</p><p>Why is cost optimisation suddenly important?</p><p>Why do conversations about AI feel different than conversations about other technologies?</p><p>I chose the second path.</p><p>And that choice led me to this realisation:</p><p><strong>AI is not just another application. It is becoming another engineering platform.</strong></p><p>Just like how understanding distributed systems made me a better engineer, understanding AI would make me a better engineer too.</p><p>Not so I could chase every new model announcement.</p><p>But so I could understand whatever comes next.</p><h3>Why I’m Writing This Series</h3><p>I don’t want to spend my career chasing every AI announcement.</p><p>Tomorrow there will be another model.</p><p>Next week there will be another benchmark.</p><p>Next month there will be another startup claiming it will revolutionise software development.</p><p>That race never ends. And I refuse to run it.</p><p>Instead, I want to understand the fundamentals.</p><p>Because technologies change constantly. But principles endure.</p><p>If I understand the engineering principles behind AI, I can adapt to whatever comes next. I can make decisions based on understanding, not hype.</p><p>So I’m going to ask simple questions, one at a time:</p><ul><li><strong>What are tokens?</strong> (And why do companies care so much about them?)</li><li><strong>What actually happens when I click “Ask Copilot”?</strong> (Let’s follow a request from keyboard to answer.)</li><li><strong>Why do companies care so much about AI costs?</strong> (Is it really that expensive?)</li><li><strong>Why can AI generate code it has never seen before?</strong> (How is that even possible?)</li><li><strong>Why does AI hallucinate?</strong> (What’s actually happening when it makes things up?)</li><li><strong>What exactly is an AI Agent?</strong> (And why is everyone talking about them?)</li><li><strong>If AI predicts one token at a time, why doesn’t it keep talking forever?</strong> (What tells it to stop?)</li></ul><p>I’m not writing as an AI researcher trying to predict the future.</p><p>I’m not writing as someone trying to chase the hype.</p><p>I’m writing as a software engineer asking simple questions and following where they lead.</p><p>Because I believe that once the magic disappears, what remains is one of the most fascinating engineering systems ever built.</p><h3>The Real Shift</h3><p>The biggest realisation for me wasn’t about AI specifically.</p><p>It was about mindset.</p><p>Before this journey, I thought learning AI meant learning prompts. Learning the latest models. Keeping up with announcements.</p><p>Today I think learning AI means understanding systems. Understanding architecture. Understanding trade-offs and costs.</p><p>That’s a different kind of learning.</p><p>I don’t need to chase every new announcement to stay relevant.</p><p>What I need to do is understand how systems work — really work, at an engineering level.</p><p>Then, when something new arrives, I won’t be confused. I won’t be intimidated. I won’t be tempted by hype.</p><p>I’ll simply ask the same questions I ask about any complex system:</p><ul><li>What’s the architecture?</li><li>What are the trade-offs?</li><li>What are the costs?</li><li>How does it fail?</li><li>How do we optimise it?</li></ul><p>That’s how software engineers should approach AI.</p><p>Not with wonder.</p><p>With curiosity.</p><p>Not by accepting magic.</p><p>By removing it.</p><p>And that’s exactly what this series is about.</p><h3>Next in the Series</h3><p><strong>Chapter 2: What Actually Happens When You Click “Ask Copilot”?</strong></p><p><em>We’ll follow a single AI request from the moment you type in your IDE, through context collection, security checks, model routing, GPU processing, and finally to the answer you see on your editor.</em></p><p><em>We’ll answer: Where does my code go? Who sees it? How does the system decide which model to use? And how does it end up in my editor?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b89223c8f37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[World Environment Day — June 5]]></title>
            <link>https://lekshmana.medium.com/world-environment-day-june-5-9d5e9fed7238?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d5e9fed7238</guid>
            <category><![CDATA[sustainable-development]]></category>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[world-environment-day]]></category>
            <category><![CDATA[climate-change]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 08:13:09 GMT</pubDate>
            <atom:updated>2026-06-05T08:20:12.506Z</atom:updated>
            <content:encoded><![CDATA[<h3>World Environment Day — June 5</h3><h3>The Biggest System We Depend On (But Rarely Think About)</h3><p>Most of us think about the environment only when we hear about a heat wave, a flood, a drought, or a cyclone. Yet the environment quietly supports almost every part of our lives every single day.</p><p>Every year on <em>June 5th</em>, the world observes <em>World Environment Day</em>. For many people, it is associated with planting a tree, sharing a social media post, or attending an awareness event. While these activities are useful, the environment is much bigger than any one-day campaign.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYArg6ymPn_FLkEyFIeaZg.png" /><figcaption>Paddy fields near Kadukkarai, Tamil Nadu, with the Western Ghats in the background.</figcaption></figure><p>In reality, the environment is the largest system that supports every other system we have built.</p><p>As a software engineer, I often think about systems. Payment systems, e-commerce platforms, cloud infrastructure, AI systems, and global networks. All of them can fail.</p><p>But there is one system that none of us can replace if it fails.</p><p><em>That system is the Earth itself.</em></p><p>The air we breathe, the water we drink, the soil that grows our food, the forests, rivers, oceans, insects, animals, and microorganisms together form a giant interconnected system called the environment.</p><p>And just like any large-scale system, everything is connected. When one part is disturbed, the effects eventually appear somewhere else.</p><h3>Understanding Climate Change Like a System Engineer</h3><p>We hear the phrase “<em>Climate Change</em>” almost every day. But what exactly does it mean?</p><p>Imagine your house during summer. Sunlight enters through the windows and warms the rooms. If that heat cannot escape properly, the temperature inside keeps increasing.</p><p>The Earth behaves somewhat similarly.</p><p>The Sun sends energy to Earth. Some of that heat is absorbed and some should escape back into space.</p><p>Fortunately, our atmosphere naturally acts like a protective blanket. Certain gases help retain just enough heat to make Earth comfortable for life. Without this natural process, our planet would be too cold.</p><p>This is called the <em>Greenhouse Effect.</em></p><p>The problem begins when humans add too many greenhouse gases into the atmosphere. <em>Carbon dioxide (CO₂), methane (CH₄), and nitrous oxide (N₂O)</em> accumulate faster than nature can balance them.</p><p>The atmosphere becomes a thicker blanket. More heat gets trapped, and over time the average temperature of the planet begins to rise.</p><p>This is called <em>Global Warming.</em></p><p>The long-term consequences of this warming — changing rainfall patterns, stronger storms, droughts, floods, and rising sea levels — are what we call <em>Climate Change.</em></p><p><em>Think of it as a production system slowly accumulating technical debt for decades. Nothing seems wrong initially. Then one day failures start appearing everywhere.</em></p><h3>Carbon Emissions: Millions of Small Actions, One Big Impact</h3><p>Most people never see carbon emissions directly because carbon dioxide is invisible. Yet it is one of the most important outputs of modern civilisation.</p><p>Every time we burn petrol, diesel, coal, or natural gas, carbon dioxide is released into the atmosphere.</p><p><em>A bike ride. A car trip. A flight. A factory. A thermal power plant.</em></p><p>Each contributes a little.</p><p>Individually, these activities seem insignificant. Collectively, billions of them running every day create a global impact.</p><p>Engineers may recognise this as something similar to a <em>DDoS attack</em>. One request is harmless. <em>Billions of requests overwhelm the system.</em></p><p>One vehicle is not the problem.<br>A billion vehicles create a challenge.</p><h3>Why Does Summer Feel Hotter Than Before?</h3><p>Many people say, “<em>When we were children, summers didn’t feel this hot.</em>”</p><p>There is some truth behind that observation.</p><p>Climate change plays a role. But local changes matter too.</p><p>Consider a village road lined with large trees. Now imagine the same road after the trees are removed and concrete structures replace open spaces.</p><p>The difference is immediately noticeable.</p><p>Trees are natural cooling systems. They provide shade, release moisture, and reduce local temperatures.</p><p>A car parked under a tree and a car parked in direct sunlight can feel like they belong to two different climates.</p><p>Sometimes we discuss climate change as a global issue while forgetting the local factors directly around us.</p><h3>A Small Observation From Villages</h3><p>Growing up in <em>Kanyakumari district</em>, many of us never thought deeply about ponds, wells, canals, or large trees. They simply existed.</p><p><em>Water was available when we needed it. Shade was available during summer, and fields quietly produced food year after year.</em></p><p>Only when some of these disappear do we realise they were silently performing important functions for decades.</p><p>Many villages still preserve lessons that modern cities are trying to rediscover:</p><ul><li>Rainwater harvesting</li><li>Local food production</li><li>Walking short distances</li><li>Community living</li><li>Repairing things instead of replacing them</li><li>Living closer to natural cycles</li></ul><p>Ironically, as the world becomes more advanced, it is increasingly looking back toward some of these older practices.</p><h3>Climate Change Is Not Just About Polar Bears</h3><p>When people hear climate change, they often imagine melting glaciers or distant polar regions.</p><p>But the effects are much closer to home.</p><p><em>A farmer notices rainfall arriving at unexpected times.<br>A fisherman observes changing sea conditions.<br>A family experiences longer heat waves.<br>A town faces water shortages.</em></p><p>These are environmental issues too.</p><p>Climate change affects agriculture, food prices, water availability, public health, energy demand, and infrastructure.</p><p>Eventually, environmental problems become economic problems.</p><p>And economic problems become social problems.</p><h3>The Success and Lessons of the Green Revolution</h3><p>India’s <em>Green Revolution</em> is one of the great success stories in modern history.</p><p>During the 1960s, food shortages were a major concern. Through improved seeds, irrigation, fertilizers, and farming techniques, agricultural production increased dramatically.</p><p><em>Millions benefited.<br>Food security improved.<br>A nation became more self-reliant.<br>But every solution has trade-offs.</em></p><p>Over time, excessive use of chemical fertilizers and pesticides created new challenges, including soil degradation, groundwater depletion, reduced biodiversity, and increased dependence on external inputs.</p><p><em>The lesson is not that the Green Revolution was wrong.<br>The lesson is that every system requires balance.</em></p><p>Today, <em>sustainable agriculture</em> is becoming increasingly important because it focuses on producing enough food while protecting soil, water, and biodiversity for future generations.</p><h3>Why Green Energy Matters</h3><p>For more than a century, humanity has powered growth using fossil fuels.</p><p><em>Coal powered industries.<br>Oil powered transportation.<br>Gas powered electricity generation.</em></p><p>These fuels enabled enormous progress but also contribute significantly to carbon emissions.</p><p>Renewable energy offers an alternative.</p><p><em>Solar energy.<br>Wind energy.<br>Hydroelectric power.<br>Biomass energy.</em></p><p><em>The goal is not to stop development.<br>The goal is to develop differently.</em></p><p>India is now one of the world’s fastest-growing renewable energy markets</p><h3>Development and Environment: Not Either-Or</h3><p>Whenever environmental issues are discussed, people sometimes assume the solution is to slow down development.</p><p>For a country like India, the challenge is more complex.</p><p>Millions of people still need better housing, transportation, healthcare, education, electricity, and economic opportunities.</p><p><em>Development is necessary.</em></p><p>The real challenge is ensuring that development and environmental protection move together.</p><p>The question is not: <em>“Should we develop?”</em></p><p>The question is: <em>“How should we develop?”</em></p><p><em>The future will depend on finding the right balance between economic growth and environmental sustainability.</em></p><h3>AI Can Help the Environment — And Also Consume Resources</h3><p>As someone working in technology and learning AI, I find this topic particularly interesting.</p><p>AI is already helping environmental efforts <em>through weather forecasting, flood prediction, forest fire detection, water management, agricultural recommendations, and wildlife monitoring.</em></p><p>These are powerful applications.</p><p>But there is another side to the story.</p><p>Training large AI models requires massive data centers, powerful GPUs, significant electricity, and extensive cooling systems.</p><p>We often think of the digital world as weightless.</p><p><em>A video stream feels invisible.<br>An AI query feels invisible.<br>A cloud backup feels invisible.</em></p><p>But behind every digital action are servers, storage systems, cooling equipment, electricity, and physical infrastructure somewhere in the world.</p><p><em>Technology is not automatically good or bad.</em><br><em>Its impact depends on how responsibly we build and use it.</em></p><p><em>The future requires balancing technological progress with environmental responsibility.</em></p><h3>The Environmental Cost of Food Waste</h3><p>One of the most overlooked environmental issues is food waste.</p><p>Consider a single plate of rice.</p><p><em>Behind it are water, soil, seeds, farmer effort, transportation, electricity, packaging, and time.</em></p><p>When food is wasted, all of those resources are wasted too.</p><p>The issue is not merely about finishing food because someone told us to.</p><p><em>It is about respecting the resources embedded within it.</em></p><h3>Consumerism and the Hidden Environmental Cost of Everyday Choices</h3><p>Every product we buy has an environmental footprint.</p><ul><li>A mobile phone requires mining, manufacturing, transportation, packaging, and electricity.</li><li>A shirt requires water, energy, raw materials, transportation, and labor.</li><li>Even a package delivered to our doorstep involves warehouses, vehicles, fuel, and logistics networks.</li><li>Modern economies depend on consumption, and there is nothing wrong with buying things we genuinely need.</li></ul><p>But sustainable consumption encourages us to ask a simple question:<br><em>Do I really need this, or do I simply want it?</em></p><p>Environmental responsibility is not only about what we throw away.<br><em>It is also about what we choose to buy.</em></p><p>Sometimes the most environmentally friendly product is the one we do not replace unnecessarily.</p><h3>E-Waste: The Growing Digital Challenge</h3><p>Every year, millions of devices become obsolete.</p><p><em>Old phones.<br>Laptops.<br>Chargers.<br>Batteries.<br>Electronic accessories.</em></p><p>Many contain materials that can harm soil and groundwater if discarded improperly.</p><p>As technology adoption increases, e-waste management becomes increasingly important.</p><p>The digital world also leaves a physical footprint.</p><h3>Biodiversity: Nature’s Hidden Network</h3><p>A forest is not simply a collection of trees.</p><p>It is a network.</p><p><em>Birds, insects, animals, plants, and microorganisms all interact with one another.</em></p><p>Remove enough pieces, and the system becomes unstable.</p><p>Engineers understand this concept well. <em>Redundancy and diversity improve resilience.</em></p><p><em>Nature discovered this principle long before humans did.<br></em>That is <em>biodiversity</em>.</p><h3>Water May Become the Most Important Resource of This Century</h3><p>If biodiversity is nature’s network, <em>water is the resource that keeps the entire network running.</em></p><p><em>Agriculture depends on it.<br>Industry depends on it.<br>Human survival depends on it.</em></p><p>A village pond is not merely a scenic location. <em>It is infrastructure.</em></p><p><em>A lake</em> is infrastructure.<br><em>A river</em> is infrastructure.<br><em>Groundwater</em> recharge is infrastructure.</p><p>We often invest heavily in visible infrastructure while neglecting the natural infrastructure that supports everything else.</p><h3>What Should We Teach Children?</h3><p>Environmental education should be more than telling children not to litter.</p><p>Children should understand:</p><ul><li>Where does water come from?</li><li>How does a seed become food?</li><li>Why are bees important?</li><li>Why do trees matter?</li><li>Why should ponds be protected?</li></ul><p>A child who understands these connections is more likely to become a responsible adult.</p><p><em>Not because they memorised facts.<br>Because they understand systems.</em></p><h3>Ten Practical Things Families Can Do</h3><ol><li>Plant at least one tree every year.</li><li>Avoid wasting water.</li><li>Carry reusable bags.</li><li>Reduce unnecessary electricity consumption.</li><li>Minimize single-use plastics.</li><li>Support local farmers when possible.</li><li>Maintain a small garden.</li><li>Segregate waste.</li><li>Take children to natural places.</li><li>Make environmental responsibility part of family culture.</li></ol><p>None of these actions will solve climate change alone.</p><p><em>But large-scale change is often the accumulation of small actions repeated by millions of people.</em></p><h3>Everything Is Connected</h3><p>Looking at the environment through a systems lens reveals something important.</p><p>Water, food, agriculture, biodiversity, energy, technology, and human communities are <em>not separate topics.</em><br><em>They are interconnected parts of the same system.</em></p><p>When one part becomes unhealthy, the effects eventually spread elsewhere.</p><p><em>A drought affects agriculture.<br>Agriculture affects food prices.<br>Food prices affect families.<br>Families affect economies.</em></p><p>Understanding these connections may be one of the most important skills future generations need.</p><h3>Final Thought</h3><p>We often speak about saving nature.<br>But perhaps the real challenge is learning how to live with nature.</p><p><em>Nature does not need humans to survive.<br>Humans need nature to survive.</em></p><p>Every tree, pond, river, farm, forest, and pollinator is part of a system that supports our lives in ways we rarely notice.</p><p><strong>World Environment Day</strong> is not simply about planting a tree or sharing a message online.</p><p>It is an opportunity to remember that every decision we make — what we buy, what we waste, how we travel, how we use energy, and what we teach our children — has an environmental impact.</p><p><em>We did not inherit this planet from our ancestors.<br>We are borrowing it from future generations.</em></p><p>Our responsibility is simple:</p><p><strong>Leave it in a better condition than we received it.</strong></p><p>— <strong>Lekshmana</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d5e9fed7238" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Payments Systems — A Field Guide]]></title>
            <link>https://lekshmana.medium.com/payments-systems-a-field-guide-9b454287fdfa?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b454287fdfa</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 05:53:38 GMT</pubDate>
            <atom:updated>2026-04-27T05:53:38.707Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A system-level exploration of how modern payment systems work — from real-time flows to distributed correctness and the constraints that shape them.</em></p><p>Payment systems look simple.</p><p><em>Scan a QR. Tap a card. Click a button.</em></p><p>Money moves.</p><p>But behind that simplicity lies one of the most complex distributed systems in production today — shaped by constraints, coordination, and correctness.</p><p>This field guide is an attempt to understand payment systems not as features, but as evolving infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nf_JX0g1Lin_6Ns5.png" /><figcaption>Payments Systems — A Field Guide</figcaption></figure><h3>The Arc — How Payment Systems Evolve</h3><p>Each post in this series explores a different layer of the system.</p><p>Together, they form a complete mental model.</p><h3>The Arc — In One View</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*k96fv8BSIQSd31Y7Gr1fOA.png" /></figure><h3>1. Evolution — A System Under Pressure</h3><p>👉 Evolution is a response to constraints.</p><p><a href="https://lekshmana.medium.com/digital-payments-a-system-shaped-by-constraints-52d7fed5e241">https://lekshmana.medium.com/digital-payments-a-system-shaped-by-constraints-52d7fed5e241</a></p><h3>2. Real-Time Systems — Coordinating Under Latency</h3><p>👉 Speed is a managed budget.</p><p><a href="https://lekshmana.medium.com/real-time-payments-the-illusion-of-instant-62195284ffb9">https://lekshmana.medium.com/real-time-payments-the-illusion-of-instant-62195284ffb9</a></p><h3>3. Adversarial Systems — Trust in an Untrusted World</h3><p>👉 Trust is verified, not assumed.</p><p><a href="https://lekshmana.medium.com/payment-systems-designed-for-adversarial-behaviour-59a308af029c">https://lekshmana.medium.com/payment-systems-designed-for-adversarial-behaviour-59a308af029c</a></p><h3>4. Settlement — Where Truth Is Established</h3><p>👉 Success is a promise; settlement is the fact.</p><p><a href="https://lekshmana.medium.com/payment-systems-where-success-is-not-the-end-43bb595f4e98">https://lekshmana.medium.com/payment-systems-where-success-is-not-the-end-43bb595f4e98</a></p><h3>5. Cross-Border — Where Systems Break</h3><p>👉 Fragmentation is the default state.</p><p><a href="https://lekshmana.medium.com/cross-border-payments-where-systems-break-7306a4560ff7">https://lekshmana.medium.com/cross-border-payments-where-systems-break-7306a4560ff7</a></p><h3>6. Distributed Truth — The Myth of Exactly Once</h3><p>👉 “Effectively once” is the only honesty.</p><p><a href="https://lekshmana.medium.com/payment-systems-why-exactly-once-is-a-myth-b278f99a09b6">https://lekshmana.medium.com/payment-systems-why-exactly-once-is-a-myth-b278f99a09b6</a></p><h3>7. Embedded Finance — When Payments Disappear</h3><p>👉 Invisibility increases complexity.</p><p><a href="https://lekshmana.medium.com/embedded-finance-when-payment-becomes-a-side-effect-70b8342fb2aa">https://lekshmana.medium.com/embedded-finance-when-payment-becomes-a-side-effect-70b8342fb2aa</a></p><h3>8. The Future — Constraints That Remain</h3><p>👉 Constraints are the only constant.</p><p><a href="https://lekshmana.medium.com/the-future-of-payments-what-constraints-still-remain-58a5eee0dcc4">https://lekshmana.medium.com/the-future-of-payments-what-constraints-still-remain-58a5eee0dcc4</a></p><h3>The 3 Realities of Payment Systems</h3><p>Beyond architecture and flow, three realities shape how systems behave in production.</p><h3>Operational Reality</h3><p>A system can be fully available — <br>and still fail to move money.</p><p>👉 Success rates matter more than uptime.</p><h3>Economic Reality</h3><p>Every step in the payment flow has a cost.</p><p>👉 A technically optimal path may not be economically viable.</p><h3>Temporal Reality</h3><p>A payment is not truly final at “success”.</p><ul><li>settlement may still occur</li><li>reconciliation may still run</li><li>disputes may arise later</li></ul><p>👉 Finality is a process, not a moment.</p><h3>Regulatory Reality</h3><p>Payment systems do not operate in isolation.</p><p>They are shaped by regulatory frameworks:</p><ul><li>KYC (Know Your Customer)</li><li>AML (Anti-Money Laundering)</li><li>transaction limits and reporting</li><li>audit and compliance requirements</li></ul><p>These are not implementation details.</p><p>👉 They influence how systems are designed,<br>what flows are allowed,<br>and how trust is established at scale.</p><h3>A Complete Mental Model</h3><p>If you can answer these questions,<br>you understand payment systems at a system level:</p><ul><li>Why can’t money move like an email?</li><li>How do multiple systems coordinate in seconds?</li><li>How is trust established in an open network?</li><li>What happens when systems fail mid-transaction?</li><li>Why do cross-border payments slow down?</li><li>Why is “exactly once” not achievable?</li></ul><h3>The Hidden Pillars of Production Systems</h3><p>Beyond visible system design, a few underlying principles determine whether a payment system works reliably at scale.</p><h3>1. Onboarding Is Part of the Payment</h3><p>The system begins before the transaction.</p><p>Identity verification (KYC/KYB) defines:</p><ul><li>who can transact</li><li>how much they can transact</li><li>what flows are allowed</li></ul><p>👉 The first risk decision happens before money moves.</p><h3>2. Decouple Data from Money</h3><p>Payment systems operate in two layers:</p><ul><li>the <strong>data layer</strong> (messages, requests, responses)</li><li>the <strong>money layer</strong> (actual movement of value)</li></ul><p>The data layer moves instantly.<br>The money layer moves with guarantees and delay.</p><p>👉 Confusing the two leads to incorrect system assumptions.</p><h3>3. The Ledger Is the Law</h3><p>Databases record system state.</p><p>Ledgers record financial truth.</p><p>A payment system must ensure:</p><ul><li>every debit has a corresponding credit</li><li>balances reconcile across systems</li></ul><p>👉 Without a proper ledger, correctness cannot be guaranteed.</p><h3>Final Observation</h3><p>Payment systems are not defined by perfect execution.</p><p>They are defined by how they operate under constraints:</p><ul><li>trust</li><li>latency</li><li>coordination</li><li>regulation</li><li>correctness</li></ul><p>What looks like a simple transfer of money<br>is actually a system designed to:</p><ul><li>tolerate uncertainty</li><li>coordinate independent entities</li><li>and converge to the correct outcome over time</li></ul><p>In the end, payment systems are not about moving money.</p><p>They are about:</p><p><em>👉 ensuring that value moves correctly — even when everything else is uncertain.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b454287fdfa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Future of Payments — What Constraints Still Remain]]></title>
            <link>https://lekshmana.medium.com/the-future-of-payments-what-constraints-still-remain-58a5eee0dcc4?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/58a5eee0dcc4</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[payments]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 04:01:53 GMT</pubDate>
            <atom:updated>2026-04-27T04:01:53.751Z</atom:updated>
            <content:encoded><![CDATA[<p>Post 8 <em>Even as systems evolve, the hardest problems remain — shaping the future of payments through constraints, not just technology.</em></p><p><em>In the previous posts, we explored how payment systems evolved,<br>how real-time flows behave,<br>how systems defend against adversarial behavior,<br>how settlement ensures correctness,<br>where systems break across boundaries,<br>why “exactly once” is a myth,<br>and how payments become invisible inside modern applications.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8FIunwsyGO3e9dB6.png" /><figcaption>Payments Systems — A Field Guide</figcaption></figure><p>From a user’s perspective, payments feel solved.</p><ul><li>they are fast</li><li>they are embedded</li><li>they are often invisible</li></ul><p>So the natural question is:</p><p>👉 what is left to solve?</p><blockquote><em>Payment systems today are highly optimised at the user experience layer.<br>The remaining challenges are no longer visible in the interface — <br>they exist in the underlying constraints that systems still cannot eliminate.</em></blockquote><h3>The Illusion of Completion</h3><p>It is easy to assume that payments are “done”.</p><ul><li>real-time systems exist</li><li>global platforms operate at scale</li><li>transactions complete in seconds</li></ul><p>But this view focuses on the surface.</p><p>Underneath, several constraints still shape how systems behave.</p><h3>Constraint 1 — Cross-Border Still Breaks</h3><p>Domestic systems operate within:</p><ul><li>a shared regulator</li><li>a single currency</li><li>standardized infrastructure</li></ul><p>Cross-border systems operate without these guarantees.</p><ul><li>multiple jurisdictions</li><li>currency conversion</li><li>fragmented settlement systems</li></ul><p>This creates:</p><ul><li>latency</li><li>uncertainty</li><li>coordination overhead</li></ul><p>Even today, moving money across borders remains slower,<br>less transparent, and more complex than domestic transfers.</p><h3>Constraint 2 — Identity Is Not Global</h3><p>Payment systems rely on identity.</p><ul><li>who is sending money?</li><li>who is receiving it?</li></ul><p>But identity systems are fragmented:</p><ul><li>different KYC standards</li><li>varying regulatory requirements</li><li>no universal identity layer</li></ul><p>This forces systems to:</p><p>👉 re-establish trust repeatedly across boundaries</p><p>This challenge is evolving further.</p><p>As systems move toward automation and AI-driven actions,<br>the question shifts from:</p><ul><li>“Who is this person?”</li></ul><p>to:</p><ul><li>“Who authorized this system?”</li></ul><p>In machine-to-machine interactions, identity is no longer just human.</p><p>It becomes:</p><p>👉 delegated trust between systems</p><h3>Constraint 3 — Finality vs Flexibility</h3><p>There is a fundamental tension:</p><ul><li>users expect reversibility</li><li>systems require finality</li></ul><p>Examples:</p><ul><li>card payments allow chargebacks</li><li>real-time systems aim for immediate finality</li><li>blockchain systems push immutability</li></ul><p>Each approach solves one side<br>while compromising the other.</p><p>👉 There is no perfect balance</p><h3>Constraint 4 — Offline and Resilience</h3><p>Most modern systems assume:</p><p>👉 constant connectivity</p><p>But real-world conditions include:</p><ul><li>network failures</li><li>device limitations</li><li>infrastructure gaps</li></ul><p>This raises a simple question:</p><p>👉 what happens when the network is not available?</p><p>Designing for offline or degraded environments<br>remains an unsolved challenge at scale.</p><h3>Constraint 5 — Interoperability Is Still Incomplete</h3><p>APIs have improved integration.</p><p>But integration is not the same as interoperability.</p><p>Systems still differ in:</p><ul><li>data formats</li><li>protocols</li><li>settlement rules</li><li>compliance requirements</li></ul><p>This creates friction when systems interact.</p><p>👉 standardization is still evolving</p><h3>Where New Systems Fit</h3><p>Emerging approaches attempt to address these constraints.</p><ul><li>real-time payment networks reduce latency</li><li>blockchain systems attempt decentralized trust</li><li>central bank digital currencies (CBDCs) explore direct settlement models</li><li>cross-border payment corridors improve coordination</li></ul><p>Each of these is not a replacement for existing systems.</p><p>They are:</p><p>👉 targeted responses to specific constraints</p><p>And each introduces new trade-offs.</p><h3>Embedded Finance Was Not the End</h3><p>Making payments invisible improved user experience.</p><p>But it did not remove underlying complexity.</p><ul><li>settlement still happens</li><li>reconciliation still exists</li><li>failures still occur</li><li>trust still needs to be established</li></ul><p>The system did not become simpler.</p><p>👉 it became harder to see</p><h3>The Nature of Future Systems</h3><p>Future payment systems will not be defined by:</p><ul><li>a single technology</li><li>a universal protocol</li><li>a perfect solution</li></ul><p>They will be defined by:</p><p>👉 how well they manage constraints</p><ul><li>reducing friction</li><li>improving coordination</li><li>balancing trade-offs</li></ul><h3>Final Observation</h3><p>The future of payments is not about new features.</p><p>It is about the constraints that remain.</p><p>Even as systems evolve, they are still bound by forces<br>that cannot be fully eliminated — only managed.</p><p>Technology is the engine,<br>but constraints are the gravity.</p><p>The faster systems move,<br>the more they feel the pull of the underlying limitations.</p><p><em>What changes is not the existence of constraints — <br>but how systems adapt around them.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58a5eee0dcc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Embedded Finance — When Payment Becomes a Side-Effect]]></title>
            <link>https://lekshmana.medium.com/embedded-finance-when-payment-becomes-a-side-effect-70b8342fb2aa?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/70b8342fb2aa</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[embedded-finance]]></category>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Sat, 25 Apr 2026 11:13:36 GMT</pubDate>
            <atom:updated>2026-04-25T11:13:36.365Z</atom:updated>
            <content:encoded><![CDATA[<p>Post 7 <em>Payments are no longer actions — they are outcomes embedded within workflows, becoming invisible to the user but more complex for the system.</em></p><p><em>In the previous posts, we looked at how payment systems evolved,<br>how real-time flows behave,<br>how they defend against adversarial behavior,<br>how settlement ensures correctness,<br>where systems break across boundaries,<br>and why “exactly once” is a myth.</em></p><p>All of this assumes one thing:</p><p>👉 payment is an explicit action</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pv-s_p4uWAziajgT.png" /><figcaption>Payments Systems — A Field Guide</figcaption></figure><p>A user decides to pay.<br>The system processes that request.</p><p>But modern systems are moving in a different direction.</p><blockquote><em>In many applications today, users don’t “make payments” anymore.<br>They complete actions — and payment happens as part of that flow.</em></blockquote><h3>From Action to Side-Effect</h3><p>Traditionally:</p><ul><li>select item</li><li>go to checkout</li><li>enter details</li><li>confirm payment</li></ul><p>Payment was a <strong>separate step</strong>.</p><p>Now, in many systems:</p><ul><li>book a ride</li><li>order food</li><li>subscribe to a service</li></ul><p>Payment is not a step.</p><p>👉 It is a <strong>side-effect</strong> of the primary action.</p><h3>The Disappearing Boundary</h3><p>Earlier, systems looked like:</p><p>👉 Product → Payment → Confirmation</p><p>Now they look like:</p><p>👉 Product Flow (with payment embedded inside)</p><p>There is no clear boundary between:</p><ul><li>business logic</li><li>payment execution</li></ul><p>The system becomes:</p><p>👉 a unified workflow</p><h3>What This Changes</h3><p>When payment becomes a side-effect,<br>several assumptions break.</p><h3>1. Timing Becomes Implicit</h3><ul><li>When exactly is the user charged?</li><li>At request time?</li><li>At completion?</li><li>On delivery?</li></ul><p>Payment is no longer tied to a single moment.</p><h3>2. Failure Becomes Harder to Explain</h3><p>In explicit payments:</p><p>👉 failure is obvious</p><p>In embedded flows:</p><ul><li>ride completed but payment failed</li><li>order placed but charge delayed</li></ul><p>Now the system must handle:</p><p>👉 <strong>decoupled outcomes</strong></p><h3>3. Reversals Become Product Logic</h3><p>Earlier:</p><ul><li>reversal = payment system concern</li></ul><p>Now:</p><ul><li>refund tied to cancellation</li><li>partial refunds tied to service quality</li></ul><p>👉 Payment logic becomes part of product behavior</p><h3>4. User Awareness Reduces</h3><p>When users don’t explicitly “pay”:</p><ul><li>they may not notice charges immediately</li><li>disputes increase</li><li>trust shifts from transaction to platform</li></ul><h3>The System Impact</h3><p>Embedding payments increases coupling.</p><p>Payment systems are no longer:</p><ul><li>independent services</li></ul><p>They become:</p><p>👉 deeply integrated into application workflows</p><p>This creates new dependencies:</p><ul><li>order state ↔ payment state</li><li>delivery status ↔ settlement</li><li>subscription lifecycle ↔ billing</li></ul><h3>New Failure Modes</h3><p>When systems are tightly coupled:</p><ul><li>duplicate actions can trigger duplicate charges</li><li>retries can misalign with business state</li><li>partial completion creates inconsistent outcomes</li></ul><p>This brings back earlier principles:</p><p>👉 idempotency<br>👉 reconciliation<br>👉 eventual correctness</p><p>But now applied across:</p><p>👉 <strong>product + payment together</strong></p><h3>Risk Evolves</h3><p>Fraud detection also changes.</p><p>Instead of evaluating:</p><ul><li>a single transaction</li></ul><p>Systems evaluate:</p><ul><li>user behavior across flows</li><li>contextual signals (location, usage patterns)</li></ul><p>👉 risk becomes <strong>contextual, not transactional</strong></p><h3>Observability Gets Harder</h3><p>In explicit payments:</p><ul><li>trace starts → ends</li></ul><p>In embedded systems:</p><ul><li>payment is one part of a longer workflow</li></ul><p>To debug issues, systems must trace:</p><p>👉 across multiple domains</p><ul><li>user action</li><li>business process</li><li>payment execution</li></ul><h3>The Trade-Off</h3><p>Embedding payments improves:</p><ul><li>user experience</li><li>conversion rates</li><li>speed of interaction</li></ul><p>But increases:</p><ul><li>system complexity</li><li>coupling</li><li>debugging difficulty</li></ul><h3>Final Observation</h3><p>Payments did not become simpler.</p><p>They became invisible.</p><p>What used to be a clearly defined action<br>is now woven into every interaction.</p><p>The system shifts from:</p><ul><li>processing payments<br>to</li><li>enabling outcomes</li></ul><p>In its final form, a payment system becomes like air — <br>everywhere, essential,<br>and almost invisible until something goes wrong.</p><p>We often teach that if you want something, you pay for it.</p><p>But modern systems have changed that interaction.</p><p>The payment is no longer visible — <br>it is embedded behind the action.</p><p>As engineers, the challenge is not just to make it simple — <br>but to ensure that simplicity does not hide underlying complexity.</p><p><em>Where payment is no longer the event — <br>but the consequence.</em></p><p><em>Next Post 8 The Future of Payments — What Constraints Still Remain</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70b8342fb2aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Payment Systems — Why “Exactly Once” Is a Myth]]></title>
            <link>https://lekshmana.medium.com/payment-systems-why-exactly-once-is-a-myth-b278f99a09b6?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/b278f99a09b6</guid>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 04:30:13 GMT</pubDate>
            <atom:updated>2026-04-24T04:30:13.487Z</atom:updated>
            <content:encoded><![CDATA[<p>Post 6 <em>In distributed systems, perfect execution is impossible — payment systems achieve correctness by designing for duplication and recovery.</em></p><p><em>In the previous posts, we looked at how payment systems evolved,<br>how real-time flows behave,<br>how they defend against adversarial behaviour,<br>how settlement ensures correctness,<br>and where systems break across boundaries.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bTME6up2mKByCuqB.png" /><figcaption>Payments Systems — A Field Guide</figcaption></figure><p>Across all of these, one pattern keeps appearing:</p><ul><li>retries</li><li>reversals</li><li>reconciliation</li><li>eventual consistency</li></ul><p>This leads to an uncomfortable truth.</p><blockquote><em>Modern distributed systems often aim for “exactly once” processing.<br>Payment systems take a different approach — <br>they assume duplication, uncertainty, and partial execution as normal conditions.</em></blockquote><h3>The Intuition — “It Should Happen Once”</h3><p>From a user’s perspective, a payment is simple:</p><ul><li>press pay</li><li>money moves</li><li>done</li></ul><p>Naturally, we expect:</p><p>👉 the transaction should happen exactly once</p><h3>Where This Breaks</h3><p>In distributed environments, systems do not operate with perfect knowledge.</p><p>Failures happen at every step:</p><ul><li>network timeouts</li><li>partial responses</li><li>retries from clients</li><li>duplicate message delivery</li></ul><p>Consider a simple scenario:</p><ul><li>request sent</li><li>sender times out</li><li>retries</li><li>original request actually succeeded</li></ul><p>Now the system sees:</p><p>👉 the same transaction more than once</p><h3>The Impossible Guarantee</h3><p>To achieve true “exactly once”, a system would need:</p><ul><li>perfect network reliability</li><li>synchronized state across all participants</li><li>no retries or duplicates</li><li>atomic execution across boundaries</li></ul><p>In real systems:</p><p>👉 none of these conditions hold</p><p>Which makes “exactly once”:</p><p>👉 <strong>not a guarantee — but an illusion</strong></p><p>This limitation is not new.</p><p>In distributed systems, problems like the Two Generals’ Problem show that perfect agreement cannot be guaranteed over an unreliable network.</p><p>Payment systems accept this reality.</p><p>Instead of trying to eliminate uncertainty,<br>they are designed to resolve it over time.</p><h3>What Payment Systems Do Instead</h3><p>Payment systems don’t try to eliminate duplicates.</p><p>They assume:</p><p>👉 duplicates will happen</p><p>And design for:</p><p>👉 <strong>safe handling of duplicates</strong></p><h3>Idempotency — The First Line of Defense</h3><p>Every transaction carries a unique identity.</p><p>In practice, this is implemented using an <strong>idempotency key</strong> — <br>a client-generated identifier attached to each request.</p><p>If the same request is retried:</p><ul><li>it should not create a new effect</li><li>it should return the original result</li></ul><p>This ensures:</p><p>👉 retry ≠ duplicate side effect</p><p>Without this, even a simple network retry<br>can result in multiple debits for the same action.</p><h3>State Before Response</h3><p>One important principle:</p><p>👉 the system commits state before confirming success</p><p>This reduces ambiguity.</p><p>Even if the response is lost:</p><ul><li>the system can reconstruct outcome</li><li>retries can return consistent results</li></ul><h3>The “Unknown State” Problem</h3><p>Despite all safeguards, systems can still enter:</p><p>👉 an unknown state</p><p>Example:</p><ul><li>debit attempted</li><li>response lost</li><li>retry triggered</li></ul><p>Now:</p><ul><li>did the debit happen?</li><li>or not?</li></ul><p>This is the hardest class of problems.</p><h3>Resolving Uncertainty</h3><p>Payment systems handle this through:</p><ul><li>reconciliation</li><li>ledger comparison</li><li>compensating actions (reversals)</li></ul><p>Instead of preventing inconsistency entirely,<br>they ensure:</p><p>👉 <strong>inconsistency is detected and corrected</strong></p><h3>Exactly Once vs Effectively Once</h3><p>The real goal is not:</p><ul><li>“execute once”</li></ul><p>It is:</p><p>👉 <strong>“produce the correct final outcome”</strong></p><p>This leads to a more practical model:</p><ul><li>at-least-once execution</li><li>idempotent handling</li><li>eventual correction</li></ul><p>Together, this behaves as:</p><p>👉 <strong>effectively once</strong></p><h3>Why This Matters</h3><p>This principle explains many things across the system:</p><ul><li>why retries exist</li><li>why reversals happen</li><li>why reconciliation is required</li><li>why settlement is separated</li></ul><p>They are not edge cases.</p><p>They are:</p><p>👉 fundamental design choices</p><h3>Final Observation</h3><p>Payment systems do not guarantee perfect execution.</p><p>They guarantee:</p><ul><li>controlled side effects</li><li>deterministic recovery</li><li>eventual correctness</li></ul><p>What appears as a simple, single action<br>is actually a system designed to:</p><ul><li>tolerate duplication</li><li>survive uncertainty</li><li>and converge to the right outcome over time</li></ul><p>If earlier systems were about moving value,<br>modern payment systems are about navigating uncertainty.</p><p>If we cannot guarantee a straight path,<br>we need a <strong>compass</strong> — <br>mechanisms like idempotency and reconciliation — <br>to ensure we always arrive at the correct outcome.</p><p><em>Where “once” is not enforced — <br>but correctness is ensured.</em></p><p><em>Next Post 7 Embedded Finance — When Payment Becomes a Side-Effect</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b278f99a09b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross-Border Payments — Where Systems Break]]></title>
            <link>https://lekshmana.medium.com/cross-border-payments-where-systems-break-7306a4560ff7?source=rss-fbe58a4ae304------2</link>
            <guid isPermaLink="false">https://medium.com/p/7306a4560ff7</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Lekshmana Perumal]]></dc:creator>
            <pubDate>Wed, 22 Apr 2026 16:15:35 GMT</pubDate>
            <atom:updated>2026-04-22T16:15:35.728Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Post 5</strong> <em>When payments cross boundaries, coordination breaks — and systems rely on fragmented trust, intermediaries, and delayed settlement.</em></p><p><em>In the previous posts, we looked at how payment systems evolved,<br>how real-time flows behave,<br>how they defend against adversarial behaviour,<br>and how settlement ensures correctness over time.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*28gR1xmjtA4g9rPB.png" /><figcaption>Payments Systems — A Field Guide</figcaption></figure><p>All of that works well — within a single system boundary.</p><p>Cross-border payments operate outside that boundary.</p><blockquote><em>While domestic payment systems have moved toward real-time,<br>cross-border payments still operate on slower, fragmented infrastructure — <br>shaped more by coordination and regulation than by pure technology.</em></blockquote><p>A domestic payment system works because:</p><ul><li>participants operate under a shared regulator</li><li>transactions use a single currency</li><li>infrastructure is standardized</li></ul><p>Cross-border payments break all three.</p><h3>No Shared System</h3><p>In domestic systems, coordination is built-in.</p><p>In cross-border flows:</p><ul><li>banks belong to different jurisdictions</li><li>regulations vary</li><li>systems are not directly connected</li></ul><p>There is no single switch, no unified protocol,<br>and no shared source of truth.</p><p>Instead, the system becomes:</p><p>👉 a network of loosely connected financial institutions</p><h3>Messaging Is Not Money Movement</h3><p>A common misconception is that networks like SWIFT move money.</p><p>They don’t.</p><p>They move <strong>messages</strong>.</p><p>A payment message communicates:</p><ul><li>payment instructions</li><li>sender and receiver details</li><li>settlement expectations</li></ul><p>The actual movement of funds happens separately — <br>through correspondent banking relationships.</p><p>This difference is subtle but important.</p><p>Domestic real-time systems feel closer to synchronous communication — <br>with tighter contracts and immediate feedback.</p><p>Cross-border messaging behaves more like asynchronous communication — <br>closer to a “fire-and-forward” model than a guaranteed end-to-end execution.</p><h3>The Correspondent Banking Model</h3><p>Cross-border payments rely on chains of banks.</p><p>A typical flow may involve:</p><ul><li>sending bank</li><li>intermediary bank(s)</li><li>receiving bank</li></ul><p>Each maintains accounts with others:</p><ul><li><strong>nostro accounts</strong> → “our money held with you”</li><li><strong>vostro accounts</strong> → “your money held with us”</li></ul><p>This creates a trust network:</p><p>👉 funds move by updating balances across these relationships</p><h3>Why This Adds Complexity</h3><p>Every additional intermediary introduces:</p><ul><li>latency</li><li>fees</li><li>failure points</li><li>reconciliation overhead</li></ul><p>Unlike domestic systems:</p><p>👉 there is no single coordinated flow</p><p>Instead, the transaction propagates through multiple independent systems.</p><h3>The Hidden Layer — Foreign Exchange (FX)</h3><p>Cross-border payments are not just transfers.</p><p>They are also conversions.</p><p>This introduces:</p><ul><li>exchange rates</li><li>spreads</li><li>timing differences</li></ul><p>A transaction may:</p><ul><li>be initiated in one currency</li><li>settled in another</li><li>converted at an intermediate step</li></ul><p>This adds another dimension:</p><p>👉 value is not just moved — it is transformed</p><h3>Latency and Uncertainty</h3><p>Domestic real-time payments complete in seconds.</p><p>Cross-border payments can take:</p><ul><li>hours</li><li>days</li></ul><p>Status is often unclear during this time.</p><ul><li>message sent ≠ funds received</li><li>intermediate states are opaque</li></ul><p>In many ways, the transaction enters a <strong>black box</strong> — <br>passing through intermediary systems where observability drops significantly<br>until it reappears at the receiving end.</p><p>From a systems perspective:</p><p>👉 visibility is significantly reduced</p><h3>Abstraction Layers — Hiding Complexity</h3><p>Some systems appear to simplify cross-border payments.</p><p>They do this by changing where complexity lives.</p><ul><li><strong>Closed-loop systems</strong> maintain internal ledgers and update balances instantly</li><li><strong>Platform layers</strong> abstract banking infrastructure behind APIs</li></ul><p>In both cases, the underlying challenges — settlement, FX, reconciliation — still exist.</p><p>They are not removed.</p><p>👉 They are shifted away from the user-facing flow.</p><h3>Reconciliation Across Boundaries</h3><p>Reconciliation in domestic systems is already complex.</p><p>In cross-border systems, it becomes harder:</p><ul><li>multiple ledgers</li><li>multiple currencies</li><li>multiple institutions</li></ul><p>Each system maintains its own record.</p><p>Agreement must be reached across:</p><p>👉 independent, asynchronous updates</p><h3>Failure Modes Expand</h3><p>Failures are no longer localized.</p><p>They can occur at:</p><ul><li>intermediary banks</li><li>FX processing</li><li>regulatory checks</li><li>message handling</li></ul><p>And they are harder to detect and resolve.</p><p>A delay in one part of the chain<br>can propagate uncertainty across the entire flow.</p><h3>Why It Still Works This Way</h3><p>This is not just a technical problem.</p><p>It is shaped by:</p><ul><li>regulatory requirements</li><li>liquidity constraints</li><li>trust between institutions</li><li>historical infrastructure</li></ul><p>Improving cross-border payments requires:</p><p>👉 coordination across multiple independent systems<br> — not just better technology</p><h3>New Approaches</h3><p>Several systems attempt to improve this:</p><ul><li>faster payment corridors</li><li>cross-border real-time links</li><li>blockchain-based settlement</li><li>central bank digital currency (CBDC) experiments</li></ul><p>Each tries to reduce:</p><ul><li>intermediaries</li><li>latency</li><li>uncertainty</li></ul><p>But trade-offs remain.</p><h3>Final Observation</h3><p>Cross-border payments expose the limits of otherwise well-designed systems.</p><p>What works efficiently within a controlled environment<br>becomes complex when extended across boundaries.</p><p>The system shifts from:</p><ul><li>coordinated flow<br>to</li><li>negotiated movement of value</li></ul><p>In many ways, cross-border payments act as a <strong>bridge</strong> — <br>connecting independent systems that were never designed to operate as one.</p><p>If domestic payments feel like an internal service call,<br>cross-border payments often resemble a call to an external system<br>with limited visibility, weaker guarantees, and delayed confirmation.</p><p>Where no single system is in control — <br>and correctness depends on coordination across many.</p><p><em>Next Post 6 : Payment Systems — Why “Exactly Once” Is a Myth</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7306a4560ff7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>