<?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 sourav mansingh on Medium]]></title>
        <description><![CDATA[Stories by sourav mansingh on Medium]]></description>
        <link>https://medium.com/@souravsnigdha?source=rss-5ec630449ba0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WU5o2FDOlXIscM0cV_9oNQ@2x.jpeg</url>
            <title>Stories by sourav mansingh on Medium</title>
            <link>https://medium.com/@souravsnigdha?source=rss-5ec630449ba0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:59:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@souravsnigdha/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[Your AI Agent Needs a Memory That Survives Crashes: A Practical Guide to Temporal]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://souravsnigdha.medium.com/your-ai-agent-needs-a-memory-that-survives-crashes-a-practical-guide-to-temporal-0f63e081b346?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1400/1*7howEiPIJIdEwN6Nl34qtw.png" width="1400"></a></p><p class="medium-feed-snippet">What Temporal is, why it exists, and where it fits in real Applied AI systems</p><p class="medium-feed-link"><a href="https://souravsnigdha.medium.com/your-ai-agent-needs-a-memory-that-survives-crashes-a-practical-guide-to-temporal-0f63e081b346?source=rss-5ec630449ba0------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://souravsnigdha.medium.com/your-ai-agent-needs-a-memory-that-survives-crashes-a-practical-guide-to-temporal-0f63e081b346?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f63e081b346</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[applied-ai]]></category>
            <category><![CDATA[agentic-workflow]]></category>
            <category><![CDATA[temporal]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 20:16:56 GMT</pubDate>
            <atom:updated>2026-10-16T20:16:56.091Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Coinbase’s Zero-Tolerance Approach In Building Payment Systems]]></title>
            <link>https://medium.com/codex/coinbases-zero-tolerance-approach-in-building-payment-systems-f3fc7e909f2f?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3fc7e909f2f</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[system-design-interview]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Thu, 23 Apr 2026 08:14:53 GMT</pubDate>
            <atom:updated>2026-04-23T13:37:02.427Z</atom:updated>
            <content:encoded><![CDATA[<h3>Coinbase’s Zero-Tolerance Approach In Their Payment System</h3><p>Building Payment Systems Where Errors Simply Aren’t Acceptable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*719grG3xnYDCDbcMCujfTQ.png" /></figure><p>On a typical day, Coinbase processes millions of transactions as users move money between traditional finance and the crypto economy. The platform supports over 10 different payment methods across more than 30 countries. Users deposit funds via bank transfers, credit cards, and debit cards. They withdraw to external wallets and bank accounts.</p><p>In this complex, high-velocity environment, Coinbase’s engineering team operates under a philosophy that shapes every architectural decision:</p><blockquote>“Payments are one of the areas that have zero tolerance for any errors.”</blockquote><p>This isn’t marketing speak. It’s an operational reality. A single payment bug doesn’t just create a bad user experience — it triggers a cascade of consequences that can take weeks to remediate.</p><h3>A Note on This Article</h3><p>In their engineering blog “<a href="https://medium.com/the-coinbase-blog/how-we-build-payments-systems-at-coinbase-e99ba0eee7f3">How we build payments systems at Coinbase</a>,” the team shares their <strong>philosophical approach and high-level principles</strong> for building zero-tolerance payment systems. However, they don’t provide detailed implementation specifics, architecture diagrams, or code examples.</p><p><strong>What follows in this article is my interpretation and implementation</strong> of how to build such a system, based on:</p><ul><li><strong>Coinbase’s stated principles</strong> from their engineering blog</li><li><strong>My understanding of distributed systems</strong> components and patterns</li><li><strong>Industry best practices</strong> from studying payment systems at Stripe, Square, PayPal, and other fintech companies</li><li><strong>Standard solutions</strong> to the problems Coinbase describes</li></ul><p><strong>The architecture diagrams, UML models, pseudocode, and implementation details are my own work</strong> — representing how I would build a zero-tolerance payment system applying the principles Coinbase describes. Coinbase’s actual internal implementation may differ significantly from what is presented here.</p><p>This article aims to transform Coinbase’s high-level philosophy into <strong>actionable, educational implementations</strong> that you can understand and adapt for your own systems.</p><p><em>I am not affiliated with Coinbase. All interpretations are my own based on publicly available material.</em></p><h4>Consider what happens when a payment error occurs:</h4><blockquote><strong>Immediate Impact:<br>- </strong>User’s money is in an incorrect state<br>- Account balances don’t match reality<br>- Transaction history shows wrong information</blockquote><blockquote><strong>Remediation Complexity:<br>- </strong>Manual investigation to trace what happened<br>- Financial reconciliation across multiple systems<br>- Legal and compliance review<br>- Customer support handling angry users who can’t access funds</blockquote><p>As Coinbase’s engineering team notes: <strong>“The process to remediate such mistakes is time consuming, and usually is complicated due to various legal and compliance constraints.”</strong></p><p>A payment bug that takes 5 minutes to fix in code might take 5 weeks to fully remediate in production.</p><h3>The Foundation: Layered Redundancy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lk_AKEYpeQXVsI7PPP2W4w.jpeg" /></figure><p>Most engineering teams think about redundancy at the infrastructure layer: multiple servers, multiple availability zones, maybe multiple regions. Coinbase takes redundancy much further.</p><h4><strong>Redundancy at Every Layer</strong></h4><p>Coinbase’s payment infrastructure implements redundancy throughout the entire stack:</p><ul><li><strong>Payment Method Redundancy:</strong> 10+ different payment methods (ACH, wire transfer, credit card, debit card, PayPal, etc.)</li><li><strong>Data Storage Redundancy:</strong> Multiple storage layers with different consistency guarantees</li><li><strong>Processing Path Redundancy:</strong> Alternative routing when primary paths fail</li><li><strong>Validation Redundancy:</strong> Multiple checks at different stages of payment flow</li></ul><blockquote>“We try to add as much redundancy as possible by duplication of critical components to increase reliability of our systems.”</blockquote><h4>📍 Real-World Example: Payment Method Outage</h4><p>In 2022, several fintech companies experienced outages when a major payment processor had technical issues. Companies that relied on a single payment processor had to suspend all deposit functionality.</p><p>Coinbase’s multi-method redundancy meant users could switch from the affected payment method to alternatives like ACH transfers or wire transfers. The user experience was degraded (fewer convenient options), but critical functionality — moving money in and out of the platform — remained available.</p><h3>The Dual Data Strategy: Speed vs. Recoverability</h3><h4>The Fundamental Tension</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYSFC_qI12bLF2vmfvtMxQ.png" /></figure><h4><strong>Coinbase’s Solution: Dual Data Layers</strong></h4><pre>┌─────────────────────────────────────────────────────────────────────────┐<br>│                           Client Application                            │<br>└───────────────────────────────┬─────────────────────────────────────────┘<br>                                │<br>                                │ API Request<br>                                │ (userID, operation, consistency)<br>                                ▼<br>┌─────────────────────────────────────────────────────────────────────────┐<br>│                          BalanceManager                                 │<br>├─────────────────────────────────────────────────────────────────────────┤<br>│ - cache: Cache                                                           │<br>│ - database: Database                                                     │<br>│ - cacheTTL: Duration = 5s                                               │<br>│ - maxStaleness: Duration = 10s                                          │<br>├─────────────────────────────────────────────────────────────────────────┤<br>│ + GetBalance(userID, consistency): float64                              │<br>│ + DeductBalance(userID, amount): float64                                │<br>│ - fetchFromDB(userID): float64                                          │<br>│ - getFromCache(userID): CachedBalance                                   │<br>└───────────┬───────────────────────────────────┬─────────────────────────┘<br>            │                                   │<br>            │                                   │<br>            │ (Fast Path)                       │ (Slow Path / Source of Truth)<br>            │                                   │<br>            ▼                                   ▼<br>┌─────────────────────────────┐   ┌─────────────────────────────────────┐<br>│      Cache Layer            │   │      Persistent Layer                │<br>│      (Speed)                │   │      (Truth)                         │<br>├─────────────────────────────┤   ├─────────────────────────────────────┤<br>│ Type: Redis / In-Memory     │   │ Type: PostgreSQL / Database          │<br>│ Response Time: &lt;100ms       │   │ Response Time: 50-200ms              │<br>│ Consistency: Eventual       │   │ Consistency: Strong                  │<br>│ Durability: None            │   │ Durability: ACID                     │<br>├─────────────────────────────┤   ├─────────────────────────────────────┤<br>│ + Get(key): Value           │   │ + GetBalance(userID): float64        │<br>│ + Set(key, value, TTL)      │   │ + SetBalance(userID, amount)         │<br>│ + Delete(key)               │   │ + AcquireLock(key): Lock             │<br>│ + GetAge(key): Duration     │   │ + BeginTransaction(): Transaction    │<br>└─────────────────────────────┘   └─────────────────────────────────────┘<br>            │                                   │<br>            │                                   │<br>            └──────────┬────────────────────────┘<br>                       │<br>                       │ Synchronization / Validation<br>                       ▼<br>┌─────────────────────────────────────────────────────────────────────────┐<br>│                    ReconciliationService                                 │<br>├─────────────────────────────────────────────────────────────────────────┤<br>│ - cache: Cache                                                           │<br>│ - database: Database                                                     │<br>│ - auditLog: AuditLogger                                                  │<br>│ - alertService: AlertService                                             │<br>├─────────────────────────────────────────────────────────────────────────┤<br>│ + ReconcileUserBalance(userID): Status                                  │<br>│ + RunContinuousReconciliation(): Stats                                  │<br>│ + StartReconciliationWorker()                                           │<br>└─────────────────────────────────────────────────────────────────────────┘<br><br><br>┌─────────────────────────────────────────────────────────────────────────┐<br>│                        Data Structures                                   │<br>└─────────────────────────────────────────────────────────────────────────┘<br><br>┌─────────────────────────────┐<br>│   &lt;&lt;enumeration&gt;&gt;           │<br>│   ConsistencyLevel          │<br>├─────────────────────────────┤<br>│ EVENTUAL                    │<br>│ STRONG                      │<br>│ BOUNDED                     │<br>└─────────────────────────────┘<br><br>┌─────────────────────────────┐<br>│   CachedBalance             │<br>├─────────────────────────────┤<br>│ - balance: float64          │<br>│ - timestamp: Time           │<br>└─────────────────────────────┘<br><br>┌─────────────────────────────┐<br>│   Discrepancy               │<br>├─────────────────────────────┤<br>│ - userID: string            │<br>│ - cachedBalance: float64    │<br>│ - actualBalance: float64    │<br>│ - difference: float64       │<br>│ - cacheAge: Duration        │<br>│ - timestamp: Time           │<br>└─────────────────────────────┘</pre><p><strong>1. Cached Data Layer (Speed)</strong></p><ul><li>In-memory or fast-storage caching</li><li>Optimized for read performance</li><li>Powers user-facing APIs</li><li>Provides sub-100ms response times</li></ul><p><strong>2. Persistent Data Layer (Truth)</strong></p><ul><li>Durable storage with ACID guarantees</li><li>Source of truth for all financial state</li><li>Powers audit trails and reconciliation</li><li>Slower but guaranteed correct</li></ul><h4>Handling Disagreements</h4><p>Running dual data layers creates a problem: <strong>what happens when they disagree?</strong></p><h4>Source of Truth Rules:</h4><ul><li><strong>For reads:</strong> Persistent store is always truth. If cache disagrees, invalidate cache.</li><li><strong>For writes:</strong> Transaction isn’t complete until persistence confirms.</li><li><strong>For balance checks:</strong> Persistent store is authoritative, but cache can serve reads with staleness bounds.</li></ul><blockquote>“Payments always use both cached data for speed and persistent data for recoverability. Whenever there is caching, then it is important to have the right strategy to guide as to when to write to which data layer.”</blockquote><h3>Audit Trails: The Reliable Record</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rw_xzIocGnr2lCtSribp2g.jpeg" /></figure><p>The engineering team emphasizes:</p><blockquote>“Another key to capturing data properly is to keep a reliable record such that we can always trace what exactly happened.”</blockquote><h4><strong>Why Comprehensive Logging Matters</strong></h4><ul><li><strong>Financial Auditing:</strong> Regulators require complete transaction histories</li><li><strong>Regulatory Compliance:</strong> Suspicious activity reporting requires complete context</li><li><strong>Issue Investigation:</strong> When bugs occur, engineers need detailed traces</li><li><strong>Dispute Resolution:</strong> Users dispute transactions regularly</li></ul><h4>What Gets Recorded</h4><pre>// Transaction Context<br>{<br>  &quot;transaction_id&quot;: &quot;txn_abc123&quot;,<br>  &quot;timestamp_ns&quot;: 1697385825123456789,<br>  &quot;user_id&quot;: &quot;user_456&quot;,<br>  &quot;amount&quot;: 5000.00,<br>  &quot;currency&quot;: &quot;USD&quot;,<br>  &quot;payment_method&quot;: &quot;ACH&quot;,<br>  &quot;source_account&quot;: &quot;****1234&quot;<br>}<br><br>// Processing Details<br>{<br>  &quot;processing_systems&quot;: [&quot;api&quot;, &quot;processor&quot;, &quot;ledger&quot;],<br>  &quot;validation_checks&quot;: {<br>    &quot;kyc&quot;: &quot;passed&quot;,<br>    &quot;daily_limit&quot;: &quot;passed&quot;,<br>    &quot;fraud_score&quot;: 0.12<br>  },<br>  &quot;processing_time_ms&quot;: 187,<br>  &quot;final_decision&quot;: &quot;approved&quot;<br>}</pre><h3>Correctness Over Speed: The Hard Choices</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m0nwsMd29gO8YvDYaCB-xw.jpeg" /></figure><p>Coinbase’s zero-tolerance philosophy creates difficult trade-offs. When correctness conflicts with performance, Coinbase consistently chooses correctness.</p><p>A user initiates a $1,000 purchase. The cache shows sufficient balance. But the persistent database is temporarily unreachable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fS2tE_SkYu_nVM6YXyj7nQ.png" /></figure><p>Coinbase chooses Option B</p><p><strong>The Performance Cost</strong><br>Latency increases:<br>- Persistence verification : +50–200ms<br>- Distributed locking: +10–50ms<br>- Transaction coordination: +20–100ms</p><p><strong>Why Coinbase accepts these costs</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTOPRm-G5NMa35NrQA5KkQ.png" /></figure><blockquote>“Any payment bugs that are related to correctness would cause an unacceptable customer experience. When an error occurs it needs to be corrected immediately.”</blockquote><h3>Building for Recovery</h3><p>Despite all precautions, failures still occur. The key is making recovery deterministic and complete.</p><p><strong>Write-Ahead Logging (WAL)</strong></p><pre># 1. Write intended operation to durable log<br>wal.write({<br>    &#39;operation&#39;: &#39;payment&#39;,<br>    &#39;transaction_id&#39;: txn_id,<br>    &#39;amount&#39;: amount,<br>    &#39;user_id&#39;: user_id<br>})<br><br># 2. ONLY AFTER log write succeeds:<br>execute_payment(amount, user_id)<br><br># 3. Mark as complete<br>wal.mark_complete(txn_id)</pre><p>If the system crashes during step 2, recovery simply replays the log.</p><p><strong>Idempotent Operations</strong></p><pre>// Basic pseudocode without covering any edge cases.<br><br>function ProcessPayment(transactionID, amount, userID):<br>    // Check if already processed<br>    if TransactionExists(transactionID):<br>        return GetTransactionResult(transactionID)<br>    <br>    // Process only if not already done<br>    result = ExecutePayment(amount, userID)<br>    RecordTransaction(transactionID, result)<br>    <br>    return result</pre><h3>Key Takeaways: When to Choose Zero-Tolerance</h3><h4>Choose Zero-Tolerance When:</h4><ol><li><strong>Errors Are Expensive to Fix</strong> — Manual investigation, legal review, customer compensation</li><li><strong>Correctness Is Legally Required</strong> — Regulatory violations, compliance failures</li><li><strong>Trust Is Your Product</strong> — Users trust you with their money, data, or safety</li></ol><h4>Don’t Choose Zero-Tolerance When:</h4><ol><li><strong>Best Effort Is Acceptable</strong> — Social media posts, content recommendations</li><li><strong>Speed Is Critical</strong> — Real-time gaming, live streaming</li><li><strong>Data Is Easily Reconstructible</strong> — Can ask user to re-enter</li></ol><h3>Practical Implementation Guide</h3><p><strong>Step 1: Implement Comprehensive Audit Logging<br></strong>Every payment operation should be traceable. Before optimizing for performance or building complex features, establish a complete audit trail.</p><p><strong>The Pattern:<br></strong>Audit logs should answer: “What happened, when, why, and what was the outcome?”</p><pre>function ProcessPayment(userID, amount, metadata):<br>    correlationID = generateUUID()<br>    <br>    // Capture state BEFORE operation<br>    auditLog.record({<br>        event: &quot;payment_initiated&quot;,<br>        correlationID: correlationID,<br>        timestamp: currentTime(),<br>        userID: userID,<br>        amount: amount,<br>        balanceBefore: getBalance(userID),<br>        metadata: metadata<br>    })<br>    <br>    try:<br>        result = executePayment(userID, amount)<br>        <br>        // Record success<br>        auditLog.record({<br>            event: &quot;payment_completed&quot;,<br>            correlationID: correlationID,<br>            timestamp: currentTime(),<br>            balanceAfter: getBalance(userID),<br>            transactionID: result.id<br>        })<br>        <br>        return result<br>        <br>    catch error:<br>        // Record failure with full context<br>        auditLog.record({<br>            event: &quot;payment_failed&quot;,<br>            correlationID: correlationID,<br>            timestamp: currentTime(),<br>            errorType: error.type,<br>            errorMessage: error.message<br>        })<br>        <br>        throw error</pre><p><strong>Key Principles:<br>- Correlation ID</strong> (UUID) links all events for a single payment<br>- <strong>Nanosecond timestamps</strong> for precise event ordering<br>- <strong>Before &amp; After state</strong> enables reconstruction<br>- <strong>Record failures</strong> as thoroughly as successes<br>- <strong>Structured logging</strong> with JSON for easy querying</p><p><strong>Step 2: Add Explicit Timeouts Everywhere<br></strong>Never rely on framework defaults. Every external call must have an explicit timeout.<br><strong>The Pattern: </strong>Different operations need different timeouts based on user expectations.</p><pre>timeoutConfig = {<br>    &quot;balance_check&quot;: 2 seconds,     // User waiting<br>    &quot;payment_auth&quot;: 5 seconds,      // Critical operation<br>    &quot;refund&quot;: 10 seconds,           // Background job<br>    &quot;webhook&quot;: 3 seconds            // Don&#39;t block on webhooks<br>}<br><br>function CallPaymentProcessor(operation, data):<br>    timeout = timeoutConfig[operation] || 5 seconds<br>    <br>    try:<br>        result = httpPost(processorURL, data, timeout: timeout)<br>        return result<br>        <br>    catch TimeoutError:<br>        auditLog.record({<br>            event: &quot;external_timeout&quot;,<br>            operation: operation,<br>            timeout: timeout<br>        })<br>        <br>        throw PaymentTimeoutError(operation, timeout)</pre><p><strong>Key Principles:<br>- </strong>Operation-specific timeouts<br>- Fail fast (don’t wait 60 seconds)<br>- Audit all timeout failures<br>- User-facing operations: 1–5 seconds<br>- Background jobs: 10–30 seconds</p><p><strong>Step 3: Make All Operations Idempotent<br></strong>Network failures cause retries. Operations must be safe to execute multiple times.<br><strong>The Pattern:</strong>Use idempotency keys to ensure operations execute exactly once.</p><pre>idempotencyStore = new KeyValueStore()<br><br>function ProcessPaymentIdempotent(idempotencyKey, userID, amount):<br>    // Check if we&#39;ve seen this request before<br>    if idempotencyStore.exists(idempotencyKey):<br>        cachedResult = idempotencyStore.get(idempotencyKey)<br>        <br>        auditLog.record({<br>            event: &quot;idempotent_replay&quot;,<br>            idempotencyKey: idempotencyKey,<br>            originalTimestamp: cachedResult.timestamp<br>        })<br>        <br>        return cachedResult.response<br>    <br>    // First time - process it<br>    balance = getBalance(userID)<br>    <br>    if balance &gt;= amount:<br>        deductBalance(userID, amount)<br>        response = {status: &quot;success&quot;, newBalance: balance - amount}<br>    else:<br>        response = {status: &quot;insufficient_funds&quot;}<br>    <br>    // Cache result for 24 hours<br>    idempotencyStore.set(idempotencyKey, {<br>        response: response,<br>        timestamp: currentTime(),<br>        ttl: 24 hours<br>    })<br>    <br>    return response</pre><p>Client Usage:</p><pre>// Generate key once<br>idempotencyKey = &quot;payment_&quot; + userID + &quot;_&quot; + generateUUID()<br><br>// First attempt<br>response = ProcessPaymentIdempotent(idempotencyKey, userID, 100)<br><br>// Network error - retry with SAME key<br>response = ProcessPaymentIdempotent(idempotencyKey, userID, 100)<br><br>// Result: Charged exactly once, regardless of retries</pre><p><strong>Key Principles:<br>- </strong>Client-generated keys<br>- Store complete results (not just “processed” flag)<br>- TTL-based expiration (24 hours)<br>- Safe to retry unlimited times</p><p><strong>Step 4: Implement Dual Data Strategy<br></strong>Balance speed (cache) with correctness (persistent storage).<br><strong>The Pattern: </strong>Use cache for performance, verify against database for financial operations.</p><pre>function GetBalance(userID, consistencyLevel):<br>    if consistencyLevel == &quot;strong&quot;:<br>        // Critical - always fetch from DB<br>        return database.getBalance(userID)<br>    <br>    // Try cache first<br>    cached = cache.get(&quot;balance:&quot; + userID)<br>    <br>    if cached != null:<br>        cacheAge = currentTime() - cached.timestamp<br>        <br>        if consistencyLevel == &quot;eventual&quot; AND cacheAge &lt; 5 seconds:<br>            return cached.balance<br>        <br>        if consistencyLevel == &quot;bounded&quot; AND cacheAge &lt; 10 seconds:<br>            return cached.balance<br>    <br>    // Cache miss or too stale - fetch from DB<br>    actualBalance = database.getBalance(userID)<br>    <br>    cache.set(&quot;balance:&quot; + userID, {<br>        balance: actualBalance,<br>        timestamp: currentTime(),<br>        ttl: 5 seconds<br>    })<br>    <br>    return actualBalance<br><br><br>function DeductBalance(userID, amount):<br>    // Financial writes ALWAYS use strong consistency<br>    lock = acquireLock(&quot;balance:&quot; + userID)<br>    <br>    try:<br>        balance = database.getBalance(userID)<br>        <br>        if balance &lt; amount:<br>            throw InsufficientFundsError()<br>        <br>        database.setBalance(userID, balance - amount)<br>        <br>        // Invalidate cache (don&#39;t update - prevent races)<br>        cache.delete(&quot;balance:&quot; + userID)<br>        <br>        return balance - amount<br>        <br>    finally:<br>        lock.release()</pre><p>Consistency Strategy:</p><pre>operations = {<br>    &quot;display_balance&quot;: &quot;eventual&quot;,      // Speed matters<br>    &quot;pre_payment_check&quot;: &quot;strong&quot;,      // Need accuracy<br>    &quot;deduct_balance&quot;: &quot;strong&quot;,         // Financial operation<br>    &quot;transaction_history&quot;: &quot;bounded&quot;    // Some staleness OK<br>}</pre><p><strong>Step 5: Add Continuous Reconciliation<br></strong>Cache and persistence will diverge. Detect and fix automatically.<br><strong>The Pattern:</strong>Background jobs continuously verify cache matches database.</p><pre>function ReconcileUserBalance(userID):<br>    cached = cache.get(&quot;balance:&quot; + userID)<br>    actual = database.getBalance(userID)<br>    <br>    if cached == null:<br>        return &quot;cache_miss&quot;<br>    <br>    if cached.balance == actual:<br>        return &quot;match&quot;<br>    <br>    // Mismatch detected!<br>    discrepancy = {<br>        userID: userID,<br>        cached: cached.balance,<br>        actual: actual,<br>        difference: actual - cached.balance,<br>        cacheAge: currentTime() - cached.timestamp<br>    }<br>    <br>    auditLog.record({<br>        event: &quot;balance_mismatch&quot;,<br>        ...discrepancy<br>    })<br>    <br>    // Fix cache<br>    cache.delete(&quot;balance:&quot; + userID)<br>    <br>    // Alert if significant (&gt; $0.01)<br>    if abs(discrepancy.difference) &gt; 0.01:<br>        sendAlert(&quot;Balance mismatch&quot;, discrepancy)<br>    <br>    return &quot;mismatch_fixed&quot;<br><br><br>function RunContinuousReconciliation():<br>    activeUsers = database.getActiveUsers(last24Hours)<br>    <br>    stats = {matches: 0, mismatches: 0, total: 0}<br>    <br>    for each userID in activeUsers:<br>        result = ReconcileUserBalance(userID)<br>        stats.total++<br>        <br>        if result == &quot;match&quot;:<br>            stats.matches++<br>        else if result == &quot;mismatch_fixed&quot;:<br>            stats.mismatches++<br>    <br>    // Alert if mismatch rate &gt; 1%<br>    mismatchRate = stats.mismatches / stats.total<br>    if mismatchRate &gt; 0.01:<br>        sendAlert(&quot;High mismatch rate: &quot; + mismatchRate)<br>    <br>    return stats<br><br><br>// Run every 5 minutes as background job<br>schedule.every(5 minutes):<br>    RunContinuousReconciliation()</pre><p><strong>Step 6: Implement Distributed Locking<br></strong>Prevent race conditions when multiple processes access same balance.<br><strong>The Pattern:</strong>Use distributed locks to ensure only one operation modifies a balance at a time.</p><pre>function AcquireLock(lockKey, timeout):<br>    lockID = generateUUID()<br>    <br>    // Try to set lock (only if doesn&#39;t exist)<br>    acquired = redis.setNX(lockKey, lockID, timeout)<br>    <br>    if not acquired:<br>        throw LockNotAcquiredError()<br>    <br>    // Return unlock function<br>    return function unlock():<br>        // Only delete if we still own the lock (atomic)<br>        script = &quot;&quot;&quot;<br>            if redis.get(lockKey) == lockID then<br>                return redis.delete(lockKey)<br>            end<br>        &quot;&quot;&quot;<br>        redis.eval(script)<br><br><br>function Withdraw(userID, amount):<br>    lock = AcquireLock(&quot;balance_lock:&quot; + userID, 10 seconds)<br>    <br>    try:<br>        // Only one process can execute this at a time<br>        balance = database.getBalance(userID)<br>        <br>        if balance &lt; amount:<br>            throw InsufficientFundsError()<br>        <br>        database.setBalance(userID, balance - amount)<br>        cache.delete(&quot;balance:&quot; + userID)<br>        <br>        return balance - amount<br>        <br>    finally:<br>        lock.unlock()</pre><p><strong>Race Condition Prevention:</strong></p><pre>// WITHOUT locking (RACE CONDITION):<br>Thread 1: balance = get(user)  // $100<br>Thread 2: balance = get(user)  // $100 (stale!)<br>Thread 1: set(user, $100 - $80 = $20)<br>Thread 2: set(user, $100 - $60 = $40)<br>// Result: $40 balance, but withdrew $140 ❌<br><br>// WITH locking (SAFE):<br>Thread 1: lock → get($100) → set($20) → unlock<br>Thread 2: wait for lock → get($20) → insufficient funds<br>// Result: $20 balance, correctly prevented overdraft ✅</pre><p><strong>Step 7: Add Transaction Semantics<br></strong>Ensure all-or-nothing execution for multi-step operations.<br><strong>The Pattern:</strong>Use database transactions for atomicity.</p><pre>function Transfer(fromUser, toUser, amount):<br>    transaction = database.beginTransaction()<br>    <br>    try:<br>        // Step 1: Lock and get sender balance<br>        senderBalance = transaction.query(<br>            &quot;SELECT balance FROM balances WHERE user_id = ? FOR UPDATE&quot;,<br>            fromUser<br>        )<br>        <br>        // Step 2: Verify funds<br>        if senderBalance &lt; amount:<br>            throw InsufficientFundsError()<br>        <br>        // Step 3: Deduct from sender<br>        transaction.execute(<br>            &quot;UPDATE balances SET balance = ? WHERE user_id = ?&quot;,<br>            senderBalance - amount, fromUser<br>        )<br>        <br>        // Step 4: Get receiver balance<br>        receiverBalance = transaction.query(<br>            &quot;SELECT balance FROM balances WHERE user_id = ? FOR UPDATE&quot;,<br>            toUser<br>        )<br>        <br>        // Step 5: Credit receiver<br>        transaction.execute(<br>            &quot;UPDATE balances SET balance = ? WHERE user_id = ?&quot;,<br>            receiverBalance + amount, toUser<br>        )<br>        <br>        // Step 6: Record audit log (within transaction)<br>        transaction.execute(<br>            &quot;INSERT INTO audit_log VALUES (?)&quot;,<br>            {event: &quot;transfer&quot;, from: fromUser, to: toUser, amount: amount}<br>        )<br>        <br>        // All succeeded - commit<br>        transaction.commit()<br>        <br>        // Invalidate caches<br>        cache.delete(&quot;balance:&quot; + fromUser)<br>        cache.delete(&quot;balance:&quot; + toUser)<br>        <br>    catch error:<br>        // Any error - rollback everything<br>        transaction.rollback()<br>        throw error</pre><p><strong>ACID Guarantees:</strong></p><ul><li><strong>Atomicity:</strong> All steps succeed or all fail</li><li><strong>Consistency:</strong> Total money in system unchanged</li><li><strong>Isolation:</strong> Concurrent transfers don’t interfere (FOR UPDATE locks)</li><li><strong>Durability:</strong> Committed transfers survive crashes</li></ul><p><strong>Step 8: Implement Write-Ahead Logging</strong></p><p>Record intentions before executing for crash recovery.<br><strong>The Pattern:</strong>Write what you’re about to do before doing it.</p><pre>function WriteOperation(operation, data):<br>    opID = generateUUID()<br>    <br>    walEntry = {<br>        opID: opID,<br>        operation: operation,<br>        data: data,<br>        timestamp: currentTime(),<br>        status: &quot;pending&quot;<br>    }<br>    <br>    // Write to durable log (force to disk)<br>    appendToFile(walFile, walEntry)<br>    syncToDisk()<br>    <br>    return opID<br><br><br>function MarkCompleted(opID):<br>    completionEntry = {<br>        opID: opID,<br>        status: &quot;completed&quot;,<br>        timestamp: currentTime()<br>    }<br>    <br>    appendToFile(walFile, completionEntry)<br>    syncToDisk()<br><br><br>function ProcessPaymentWithWAL(userID, amount):<br>    // Step 1: Write intention<br>    opID = WriteOperation(&quot;payment&quot;, {<br>        userID: userID,<br>        amount: amount,<br>        idempotencyKey: generateUUID()<br>    })<br>    <br>    // Step 2: Execute<br>    try:<br>        executePayment(userID, amount)<br>        <br>        // Step 3: Mark complete<br>        MarkCompleted(opID)<br>        <br>    catch error:<br>        // Failed but WAL has record<br>        // Recovery will handle it<br>        throw error<br><br><br>function RecoverFromCrash():<br>    incomplete = getIncompleteOperations()<br>    <br>    for each operation in incomplete:<br>        idempotencyKey = operation.data.idempotencyKey<br>        <br>        // Check if actually completed<br>        if not wasPaymentCompleted(idempotencyKey):<br>            // Replay operation (idempotency ensures safety)<br>            executePayment(operation.data.userID, operation.data.amount)<br>        <br>        // Mark as completed<br>        MarkCompleted(operation.opID)<br><br><br>function GetIncompleteOperations():<br>    operations = {}<br>    <br>    for each entry in readWALFile():<br>        if entry.status == &quot;pending&quot;:<br>            operations[entry.opID] = entry<br>        else if entry.status == &quot;completed&quot;:<br>            delete operations[entry.opID]<br>    <br>    return operations.values()</pre><p><strong>Recovery Flow:</strong></p><pre>1. System crashes during payment<br>2. On restart: RecoverFromCrash()<br>3. Find all &quot;pending&quot; operations<br>4. For each: check if completed, replay if not<br>5. Mark all as completed<br>6. System now consistent</pre><p><strong>Building Blocks Summary<br></strong>These eight steps build on each other:</p><pre>Step 1: Audit Logging<br>   ↓ (Foundation - know what happened)<br>   <br>Step 2: Explicit Timeouts<br>   ↓ (Fail fast, don&#39;t hang)<br>   <br>Step 3: Idempotency<br>   ↓ (Safe retries)<br>   <br>Step 4: Dual Data Strategy<br>   ↓ (Speed + Correctness)<br>   <br>Step 5: Reconciliation<br>   ↓ (Detect drift)<br>   <br>Step 6: Distributed Locking<br>   ↓ (Prevent races)<br>   <br>Step 7: Transaction Semantics<br>   ↓ (All-or-nothing)<br>   <br>Step 8: Write-Ahead Logging<br>   ↓ (Crash recovery)</pre><h3>Conclusion: The Coinbase Philosophy</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WH_wgTQI_ONDBMhJP84fWg.jpeg" /></figure><p>Coinbase’s zero-tolerance approach centers on a simple but powerful idea: <strong>prevent errors rather than fix them.</strong></p><p>This philosophy manifests in every architectural decision:</p><ul><li><strong>✓ Layered Redundancy</strong> — No single component failure causes errors</li><li><strong>✓ Dual Data Strategy</strong> — Speed where possible, correctness where necessary</li><li><strong>✓ Comprehensive Audit Trails</strong> — Always know exactly what happened</li><li><strong>✓ Correctness Over Speed</strong> — Accept performance costs to prevent errors</li><li><strong>✓ Deterministic Recovery</strong> — When failures happen, recovery is automatic</li></ul><blockquote>“Payments are one of the areas that have zero tolerance for any errors.”</blockquote><p>This isn’t just a philosophy — it’s an architectural commitment that shapes every line of code, every system design, and every operational decision.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3fc7e909f2f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/coinbases-zero-tolerance-approach-in-building-payment-systems-f3fc7e909f2f">Coinbase’s Zero-Tolerance Approach In Building Payment Systems</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hidden Dangers Lurking in Your Concurrent Code ( And How Go Helps You Survive)]]></title>
            <link>https://medium.com/codex/the-hidden-dangers-lurking-in-your-concurrent-code-and-how-go-helps-you-survive-f0bd86667b3f?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0bd86667b3f</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[concurrency]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 17:44:09 GMT</pubDate>
            <atom:updated>2026-04-21T15:30:15.765Z</atom:updated>
            <content:encoded><![CDATA[<p>A journey through the beautiful chaos of concurrent programming</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3-LXLykA4_Kwrd49NkQ3Pw.png" /></figure><p>You’re sitting at your desk at 3 AM, staring at a bug that only appears in production. Sometimes. Maybe once a week. Your code works perfectly on your machine. The tests pass. But somewhere, somehow, in the wild chaos of real-world usage, your program occasionally produces the wrong result. Welcome to the maddening world of concurrency bugs.</p><h3>The Deceptive Simplicity</h3><p>Let’s start with something that looks innocent enough:</p><pre>var data int<br><br>go func(){<br>   data++<br>}()<br><br>if data == 0 {<br>    fmt.Printf(&quot;the value is %v.\n&quot;, data)<br>}</pre><p>Quick quiz: What does this print?<br>If you answered “nothing” or “the value is 0”, you are partially right. If you answered “the value is 1”, you’re also partially right. The disturbing truth? All three outcomes are possible:<br>1. Nothing prints (line 3 executes before line 5)<br>2. “the value is 0” prints (lines 5–6 execute before line 3)<br>3. “the value is 1” prints (line 5 executes before line 3, but line 3 executes before line 6 )</p><p>This is a race condition, and it’s one of the most insidious bugs you’ll ever encounter. Why? Because it might work correctly 99.9% of the time. Your tests pass. Your code reviews don’t catch it. Then, two years into production, when your system is under unprecedented load, everything breaks.</p><h3>The Seductive “Fix” That Isn’t</h3><p>Here’s what many developers try first:</p><pre>var data int<br>go func() { data++ }()<br>time.Sleep(1*time.Second) // &quot;This should fix it!&quot;<br>if data == 0 {<br>  fmt.Printf(&quot;the value is %v.\n&quot;,data)<br>}</pre><p>Does this solve the problem?No. You’ve just made the bug less likely to appear. You’re still playing Russian roulette with your program’s correctness — you’ve just added more empty chambers. Plus, you’ve introduced a one-second delay to make your program almost correct. That’s like putting a Band-Aid on a broken bone.</p><p><strong>When One Line of Code Isn’t One Operation<br></strong>Pop quiz #2: How many operations happen in this line ?</p><pre>i++</pre><p>If you said “one”, you’re thinking like a human. Computers think differently:</p><ol><li>Retrieve the value of i</li><li>Increment the value</li><li>Store the value back to i</li></ol><p>Three separate operations. And here’s the kicker: combining atomic operations doesn’t create a larger atomic operation. Between any of these steps, another goroutine can swoop in and read or modify i, creating subtle corruption in your data.</p><p>The Deadlock Dance<br>Race conditions are bad, but at least your program keeps running (incorrectly). Deadlocks are worse — they’re the death of your program. Let me show you how easy it is to write one:</p><pre>type value struct {<br>    mu sync.Mutex<br>    value int<br>}<br><br>printSum := func(v1, v2 *value) {<br>    v1.mu.Lock()<br>    defer v1.mu.Unlock()<br><br>    time.Sleep(2*time.Second)  // Simulate work<br><br>    v2.mu.Lock()<br>    defer v2.mu.Unlock()<br><br>    fmt.Printf(&quot;sum=%v\n&quot;,v1.value + v2.value)<br>}<br><br>var a, b value<br>go printSum(&amp;a, &amp;b)<br>go printSum(&amp;b, &amp;a)</pre><p>Can you spot the problem? The first gorountine locks a , then tries to lock b. The second goroutine locks b, then tries to lock a. They’re now frozen, waiting for each other forever. Your program is dead.</p><p>This is like two people in a hallway, both trying to be polite by stepping to the same side, then both stepping back, then both stepping to the other side.. forever.</p><p><strong>The Hallway of Eternal Politeness (Livelock)<br></strong>Speaking of hallways, let’s code that awkward dance:</p><pre>var left, right int32<br><br>tryLeft := func() bool {<br>     atomic.AddInt32(&amp;left, 1)<br>     defer atomic.AddInt32(&amp;left, -1)<br><br>     if atomic.LoadInt32(&amp;left) == 1 {<br>       return true    // Success<br>     }<br>      return false  // Someone else is trying too<br>}<br><br>tryRight := func() bool {<br>    atomic.AddInt32(&amp;right, 1)<br>    defer atomic.AddInt32(&amp;right, -1)<br><br>    if atomic.LoadInt32(&amp;right) == 1 {<br>      return true<br>    }<br>    return false<br>}<br><br>// Person1 and Person2 try to pass each other<br>for i := 0; i &lt; 5; i++ {<br>  if tryLeft() || tryRight() {<br>      return    // Made it through!<br>  } <br>  // Both failed, try again<br>}<br>// Give up in frustration</pre><p>This is a livelock. Unlike a deadlock, your CPU is working hard, burning cycles. But nothing productive is happening. It’s the concurrency equivalent of running on a treadmill.</p><h3><strong>The Greedy and the Starved</strong></h3><p>Here’s a more subtle problem — starvation:</p><pre>var sharedLock sync.Mutex<br><br>greedyWorker := func() {<br>    var count int<br>    for begin := time.Now(); time.Since(begin) &lt;= 1*time.Second; {<br>        sharedLock.Lock()<br>        time.Sleep(3*time.Nanosecond) // Do work<br>        sharedLock.Unlock()<br>        count++<br>    }<br>    fmt.Printf(&quot;Greedy worker: %v loops\n&quot;,count)<br>}<br><br>politeWorker := func() {<br>     var count int<br>     for begin := time.Now(); time.Since(begin) &lt;= 1*time.Second; {<br>         sharedLock.Lock()<br>         time.Sleep(1*time.Nanosecond)<br>         sharedLock.Unlock()<br><br>         sharedLock.Lock()<br>         time.Sleep(1*time.Nanosecond)<br>         sharedLock.Unlock()<br><br>         sharedLock.Lock()<br>         time.Sleep(1*time.Nanosecond)<br>         sharedLock.Unlock()<br>        <br>         count++<br>     }<br>     fmt.Printf(&quot;Polite worker: %v loops\n&quot;, count)<br>}<br><br>go greedyWorker()<br>go politeWorker()</pre><p>Output:</p><pre>Greedy worker: 471,287 loops<br>Polite worker: 289,777 loops</pre><p>Same amount of work, but the greedy worker gets nearly twice as much done! The polite worker is being starved of resources. This is the concurrency equivalent of one person hogging the microphone at a meeting while others wait patiently for their turn that never comes.</p><h3>The Horror of Uncertainty</h3><p>Here’s what makes all of this truly terrifying: <strong>you can’t reason about concurrent code the way you reason about sequential code</strong>. Look at this function signature:</p><pre>func CalculatePi(begin, end int64, pi *Pi)</pre><p>Questions immediately arise:<br>- Is this function thread-safe?<br>- Should I call it concurrently myself?<br>- Who handles synchronization ?<br>- Is the Pi type safe for concurrent access?</p><p>Without documentation or reading the implementation, <strong>you have no idea</strong>. And this is just one function. Scale this to a large codebase, and you see the problem.</p><h3>How Go Fights Back</h3><p>The good news? Go gives you powerful tools to tame this chaos:</p><ol><li>Channels for safe communication:</li></ol><pre>func CalculatePi(begin, end int64) &lt;-chan uint {<br>    result := make(chan uint)<br>    go func() {<br>        // Calculate and send results<br>        result &lt;- calculation<br>        close(result)<br>    }()<br>    return result<br>}</pre><p>The signature itself tells you: “This function handles concurrency internally. Just read from the channel.”</p><p>2. Clear patterns for synchronizarion:</p><pre>var memoryAccess sync.Mutex<br>var value int<br><br>go func() {<br>    memoryAccess.Lock()<br>    value++<br>    memoryAccess.Unlock()<br>}()<br><br>memoryAccess.Lock()<br>if value == 0 {<br>    fmt.Printf(&quot;the value is %v.\n&quot;, value)<br>}<br>memoryAccess.Unlock()</pre><p>3. A runtime that does the heavy lifting:<br>- Automatic goroutine management (no manual thread pools)<br>- Garbage collection pauses under 100 microseconds<br>- Smart scheduling across CPU cores</p><h3>The Path Forward</h3><p>Concurrency will always be hard. The fundamental problems — race conditions, deadlocks, livelocks, and starvation — aren’t going away. But Go makes it <strong>manageable</strong>. It gives you:</p><ol><li><strong>Primitives that encourage correct patterns</strong> (channels, goroutines)</li><li><strong>A runtime that handles complexity</strong> (scheduling, memory management)</li><li><strong>Tools to catch bugs</strong> (race detector, profiler)</li></ol><p>The key is understanding these dangers exist and respecting them. Every time you add concurrency to your code, you’re making a trade: complexity for performance. Make that trade consciously, document your decisions, and test thoroughly.</p><p>Because that 3 AM bug hunt? The one that only happens in production? That’s not where you want to be learning these lessons.</p><h3>Key Takeaways</h3><ul><li><strong>Race conditions</strong> are silent killers that can hide for years</li><li><strong>Don’t use </strong><strong>time.Sleep() to &quot;fix&quot; concurrency bugs</strong>—fix the logic</li><li><strong>Atomicity is context-dependent</strong> — something atomic in one scope isn’t necessarily atomic in another</li><li><strong>Deadlocks need four conditions</strong> (Coffman Conditions) — break one to prevent them</li><li><strong>Livelocks waste CPU</strong> while making no progress</li><li><strong>Starvation happens</strong> when greedy processes hog resources</li><li><strong>Go’s concurrency primitives</strong> make correct code easier to write</li><li><strong>Document your concurrency assumptions</strong> — future you will thank present you</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0bd86667b3f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/the-hidden-dangers-lurking-in-your-concurrent-code-and-how-go-helps-you-survive-f0bd86667b3f">The Hidden Dangers Lurking in Your Concurrent Code ( And How Go Helps You Survive)</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Payment Rail That Quietly Runs Britain]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/there-is-a-payment-system-running-underneath-almost-every-british-paycheck-utility-bill-gym-09a4074ccb30?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1920/1*hodGOH1Fgq0zKtn3_kJCuw.png" width="1920"></a></p><p class="medium-feed-snippet">That system is Bacs&#x200A;&#x2014;&#x200A;the Banker&#x2019;s Automated Clearing System. It has been running since 1968. It processed 5.8 trillion pounds in payments&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/there-is-a-payment-system-running-underneath-almost-every-british-paycheck-utility-bill-gym-09a4074ccb30?source=rss-5ec630449ba0------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/there-is-a-payment-system-running-underneath-almost-every-british-paycheck-utility-bill-gym-09a4074ccb30?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/09a4074ccb30</guid>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[finance-and-banking]]></category>
            <category><![CDATA[nach]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Sat, 18 Apr 2026 10:38:22 GMT</pubDate>
            <atom:updated>2026-04-21T15:29:27.499Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why Generic Sentiment Models Fail on Financial News — and How FinBERT Fixes It]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/why-generic-sentiment-models-fail-on-financial-news-and-how-finbert-fixes-it-2e72873a5076?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1500/1*CmCgvn_VZwVSkBTu71xErQ.png" width="1500"></a></p><p class="medium-feed-snippet">Seven weeks building a real-time financial sentiment pipeline revealed exactly how much VADER, TextBlob, and the Loughran-McDonald&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/why-generic-sentiment-models-fail-on-financial-news-and-how-finbert-fixes-it-2e72873a5076?source=rss-5ec630449ba0------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/why-generic-sentiment-models-fail-on-financial-news-and-how-finbert-fixes-it-2e72873a5076?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e72873a5076</guid>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[financial-ml]]></category>
            <category><![CDATA[finbert]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Fri, 27 Mar 2026 05:28:54 GMT</pubDate>
            <atom:updated>2026-03-27T07:53:33.767Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Concurrency Cookbook : Thread Management]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/concurrency-cookbook-thread-management-319085b807e9?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1024/1*ino0w0noOXj8cTWTl1nSOQ.png" width="1024"></a></p><p class="medium-feed-snippet">Most of us first learn about concurrency and multithreading back in college, but only a few truly understand how to apply them in&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/concurrency-cookbook-thread-management-319085b807e9?source=rss-5ec630449ba0------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/concurrency-cookbook-thread-management-319085b807e9?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/319085b807e9</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[threading-in-java]]></category>
            <category><![CDATA[multithreading]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Mon, 06 Oct 2025 15:34:53 GMT</pubDate>
            <atom:updated>2025-10-07T12:32:30.834Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Designing a Payment Service Provider: Functional Requirement of Merchant Service]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/designing-a-payment-service-provider-functional-requirement-of-merchant-service-e8dc57f57e2d?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1536/1*IVp6A-I5TmaBqyJN0NGqlA.png" width="1536"></a></p><p class="medium-feed-snippet">Continuing our journey of building a Payment Service Provider, the first component we&#x2019;ll focus on is the merchant-service. This article&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/designing-a-payment-service-provider-functional-requirement-of-merchant-service-e8dc57f57e2d?source=rss-5ec630449ba0------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/designing-a-payment-service-provider-functional-requirement-of-merchant-service-e8dc57f57e2d?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8dc57f57e2d</guid>
            <category><![CDATA[merchantserviceproviders]]></category>
            <category><![CDATA[payment-service-provider]]></category>
            <category><![CDATA[schema-design]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Wed, 10 Sep 2025 17:19:07 GMT</pubDate>
            <atom:updated>2025-09-12T12:19:26.733Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Designing a Payment Service Provider (Introduction)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/designing-a-payment-service-provider-introduction-2792baece0e0?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1024/1*pBZd1cpxfddfwM7bvkewXA.png" width="1024"></a></p><p class="medium-feed-snippet">In my quest to secure a software engineering role in the payments domain, I recently started building a Payment Service Provider (PSP) to&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/designing-a-payment-service-provider-introduction-2792baece0e0?source=rss-5ec630449ba0------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/designing-a-payment-service-provider-introduction-2792baece0e0?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2792baece0e0</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[payment-service-provider]]></category>
            <category><![CDATA[digital-payments-market]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Tue, 09 Sep 2025 10:53:09 GMT</pubDate>
            <atom:updated>2025-09-12T12:17:18.495Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[From Prompt to Productivity: Building a Dockerized AI Email Agent with FastAPI, PostgreSQL, and…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/from-prompt-to-productivity-building-a-dockerized-ai-email-agent-with-fastapi-postgresql-and-e6bcac4a1d53?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1536/1*8kmt4KaG6oXXn9qFsILaRQ.png" width="1536"></a></p><p class="medium-feed-snippet">In today&#x2019;s world of automation and productivity tooling, AI Agents are taking center stage. From assisting with research to managing email&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/from-prompt-to-productivity-building-a-dockerized-ai-email-agent-with-fastapi-postgresql-and-e6bcac4a1d53?source=rss-5ec630449ba0------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/from-prompt-to-productivity-building-a-dockerized-ai-email-agent-with-fastapi-postgresql-and-e6bcac4a1d53?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6bcac4a1d53</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[langchain]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Sat, 21 Jun 2025 18:39:43 GMT</pubDate>
            <atom:updated>2025-06-24T14:04:32.627Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Event-driven microservices — Part 1]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/codex/event-driven-microservices-part-1-a03e2406e84b?source=rss-5ec630449ba0------2"><img src="https://cdn-images-1.medium.com/max/1536/1*uxnsEuYp9nv0tYSz2ub0FQ.png" width="1536"></a></p><p class="medium-feed-snippet">In today&#x2019;s world, we are exposed to various forms of medium, where a single message can be disseminated through multiple sources of&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/codex/event-driven-microservices-part-1-a03e2406e84b?source=rss-5ec630449ba0------2">Continue reading on CodeX »</a></p></div>]]></description>
            <link>https://medium.com/codex/event-driven-microservices-part-1-a03e2406e84b?source=rss-5ec630449ba0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a03e2406e84b</guid>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[event-driven-architecture]]></category>
            <dc:creator><![CDATA[sourav mansingh]]></dc:creator>
            <pubDate>Wed, 11 Jun 2025 18:49:10 GMT</pubDate>
            <atom:updated>2025-06-13T17:52:54.812Z</atom:updated>
        </item>
    </channel>
</rss>