<?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 Chidinma Onuora on Medium]]></title>
        <description><![CDATA[Stories by Chidinma Onuora on Medium]]></description>
        <link>https://medium.com/@chidinma21?source=rss-f634214f2182------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dCBdsmW5cyz1BGgOdl0ssA.jpeg</url>
            <title>Stories by Chidinma Onuora on Medium</title>
            <link>https://medium.com/@chidinma21?source=rss-f634214f2182------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:33:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chidinma21/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[Transactional State Machines for Agentic Finance: Orchestrating Asynchronous Cross-Border Rails…]]></title>
            <link>https://medium.com/@chidinma21/transactional-state-machines-for-agentic-finance-orchestrating-asynchronous-cross-border-rails-4a528c3ae0dd?source=rss-f634214f2182------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a528c3ae0dd</guid>
            <category><![CDATA[saga-pattern]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-workflow]]></category>
            <category><![CDATA[agentic-finance]]></category>
            <category><![CDATA[agentic]]></category>
            <dc:creator><![CDATA[Chidinma Onuora]]></dc:creator>
            <pubDate>Thu, 20 Aug 2026 10:14:38 GMT</pubDate>
            <atom:updated>2026-08-20T10:14:38.304Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Transactional State Machines for Agentic Finance</strong>: Orchestrating Asynchronous Cross-Border Rails with the Saga Pattern</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jV7-YxqAHFecBy0ChFbs6g.jpeg" /></figure><p>Imagine you build an AI agent for a multi-national company. Its job is simple: monitor foreign exchange (FX) market volatility and automatically hedge $10,000 by converting local fiat to USDC on-chain whenever the exchange rate swings unfavorably.</p><p>Executing this involves a four-step backend workflow:</p><ol><li><strong>Deduct $10,000</strong> from the local bank balance.</li><li><strong>Lock an FX conversion rate</strong> with a liquidity partner.</li><li><strong>Mint or transfer USDC</strong> on a blockchain network.</li><li><strong>Deposit USDC</strong> into the corporate treasury wallet.</li></ol><p>If everything works, it takes seconds. But what happens if the network drops midway, a blockchain RPC node timing out during Step 3, or your application server suddenly crashes mid-execution?</p><p>You cannot run ROLLBACK on an API request sent to an external bank, nor can you undo a transaction already broadcast on-chain. The money is stuck in limbo, and your AI agent (lacking memory of the crash) might wake up, panic, and try to execute the whole $10,000 transfer again.</p><p>This is where <strong>Transactional State Machines</strong> and the <strong>Saga Pattern</strong> come in.</p><h4><strong>The Anatomy of the Saga Pattern</strong></h4><p>In distributed fintech systems, you replace a single all-or-nothing transaction with a <strong>Saga</strong>: a sequence of smaller local transactions.</p><p>For every step that moves money forward, you must define a <strong>Compensating Action. </strong>This is an offsetting transaction designed to safely undo the work if a later step fails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hUx_tTg19boKIcV933yKDw.png" /></figure><p><strong>Step 1:</strong> Reserve $10,000 in internal database.</p><ul><li><em>Compensating Action:</em> Release the $10,000 hold.</li></ul><p><strong>Step 2:</strong> Lock FX contract with liquidity provider.</p><ul><li><em>Compensating Action:</em> Issue an API cancel request for the FX contract.</li></ul><p><strong>Step 3:</strong> Initiate USDC Transfer.</p><ul><li><em>If this fails:</em> The orchestrator stops and executes Compensating Action 2, then Compensating Action 1 in reverse order.</li></ul><h4><strong>Building the Durable State Machine</strong></h4><p>To make this crash-proof, the workflow must be durable. Every time the state changes, the backend records the transition to a database before calling external APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*XpoYMS6hP6hFnG3Fl95XcQ.png" /></figure><p>If your server restarts while waiting for blockchain consensus, the system checks the database upon boot, sees ONCHAIN_SUBMITTED, and resumes listening for the settlement event instead of double-spending or restarting from INITIATED.</p><h4>Why This Architecture Matters for AI Agents</h4><p>AI agents are excellent at making decisions, but they operate probabilistically. They shouldn’t worry about network timeouts, orphan states, or database rollbacks.</p><p>By abstracting complex cross-border financial rails behind a durable Saga state machine, you give non-deterministic AI agents a safe, deterministic execution engine. The agent decides <em>what</em> to do, while the state machine guarantees that money moves reliably or safely unwinds, no matter what breaks in between.</p><h3>Further Reading &amp; Resources</h3><ul><li><a href="https://docs.temporal.io/design-patterns/saga-pattern"><strong>Temporal.io: Saga Pattern Design</strong></a></li><li><a href="https://vercel.com/i/saga-pattern"><strong>Vercel Architecture Guide: The Saga Pattern</strong></a></li><li><a href="https://microservices.io/patterns/data/saga.html"><strong>Microservices Patterns: Sagas</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a528c3ae0dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Practical Redis Usage for Engineers: Beyond Caching GET Requests]]></title>
            <link>https://medium.com/@chidinma21/practical-redis-usage-for-engineers-beyond-caching-get-requests-241241952476?source=rss-f634214f2182------2</link>
            <guid isPermaLink="false">https://medium.com/p/241241952476</guid>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[databse]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Chidinma Onuora]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 19:33:57 GMT</pubDate>
            <atom:updated>2025-07-29T08:06:49.758Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sNYLXZNqtaSPGNY820nfVg.png" /></figure><p>Redis is often introduced as a lightning-fast key-value store — ideal for caching expensive GET requests. And while it does this extremely well, limiting Redis to just that is like buying a Swiss Army knife and only using the bottle opener.</p><p>In real-world backend systems, Redis often sits at the heart of things — powering fraud detection, controlling rate limits, coordinating background jobs, and enforcing idempotency across stateless APIs. This article explores these practical patterns, going far beyond SET and GET.</p><h3>💽 Why Redis?</h3><p>Redis is an in-memory data store — it keeps data in RAM, which makes reads and writes incredibly fast. It also offers built-in data structures (like Sets, Lists, and Sorted Sets) that make it ideal for a range of backend problems beyond basic caching.</p><p>Redis offers sub-millisecond latency, rich data types, built-in support for expiration(TTL), simplicity, among a host of other advantages.</p><p>Let’s explore how you can apply Redis in real systems.</p><h3>🧪 The Standard Use Case: Caching a GET Response</h3><p>To be clear, caching works — and Redis makes it fast:</p><pre>SET user:123 &#39;{&quot;id&quot;:123,&quot;name&quot;:&quot;Alice&quot;}&#39; EX 3600<br>GET user:123</pre><p>But what happens when you need to flag a member, rate- limit requests, or you’re coordinating a retry queue for failed jobs?</p><p>Let’s go deeper.</p><h3>⚠️ Set Membership for Fraud Prevention</h3><p>Redis sets are ideal for fast membership lookups. They make it trivial to maintain lists like: banned users, flagged phone numbers or IP addresses, temporarily blacklisted users, and so on.</p><pre>SADD blocked_ips 192.168.1.10<br>SADD blocked_ips 203.0.113.5</pre><p>Then, during a request:</p><pre>SISMEMBER blocked_ips 203.0.113.5</pre><p>If the result is 1, the IP is blocked. If it’s 0, it’s allowed.</p><h4>✅ Why is this useful ?</h4><ul><li>Fast, O(1) lookups</li><li>Easy to manage and expire dynamically</li><li>Supports SREM to unflag items</li></ul><p>You can build an effective fraud defense system without touching your primary database.</p><h3>🚦 <strong>Rate Limiting with INCR and EXPIRE</strong></h3><p>Need to rate-limit login attempts, OTP requests, or sensitive operations? Redis makes this easy with INCR and EXPIRE.</p><ul><li>INCR — increments a counter</li><li>EXPIRE — sets an expiration for that counter</li></ul><p>This limits a user to X attempts in Y minutes — no cron jobs, no cleanup scripts.</p><pre>INCR attempt_count:johnDoe<br>EXPIRE attempt_count:johnDoe 600</pre><h4>✅ Why is this useful ?</h4><ul><li>No need to store timestamps or do math</li><li>Expiration resets the count automatically</li></ul><h3>🔁 Background Job Coordination</h3><p>Using Redis as a job queue gives you real-time control over retries and processing. It’s a simple but powerful pattern when paired with workers or background services.</p><p>You can LPUSH (add) jobs and RPOP (remove) them in FIFO order.</p><pre>LPUSH retry_queue job1<br>LPUSH retry_queue job2<br><br># In a worker:<br>RPOP retry_queue</pre><h4>✅ Why is this useful ?</h4><ul><li>Lightweight background task handling</li><li>Great for systems that don’t need full-fledged task queues</li></ul><h3>🧾 Idempotency Enforcement</h3><p>In stateless systems (like REST APIs), idempotency is essential to avoid duplicate processing, especially for payments, verifications, or form submissions.</p><p>Redis can help with this using SETNX (Set if Not Exists). It provides a fast and temporary store to track unique request IDs:</p><pre>SETNX request_id:abc123 processing<br>EXPIRE request_id:abc123 30</pre><p>If SETNX returns:</p><ul><li>1 — The key was set, go ahead and process the request.</li><li>0 — The key already exists, meaning this request is already being handled or has been handled.</li></ul><h4>✅ Why is this useful ?</h4><ul><li>Prevents double-processing or accidental retries</li><li>TTL ensures keys eventually expire</li><li>No need to create a full idempotency table in your database</li></ul><h3>⚙️ A Note on Expiry and Memory</h3><p>Redis is fast because it’s in-memory, but that means you have to manage memory wisely.</p><p>Tips:</p><ul><li>Always set a TTL (EXPIRE) for short-lived data</li><li>Use eviction policies like volatile-lru to remove least recently used (LRU) keys</li><li>Don’t store long-term data unless persistence is enabled and configured</li></ul><h3>🧠 Summary</h3><p>Redis is much more than a cache. It’s a versatile, powerful tool for solving real-world backend problems — without needing to reach for heavier tools or extra infrastructure.</p><p>Other mention-worthy use cases are:</p><ul><li><strong>Temporary sessions</strong>: Store auth tokens or user sessions with expiry</li><li><strong>One-time passcodes (OTPs)</strong>: Store and expire in minutes</li><li><strong>Live counters</strong>: Track events or usage in real-time with INCR</li><li><strong>Pub/Sub</strong>: Redis has built-in publish/subscribe messaging — great for simple inter-service communication</li></ul><p>When you look past the basic tutorials, Redis starts to feel like a secret weapon. Whether you’re fighting fraud, building job processors, or safeguarding your APIs, Redis likely has the right data structure to help you out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=241241952476" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication vs. Authorization]]></title>
            <link>https://medium.com/@chidinma21/authentication-vs-authorization-74bec5d9030f?source=rss-f634214f2182------2</link>
            <guid isPermaLink="false">https://medium.com/p/74bec5d9030f</guid>
            <dc:creator><![CDATA[Chidinma Onuora]]></dc:creator>
            <pubDate>Mon, 01 Jan 2024 22:32:14 GMT</pubDate>
            <atom:updated>2024-03-19T10:47:12.848Z</atom:updated>
            <content:encoded><![CDATA[<p>In the realm of user access control, two terms often appear side by side but play distinct roles in safeguarding digital resources: “<strong><em>authentication</em></strong>” and “<strong><em>authorization</em></strong>”. While these terms might sound similar, understanding the key differences between them is essential for building a secure and functional system.</p><p>During a conversation with my CTO about a new project’s process flow, I mistakenly swapped the terms “<strong><em>authentication</em></strong>” and “<strong><em>authorization</em></strong>.” His correction emphasized their distinct roles in securing digital resources. Recognizing the widespread confusion surrounding these terms, I resolved to clarify them by writing this article. Through this piece, I aim to help others understand the difference between these terms, highlighting their significance in building secure systems.</p><p>The simple difference is this: <strong><em>Authentication verifies identity, while Authorization verifies what a user can access based on identity</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*6j80YnI5IfPvO-DRgPsr5w.jpeg" /></figure><p>However, let’s take a look at both terms individually in a little more detail.</p><h4>Authentication</h4><p>Authentication is the process of verifying the identity of a user or system attempting to access a particular resource. The intent is to ensure that the user claiming an identity is indeed who or what they claim to be. Authentication methods include:</p><ul><li><strong>Username and Password</strong>: The traditional method where users provide a unique identifier (username) and a secret code (password).</li><li><strong>Biometric Authentication</strong>: Involves using physical or behavioral characteristics, such as fingerprints, facial recognition, or voice patterns.</li><li><strong>Two-Factor Authentication (2FA)</strong>: Requires two forms of identification, often combining a password with a temporary code sent to a registered device.</li></ul><h4>Authorization</h4><p>Authorization comes into play after successful authentication. It involves determining what actions or resources a verified user or system is allowed to access. Authorization methods include:</p><ul><li><strong>Role-Based Access Control (RBAC)</strong>: Assigns permissions based on predefined roles, streamlining access management.</li><li><strong>Access Control Lists (ACLs)</strong>: Specifies permissions for individual users or systems, dictating what they can or cannot access.</li><li><strong>Attribute-Based Access Control (ABAC)</strong>: Considers various attributes (user attributes, environmental conditions) to make access decisions dynamically.</li></ul><h4><strong>Key Differences</strong></h4><ul><li><strong>Focus</strong>: Authentication focuses on verifying identity while authorization focuses on granting permissions based on verified identity.</li><li><strong>Timing</strong>: Authorization happens only after successful authentication.</li></ul><p>Ultimately, authentication answers the question, “Who are you?”, while authorization answers the question, “What are you allowed to do?”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74bec5d9030f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>