<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: koded</title>
    <description>The latest articles on DEV Community by koded (@coder0214h).</description>
    <link>https://dev.to/coder0214h</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3861624%2Fd9813929-4d6e-42e8-8af5-cf8d12378115.PNG</url>
      <title>DEV Community: koded</title>
      <link>https://dev.to/coder0214h</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coder0214h"/>
    <language>en</language>
    <item>
      <title>Designing a Collision-Resistant Deployment Naming Service</title>
      <dc:creator>koded</dc:creator>
      <pubDate>Sun, 19 Jul 2026 15:46:15 +0000</pubDate>
      <link>https://dev.to/coder0214h/designing-a-collision-resistant-deployment-naming-service-2fne</link>
      <guid>https://dev.to/coder0214h/designing-a-collision-resistant-deployment-naming-service-2fne</guid>
      <description>&lt;p&gt;This started as a random thought while solving coding problems.&lt;/p&gt;

&lt;p&gt;Imagine you're building something like Vercel or Render.&lt;/p&gt;

&lt;p&gt;A user deploys a project called:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;portfolio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If nobody has used it before, great.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;portfolio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But if someone already owns it, you need something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;portfolio-km82x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple enough.&lt;/p&gt;

&lt;p&gt;Until you start asking questions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What if two users deploy &lt;code&gt;portfolio&lt;/code&gt; at the exact same time?&lt;/li&gt;
&lt;li&gt;How do you stop collisions?&lt;/li&gt;
&lt;li&gt;How do you make the suffix human-readable?&lt;/li&gt;
&lt;li&gt;Should it always be five characters?&lt;/li&gt;
&lt;li&gt;How do you avoid ugly strings like &lt;code&gt;111&lt;/code&gt; or &lt;code&gt;aaa&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;What happens when there are already two million &lt;code&gt;portfolio-*&lt;/code&gt; deployments?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That innocent problem suddenly becomes a mix of algorithms, probability, concurrency, and system design.&lt;/p&gt;

&lt;p&gt;This is the approach I ended up with.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Question
&lt;/h2&gt;

&lt;p&gt;The rules for a valid suffix are highly specific:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Consist only of lowercase English letters (&lt;code&gt;a-z&lt;/code&gt;) and digits (&lt;code&gt;0-9&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The first and last characters must be lowercase letters.&lt;/li&gt;
&lt;li&gt;The suffix length must be at least 4 characters.&lt;/li&gt;
&lt;li&gt;No more than two consecutive digits may appear (e.g., &lt;code&gt;ab12&lt;/code&gt; is fine, &lt;code&gt;ab123&lt;/code&gt; is illegal).&lt;/li&gt;
&lt;li&gt;No three consecutive identical characters may appear (e.g., &lt;code&gt;aaa&lt;/code&gt; or &lt;code&gt;111&lt;/code&gt; are illegal).&lt;/li&gt;
&lt;li&gt;It cannot contain reserved substrings: &lt;code&gt;admin&lt;/code&gt;, &lt;code&gt;root&lt;/code&gt;, &lt;code&gt;api&lt;/code&gt;, &lt;code&gt;www&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Thinking About It
&lt;/h2&gt;

&lt;p&gt;My first instinct was the obvious one.&lt;/p&gt;

&lt;p&gt;Generate a random string.&lt;/p&gt;

&lt;p&gt;Validate it.&lt;/p&gt;

&lt;p&gt;If it fails, generate another.&lt;/p&gt;

&lt;p&gt;Something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;suffix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random_string&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;valid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The more I thought about it, the less I liked it.&lt;/p&gt;

&lt;p&gt;If I already know the rules ahead of time, why generate invalid strings at all?&lt;/p&gt;

&lt;p&gt;Instead, I flipped the problem around.&lt;/p&gt;

&lt;p&gt;Rather than validating after generation, I made the generator incapable of producing illegal candidates.&lt;/p&gt;




&lt;h2&gt;
  
  
  Breaking the Problem Down
&lt;/h2&gt;

&lt;p&gt;Before writing any code, I tried separating responsibilities.&lt;/p&gt;

&lt;p&gt;Instead of one giant function, the solution naturally became four small pieces.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;generate_suffix()
       ↓
   build_slug()
       ↓
try_insert_slug()
       ↓
retry if collision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each function only knows one thing.&lt;/p&gt;

&lt;p&gt;The generator knows nothing about the database.&lt;/p&gt;

&lt;p&gt;The database knows nothing about suffix generation.&lt;/p&gt;

&lt;p&gt;The retry loop coordinates everything.&lt;/p&gt;

&lt;p&gt;That separation ended up making the implementation much simpler.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;One thing I wanted to avoid was this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;slug&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks innocent.&lt;/p&gt;

&lt;p&gt;It also breaks the moment two threads execute it simultaneously.&lt;/p&gt;

&lt;p&gt;Instead, I moved the uniqueness check inside the database itself.&lt;/p&gt;

&lt;p&gt;Now the application never asks:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Does this exist?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It simply says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Try inserting this."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The database either accepts it or rejects it atomically.&lt;/p&gt;




&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Database Layer
&lt;/h3&gt;

&lt;p&gt;To handle this purely in-memory without pulling in external infrastructure, we wrap our storage in an object that manages state via a thread lock (&lt;code&gt;threading.Lock&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;threading&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;secrets&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Set&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;InMemoryDatabase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_slug_records&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_lock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;threading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Lock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;try_insert_slug&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Why this exists:
&lt;/span&gt;        &lt;span class="c1"&gt;# We acquire a lock so only ONE thread can execute this block at a time.
&lt;/span&gt;        &lt;span class="c1"&gt;# If the slug is taken, we signal a collision immediately.
&lt;/span&gt;        &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_lock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;slug&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_slug_records&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;  

            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_slug_records&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Generator &amp;amp; Retry Loop
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_slug&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;InMemoryDatabase&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;requested&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;LETTERS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;abcdefghijklmnopqrstuvwxyz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;     
    &lt;span class="n"&gt;DIGITS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1234567890&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;                        
    &lt;span class="n"&gt;BANNED_SUBSTRINGS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;admin&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;root&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;www&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="c1"&gt;# Try to claim the exact name requested immediately.
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;try_insert_slug&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;requested&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;requested&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_candidate_suffix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;retries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;suffix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

        &lt;span class="c1"&gt;# Adaptive length:
&lt;/span&gt;        &lt;span class="c1"&gt;# If a namespace is crowded, scaling the length up based on retries 
&lt;/span&gt;        &lt;span class="c1"&gt;# expands the search space and keeps the retry rate low.
&lt;/span&gt;        &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;retries&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LETTERS&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;DIGITS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

            &lt;span class="c1"&gt;# Platform rule:
&lt;/span&gt;            &lt;span class="c1"&gt;# First and last characters must always be letters.
&lt;/span&gt;            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LETTERS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

            &lt;span class="c1"&gt;# Lookback filtering:
&lt;/span&gt;            &lt;span class="c1"&gt;# 1. If the last two are identical, block a third.
&lt;/span&gt;            &lt;span class="c1"&gt;# 2. If the last two are digits, purge ALL digits from the pool.
&lt;/span&gt;            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
                    &lt;span class="n"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;isdigit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;isdigit&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
                &lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;allowed&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isdigit&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt;

            &lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;suffix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;retries&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;suf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;generate_candidate_suffix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;retries&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# Guard rail against global blacklisted terms
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;any&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;banned&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;suf&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;banned&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;BANNED_SUBSTRINGS&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;retries&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;

        &lt;span class="n"&gt;candidate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;requested&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;-&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;suf&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

        &lt;span class="c1"&gt;# Write-intent check:
&lt;/span&gt;        &lt;span class="c1"&gt;# Try to write it directly. If another thread beat us to this specific suffix, 
&lt;/span&gt;        &lt;span class="c1"&gt;# the database returns False, and we loop cleanly to try again.
&lt;/span&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;try_insert_slug&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;candidate&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;candidate&lt;/span&gt;

        &lt;span class="n"&gt;retries&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why This Works
&lt;/h2&gt;

&lt;p&gt;There are three ideas carrying most of the solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Generate valid candidates
&lt;/h3&gt;

&lt;p&gt;Instead of generating random strings and rejecting half of them, the generator filters its character pool while building the suffix. That removes entire classes of invalid states.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Let storage own uniqueness
&lt;/h3&gt;

&lt;p&gt;The generator never worries about collisions. It creates candidates. The storage layer decides whether they're acceptable. This keeps both components independent.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Retry is cheap
&lt;/h3&gt;

&lt;p&gt;A collision isn't an error. It's just another iteration. As the namespace becomes more crowded, the suffix length gradually increases, expanding the search space without changing the rest of the algorithm.&lt;/p&gt;




&lt;h2&gt;
  
  
  Things I'd Change In Production
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Move uniqueness to a real database:&lt;/strong&gt; Replace the in-memory set with a persistent storage engine using a proper &lt;code&gt;UNIQUE&lt;/code&gt; index constraint on the slug column.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make banned words configurable:&lt;/strong&gt; Pull the &lt;code&gt;BANNED_SUBSTRINGS&lt;/code&gt; list out of hardcoded arrays into an external config or cache layer so it can be updated dynamically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a Base32 alphabet:&lt;/strong&gt; Explicitly modify the character pool to use a Base32 variations index that excludes visually confusing symbols like &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;l&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt;, and &lt;code&gt;O&lt;/code&gt; to optimize readability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add rate limiting:&lt;/strong&gt; Enforce API-level rate limiting on a per-user basis to prevent brute-force naming attacks from exhausting the namespace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add metrics &amp;amp; tracing:&lt;/strong&gt; Emit performance telemetry capturing collision rates and the number of generation cycles per request to monitor namespace saturation over time.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Complexity
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Complexity&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lookup&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Generation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;O(k)&lt;/code&gt; where $k$ is suffix length&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Validation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;O(k)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Insertion&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Overall&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Expected &lt;code&gt;O(1)&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Note: The overall time complexity is an expected $O(1)$ because our adaptive suffix length ensures that even as the database grows, the probability of multiple sequential collisions drops exponentially.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Thoughts
&lt;/h2&gt;

&lt;p&gt;This was one of those problems that looked tiny until I started pulling on the thread.&lt;/p&gt;

&lt;p&gt;It began as "append a random suffix."&lt;/p&gt;

&lt;p&gt;A few hours later I was thinking about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;concurrency&lt;/li&gt;
&lt;li&gt;atomic writes&lt;/li&gt;
&lt;li&gt;adaptive search spaces&lt;/li&gt;
&lt;li&gt;cryptographically secure randomness&lt;/li&gt;
&lt;li&gt;human-readable identifiers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are my favorite kinds of problems, the ones that quietly combine algorithms with real software engineering.&lt;/p&gt;

&lt;p&gt;If nothing else, it reminded me that some of the most interesting engineering challenges aren't hidden inside binary trees or dynamic programming problems. They're hiding behind features we use every day without thinking about them.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>architecture</category>
      <category>systemdesign</category>
      <category>webdev</category>
    </item>
    <item>
      <title>AI in Computing</title>
      <dc:creator>koded</dc:creator>
      <pubDate>Fri, 17 Jul 2026 13:47:53 +0000</pubDate>
      <link>https://dev.to/coder0214h/ai-in-computing-2ae</link>
      <guid>https://dev.to/coder0214h/ai-in-computing-2ae</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Maybe we were never paying for intelligence. Maybe we've always been renting computation."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3i7rog82p7gncazsrte8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3i7rog82p7gncazsrte8.png" alt="AI in Computing" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yesterday, I was taking a dump while watching SpaceX's 13th test flight.&lt;/p&gt;

&lt;p&gt;As one does.&lt;/p&gt;

&lt;p&gt;Somewhere between watching another rocket leave Earth and seeing yet another post about Grok getting better, I found myself thinking about something completely different.&lt;/p&gt;

&lt;p&gt;Not AI.&lt;/p&gt;

&lt;p&gt;Not the latest model.&lt;/p&gt;

&lt;p&gt;Not benchmarks.&lt;/p&gt;

&lt;p&gt;Not who cooked who on X yesterday.&lt;/p&gt;

&lt;p&gt;But... computing.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What does computing actually mean in an AI economy?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For years, computing felt invisible. I wrote some code, deployed it somewhere, and trusted that the cloud would magically do its thing. CPUs became faster, GPUs became more powerful, data centers became larger, but I never really stopped to think about what was actually happening underneath all of it.&lt;/p&gt;

&lt;p&gt;Then AI happened.&lt;/p&gt;

&lt;p&gt;Suddenly every prompt had a price.&lt;/p&gt;

&lt;p&gt;Every generated image.&lt;/p&gt;

&lt;p&gt;Every line of code.&lt;/p&gt;

&lt;p&gt;Every research session.&lt;/p&gt;

&lt;p&gt;Every "thinking..." animation.&lt;/p&gt;

&lt;p&gt;Somewhere in the world, a warehouse full of GPUs wakes up just to answer a question that started with someone typing a few words into a textbox.&lt;/p&gt;

&lt;p&gt;That's when something clicked for me.&lt;/p&gt;

&lt;p&gt;The interesting part isn't that AI is expensive.&lt;/p&gt;

&lt;p&gt;The interesting part is that &lt;strong&gt;compute has quietly become the product.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fexuujdp61d4xe57a5uhv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fexuujdp61d4xe57a5uhv.png" alt="The AI stack" width="799" height="440"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;We like to say we're paying for AI.&lt;/p&gt;

&lt;p&gt;I'm not sure we are.&lt;/p&gt;

&lt;p&gt;I think we're paying for access to an absurd amount of computation that's been wrapped inside an intelligent interface.&lt;/p&gt;

&lt;p&gt;The intelligence is what we see.&lt;/p&gt;

&lt;p&gt;The compute is what we pay for.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If every token costs compute... are tokens slowly becoming a currency?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The more I thought about it, the weirder the entire industry became.&lt;/p&gt;

&lt;p&gt;Microsoft invests in OpenAI.&lt;/p&gt;

&lt;p&gt;Amazon pours billions into Anthropic.&lt;/p&gt;

&lt;p&gt;Google competes with Anthropic while also investing in it.&lt;/p&gt;

&lt;p&gt;NVIDIA sells chips to every single one of them.&lt;/p&gt;

&lt;p&gt;They're partners.&lt;/p&gt;

&lt;p&gt;They're competitors.&lt;/p&gt;

&lt;p&gt;They're customers.&lt;/p&gt;

&lt;p&gt;They're suppliers.&lt;/p&gt;

&lt;p&gt;At the same time.&lt;/p&gt;

&lt;p&gt;It feels less like companies fighting each other and more like one giant ecosystem where everyone is simultaneously helping and competing with everyone else.&lt;/p&gt;

&lt;p&gt;It's honestly funny when you stop and think about it.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq7vaqbdzlixrtxun2mm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq7vaqbdzlixrtxun2mm3.png" alt="Companies" width="638" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Everyone is connected. Everyone is competing.&lt;/em&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;What happens when everyone depends on everyone else?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I don't think we're witnessing an AI race anymore.&lt;/p&gt;

&lt;p&gt;I think we're witnessing a compute race.&lt;/p&gt;

&lt;p&gt;Models will continue getting better.&lt;/p&gt;

&lt;p&gt;Interfaces will continue changing.&lt;/p&gt;

&lt;p&gt;Benchmarks will continue being broken every few weeks.&lt;/p&gt;

&lt;p&gt;But underneath all of that, the real question feels much simpler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who owns the infrastructure capable of producing intelligence at scale?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maybe that's why countries are suddenly racing to build data centers.&lt;/p&gt;

&lt;p&gt;Maybe that's why energy has become part of AI conversations.&lt;/p&gt;

&lt;p&gt;Maybe that's why GPU supply chains make headlines.&lt;/p&gt;

&lt;p&gt;The conversation isn't really about AI anymore.&lt;/p&gt;

&lt;p&gt;It's about everything underneath AI.&lt;/p&gt;




&lt;p&gt;As software engineers and students, I don't think our job is simply to keep learning the newest framework or whichever model released yesterday.&lt;/p&gt;

&lt;p&gt;AI already contains an unbelievable amount of human knowledge.&lt;/p&gt;

&lt;p&gt;Our job is different.&lt;/p&gt;

&lt;p&gt;To build with it.&lt;/p&gt;

&lt;p&gt;To question it.&lt;/p&gt;

&lt;p&gt;To innovate alongside it.&lt;/p&gt;

&lt;p&gt;Most importantly, to make sure we don't slowly outsource the parts that make us human in the first place.&lt;/p&gt;

&lt;p&gt;Our curiosity.&lt;/p&gt;

&lt;p&gt;Our creativity.&lt;/p&gt;

&lt;p&gt;Our culture.&lt;/p&gt;

&lt;p&gt;Our judgment.&lt;/p&gt;

&lt;p&gt;Because if intelligence becomes abundant...&lt;/p&gt;

&lt;p&gt;Those might end up being the only things that remain scarce.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg95l0i5mzek6ny1osz6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg95l0i5mzek6ny1osz6w.png" alt="AI" width="648" height="139"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;I don't really have a conclusion.&lt;/p&gt;

&lt;p&gt;I'm still trying to make sense of all of this myself.&lt;/p&gt;

&lt;p&gt;But I keep coming back to the same question.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If computation is becoming the world's most valuable resource, what does that make software engineers?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>nvidia</category>
      <category>claude</category>
    </item>
    <item>
      <title>How Does the Internet Pay?</title>
      <dc:creator>koded</dc:creator>
      <pubDate>Sat, 11 Jul 2026 01:25:05 +0000</pubDate>
      <link>https://dev.to/coder0214h/how-does-the-internet-pay-n6e</link>
      <guid>https://dev.to/coder0214h/how-does-the-internet-pay-n6e</guid>
      <description>&lt;p&gt;&lt;em&gt;The internet got very good at moving information. It's still surprisingly bad at moving money. I think that gap is about to close, and this is the hypothesis I can't stop thinking about.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;A few nights ago I got stuck on a question that felt almost too simple: what if software could just pay?&lt;/p&gt;

&lt;p&gt;Not open a checkout page. Not redirect me to Paystack. Not wait for me to type my card number and an OTP. I mean actually pay, by itself, the same way it already sends an API request or fetches data from another server.&lt;/p&gt;

&lt;p&gt;That question sent me down a rabbit hole, and it led me somewhere I didn't expect. Over the last thirty years, the internet became incredibly good at moving information around the world in milliseconds. It never got that good at moving money. Almost every payment still stops and waits for a human to step in.&lt;/p&gt;

&lt;p&gt;This is an essay about what happens when that stops being true.&lt;/p&gt;

&lt;h2&gt;
  
  
  Payments Were Built for Humans
&lt;/h2&gt;

&lt;p&gt;If you think about it, almost every payment you have ever made follows the same shape. You decide to buy something, you tap a button, you enter your card or open your banking app, you approve an OTP, and you wait for a success screen. We have done it this way for so long that it feels like the natural order of things.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fivyjrbtn5y6f7ulek9lx.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fivyjrbtn5y6f7ulek9lx.PNG" alt="How Payments Work Today" width="800" height="1050"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem is that every step in that flow quietly assumes a person is present. It assumes someone is there to read a screen, tap a button, and decide whether to continue. That made complete sense, because for decades humans were the only ones buying anything on the internet.&lt;/p&gt;

&lt;p&gt;Software does not think like that. An AI agent does not understand why it has to stop working just because a checkout page appeared. It does not care about dashboards, pricing tiers, or billing portals. It only knows it needs a service to finish the job you gave it.&lt;/p&gt;

&lt;p&gt;Imagine asking an AI to build a report on traffic in Lagos. Halfway through, it realises it needs satellite imagery from one company, weather data from another, and map data from somewhere else. It knows exactly what it needs. But instead of continuing, it hits three pricing pages asking it to sign up, pick a plan, enter a card, and create an account. The agent is not stuck because it cannot understand the task. It is stuck because the internet still expects a human to take over.&lt;/p&gt;

&lt;p&gt;That is when I started wondering what it would look like if payments worked the way API requests do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start With Something You Already Understand
&lt;/h2&gt;

&lt;p&gt;Forget APIs for a second. Think about Uber.&lt;/p&gt;

&lt;p&gt;Today, the flow looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You request a ride.&lt;/li&gt;
&lt;li&gt;A driver accepts.&lt;/li&gt;
&lt;li&gt;The ride ends.&lt;/li&gt;
&lt;li&gt;You pay.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now imagine tomorrow. You tell your assistant, "Get me to the airport." It orders the ride for you. Uber replies that the trip costs ₦8,200. Your agent approves the amount and pays. The driver shows up, you travel, and it is done. You never opened the app, and you never tapped confirm.&lt;/p&gt;

&lt;p&gt;Or take something even more ordinary. Your fridge notices you are low on milk, so it places an order, pays for it, and a delivery shows up later that day. You did not open an app, choose a plan, or approve anything in the moment, because you already told it what it was allowed to do.&lt;/p&gt;

&lt;p&gt;Most people do not need to understand HTTP to want that. They just recognise the story. And underneath that story sits a real technical problem: how does the software actually pay for the small pieces it uses along the way? That is where a protocol like x402 comes in.&lt;/p&gt;

&lt;h2&gt;
  
  
  One Answer Is x402
&lt;/h2&gt;

&lt;p&gt;Somewhere in that rabbit hole, I came across x402, and the idea behind it is simpler than the name suggests.&lt;/p&gt;

&lt;p&gt;Picture a convenience store. You pick up a bottle of water, walk to the counter, hear that it costs ₦500, pay, and leave. You did not open an account with the store or subscribe to a monthly plan just to buy one bottle. You paid for exactly what you wanted, at the moment you wanted it.&lt;/p&gt;

&lt;p&gt;x402 tries to make the internet work the same way. Instead of signing up for an API, choosing a plan, entering a card, waiting for a webhook, and copying a key before your first request, your software simply asks for what it needs. The service replies with something like, "This request costs ₦20." Your software pays. The service confirms the payment and returns the data. Payment becomes part of the conversation instead of a separate journey you have to leave and come back from.&lt;/p&gt;

&lt;p&gt;The trick is that x402 does this by reviving an old, unused part of the web. When a client asks for a paid resource, the server answers with an HTTP 402 "Payment Required" response and the price. The client pays, usually in a stablecoin, and retries the same request with proof of payment attached. The server verifies it and returns the resource. The whole exchange happens in a single round trip, with no account and no manual checkout.&lt;/p&gt;

&lt;p&gt;So is x402 just a way for APIs to charge each other? In its current form, mostly yes, and that is the point. It is built for machine-to-machine payments, the tiny purchases software makes while doing its job. This is not a small experiment either. It started at Coinbase in 2025 and now sits under neutral foundation governance, with names like Visa, Mastercard, Stripe, Google, and AWS attached to it. By early 2026, a little over a year after launch, it had already processed more than 165 million transactions, at an average of around thirty cents each. Those are not human purchases. They are machines paying machines, in amounts too small for a card network to bother with.&lt;/p&gt;

&lt;p&gt;Which brings the Uber story back into focus. When you say "get me to the airport," you experience one clean action. Underneath, the agent might be quietly buying live traffic data, route options, and pricing from several services. x402 is what lets those machine-to-machine purchases happen without an account for each one. The part where your actual fare reaches the driver still rides on more familiar rails. The interesting shift is everything happening underneath, out of sight.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Technologies, Same Destination
&lt;/h2&gt;

&lt;p&gt;The more I read, the more I realised x402 is not happening on its own. It is one piece of a much bigger movement, and the other pieces are already here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Account-to-Account (A2A) payments&lt;/strong&gt; move money straight from one bank account to another, skipping the card networks entirely. Nigeria has NIP. India has UPI. Brazil has Pix. Different names, same idea: fewer steps, lower cost, faster settlement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agentic and conversational checkout&lt;/strong&gt; is arriving too, and Nigeria is right in the middle of it. Paystack recently launched Paystack Index, which lets you ask an assistant like Claude or ChatGPT to buy airtime, send money through Zap, or order food on Chowdeck, and the assistant actually completes the transaction instead of just explaining how. What I find most interesting is not the conversation. It is the fine print: you set the permissions and spending limits, and the agent can only act inside them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI agents themselves&lt;/strong&gt; are becoming capable enough to make real decisions on your behalf, which is what makes all of the above suddenly matter.&lt;/p&gt;

&lt;p&gt;On the surface these look like three different projects. One is about APIs, one is about bank transfers, one is about user experience. But I do not think they are solving different problems. I think they are solving different parts of the same problem: how do we make moving money feel as natural as sending a message or making a request?&lt;/p&gt;

&lt;p&gt;For years, the internet became brilliant at moving information. Money never caught up. Every payment still needs approval, a card, an OTP, or a switch to another app. Information evolved much faster than money did, and that gap is finally starting to close.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The next version of the internet isn't about moving more information. It's about moving value.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And I don't think the goal is simply faster payments. The best payment is not the fast one. It is the one you barely notice happened at all.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0a4im9ul29sv7aucg35s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0a4im9ul29sv7aucg35s.png" alt="How autonomous payments could work" width="800" height="1076"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Next Step Is Autonomous Payments
&lt;/h2&gt;

&lt;p&gt;Here is where my own hypothesis starts to form. If payments keep getting simpler and more programmable, we stop asking how people pay and start asking how the internet pays.&lt;/p&gt;

&lt;p&gt;Autonomous payments are not about replacing humans. They are about letting software handle the small decisions that do not really need us anymore. Your phone already does plenty without checking in each time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It downloads updates overnight.&lt;/li&gt;
&lt;li&gt;It backs up your photos.&lt;/li&gt;
&lt;li&gt;It syncs your files across devices.&lt;/li&gt;
&lt;li&gt;It refreshes your mail and messages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You allowed all of that once, and now it simply happens. So why should payments be the one thing that always needs you standing there?&lt;/p&gt;

&lt;p&gt;Imagine you are building an AI travel assistant, and you ask it to plan a trip to Kigali. Along the way it needs weather data, flight prices, hotel availability, maps, and exchange rates. Today it can find those services, but it cannot really pay for them, so everything stalls the moment a checkout page appears.&lt;/p&gt;

&lt;p&gt;Now imagine a different version, where the agent already has permission to spend small amounts on your behalf. It pays as it goes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;₦50 for weather data&lt;/li&gt;
&lt;li&gt;₦100 for richer flight options&lt;/li&gt;
&lt;li&gt;₦20 for maps&lt;/li&gt;
&lt;li&gt;₦80 for hotel availability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then it hands you a finished travel plan, with no interruptions and no ten separate approvals. Just like your phone silently backs up your photos today, your assistant silently pays for the services it needs tomorrow. Not spending money however it likes, but spending it within rules you already agreed to. That difference is the whole thing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqfjwthi063v3p7c11mk1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqfjwthi063v3p7c11mk1.png" alt="The Economy" width="800" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Missing Layer Isn't a Wallet. It's Trust.
&lt;/h2&gt;

&lt;p&gt;At first I thought the answer was machine wallets. Give every agent a wallet, let it hold money, let it pay for whatever it needs. Simple. Except it isn't.&lt;/p&gt;

&lt;p&gt;If you have ever left an EC2 instance running on AWS for a few days, you already know why. The problem was never that AWS let you create resources. The problem was waking up to a bill you did not expect. That is exactly why AWS gives you budgets, alerts, limits, and permissions. It does not stop you from building. It puts guard rails around what can happen.&lt;/p&gt;

&lt;p&gt;Autonomous payments need the same thing. Not unlimited wallets, but programmable trust. You would create a wallet for your agent not by handing it your money, but by handing it rules, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No more than ₦5,000 in a single day.&lt;/li&gt;
&lt;li&gt;No single payment above ₦500 without asking me first.&lt;/li&gt;
&lt;li&gt;Only pay for maps, weather, and travel data. Block every other category.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this design, your agent never talks straight to a payment provider. Every payment passes through a policy engine first, which asks a few plain questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this service trusted?&lt;/li&gt;
&lt;li&gt;Is this within today's budget?&lt;/li&gt;
&lt;li&gt;Has the spending limit already been reached?&lt;/li&gt;
&lt;li&gt;Does this need human approval?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If every answer checks out, the payment goes through. If not, it simply says no. The agent is not deciding how much freedom it has. You decided that before it ever spent a single naira.&lt;/p&gt;

&lt;p&gt;This is the part most conversations skip. Everyone talks about how software &lt;em&gt;can&lt;/em&gt; pay. Very few people talk about how software &lt;em&gt;should be allowed&lt;/em&gt; to pay. And you can already see the serious players betting on the second question. Paystack Index shipped with spending limits on day one, not as a feature to add later. The moment software can spend your money, those limits stop being a setting and become the actual product.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The goal isn't making payments autonomous. It's making autonomous payments trustworthy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  So Where Does Blockchain Fit Into This?
&lt;/h2&gt;

&lt;p&gt;You might have noticed I went this far without leaning on blockchain, and that was on purpose. I don't think blockchain is the main story here. The main story is programmable payments. Blockchain just happens to be one of the first technologies that made them possible.&lt;/p&gt;

&lt;p&gt;Software has exchanged information over the internet for decades. One server asks another for data, and it responds. Money never worked that cleanly, because it dragged along banks, card networks, processors, and settlement windows, all built around a human making the payment. Then blockchains showed up, and for the first time software could hold a wallet, sign a transaction, and send or receive money entirely on its own.&lt;/p&gt;

&lt;p&gt;Whether or not you like crypto, that was a real shift. It was less about inventing new money and more about making money programmable. I think a lot of us misread this during the early Web3 years, when the loud conversation was about decentralizing everything. Underneath the noise, something quieter was happening: storage, identity, and compute were all becoming programmable, and now payments are heading the same way.&lt;/p&gt;

&lt;p&gt;The important part is that this future does not have to belong to blockchain alone. Imagine your bank exposing the same programmable capability. Your agent would not care whether the money moved over a blockchain, an instant bank transfer, or a rail nobody has built yet. It would just ask, "Can I pay for this?" and let the infrastructure sort out the rest. The future belongs to whichever technology makes moving money feel as effortless as moving information.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Internet Is Learning to Exchange Value
&lt;/h2&gt;

&lt;p&gt;When the internet went mainstream, its superpower was sharing information. You could email someone across the world in seconds, search almost anything, and build an app that talked to another app thousands of miles away. Information became effortless to move. Money did not. Even now, paying for something online still feels like briefly leaving the internet, filling a form, switching apps, approving, and waiting before you return to what you were doing.&lt;/p&gt;

&lt;p&gt;I think that is starting to change, and not because of one protocol, one company, or one blockchain. When you zoom out, the pattern is hard to miss. A2A payments make moving money between accounts faster and cheaper. x402 makes payment a native part of a request. Agentic checkout like Paystack Index makes paying feel like a conversation. Capable AI agents tie it all together. They solve different problems, but they push toward the same future, where software can find a service, understand its price, pay for it, get the result, and keep working without waiting for anyone to click a button.&lt;/p&gt;

&lt;p&gt;Honestly, I don't think most people will notice when it happens. Nobody thinks about TCP/IP before sending a message on WhatsApp, and one day we probably won't think about payment rails before software pays for something. It will just happen.&lt;/p&gt;

&lt;p&gt;This is not abstract for me. I have been building an operating agent with a few friends for a hackathon, with a simple goal: give people across Africa access to digital services through something as familiar as making a phone call. As we built it, one question kept surfacing. What happens when the agent needs to pay? Not next week, not after creating an account, but right now, mid-task. That question is what started this whole rabbit hole.&lt;/p&gt;

&lt;p&gt;Maybe the future of payments is not about making people better at paying. Maybe it is about making payments disappear, not because money disappears, but because software becomes trusted enough to handle it for us. I don't know exactly what that looks like yet. Maybe x402 becomes the standard. Maybe banks expose programmable payment APIs. Maybe someone builds something that replaces both.&lt;/p&gt;

&lt;p&gt;What I do know is that the question has changed. For years we asked how people pay on the internet. I think the next decade is about a different one entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does the internet pay itself?&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Over the last few years I've built fintech systems at Skurel, working on fraud detection and OTP infrastructure. I won the GTCO Squad Hackathon, one of the largest in Nigeria, with a product called Recivo. I facilitated Build with Paystack, where I taught more than fifty students how to integrate Paystack and design production-ready payment flows rather than just checkout buttons. And through Koded Labs, I keep shipping products that touch payments in one way or another.&lt;/p&gt;

&lt;p&gt;Lately my curiosity has drifted toward the layer beneath all of that. Not just building things that accept payments, but understanding how money actually moves across the internet, and what changes when software becomes trusted to move it on our behalf.&lt;/p&gt;

&lt;p&gt;If you're building in fintech, infrastructure, or AI, or you just think a lot about where payments are headed, I'd genuinely love to talk.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>stripe</category>
      <category>claude</category>
      <category>automation</category>
    </item>
    <item>
      <title>I Built Beacon: An Open-Source Nervous System for AI Agents</title>
      <dc:creator>koded</dc:creator>
      <pubDate>Sun, 05 Jul 2026 18:36:33 +0000</pubDate>
      <link>https://dev.to/coder0214h/i-built-beacon-an-open-source-nervous-system-for-ai-agents-1847</link>
      <guid>https://dev.to/coder0214h/i-built-beacon-an-open-source-nervous-system-for-ai-agents-1847</guid>
      <description>&lt;p&gt;Over the past few months, AI agents have gone from being little experiments to becoming actual coworkers. They're writing code, browsing the web, answering emails, generating reports, and orchestrating workflows that would normally require entire teams. The more I thought about that future, the more one question kept bothering me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens when there aren't ten AI agents? What happens when there are fifty thousand?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Everyone loves talking about what AI agents can do, but very few conversations revolve around what happens behind the scenes once they begin operating at scale. Every one of those agents continuously changes state. They start tasks, finish them, fail unexpectedly, retry operations, wait for resources, and move through dozens of transitions during their lifetime. Every transition is an event that needs to be captured, observed, and sometimes persisted forever.&lt;/p&gt;

&lt;p&gt;That sounds simple until thousands of agents decide to do it at the exact same moment.&lt;/p&gt;

&lt;p&gt;At that point, your application isn't just handling API requests anymore. It's trying to process an overwhelming stream of concurrent events without losing information, without destroying database performance, and without making users stare at a dashboard that updates several seconds behind reality.&lt;/p&gt;

&lt;p&gt;That became the problem I wanted to solve.&lt;/p&gt;




&lt;p&gt;I had recently started reading &lt;em&gt;Designing Data-Intensive Applications&lt;/em&gt;, a book that has quickly become one of my favourite engineering books. Rather than reading it like a textbook, I wanted to approach it differently. Every chapter became a challenge to build something inspired by the ideas I had just learned.&lt;/p&gt;

&lt;p&gt;Instead of simply reading about distributed systems, I wanted to experience them.&lt;/p&gt;

&lt;p&gt;So I asked Claude to generate a realistic system design interview question.&lt;/p&gt;

&lt;p&gt;It came back with this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;How do you ingest, strictly order, and visualize concurrent state transitions from 50,000 autonomous AI agents executing distributed workflows in real time, ensuring zero dropped events and sub-second dashboard updates without overwhelming your persistent audit database?&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I stared at the question for a while.&lt;/p&gt;

&lt;p&gt;Then I grabbed a pen and paper.&lt;/p&gt;




&lt;p&gt;Before writing a single line of code, I sketched the architecture.&lt;/p&gt;

&lt;p&gt;That habit has become one of the biggest improvements in my engineering journey. I rarely jump straight into an editor anymore because architecture forces you to think about constraints before implementation. It exposes bottlenecks early, encourages better questions, and often removes complexity before it ever reaches the codebase.&lt;/p&gt;

&lt;p&gt;As I continued sketching, one realization became obvious.&lt;/p&gt;

&lt;p&gt;The dashboard and the database had completely different priorities.&lt;/p&gt;

&lt;p&gt;A live dashboard cares about speed. It wants updates almost immediately because users expect to watch agents move through their workflows in real time. A database, however, cares about durability and efficiency. It doesn't benefit from writing every single event individually if those writes can instead be grouped together without losing correctness.&lt;/p&gt;

&lt;p&gt;Trying to satisfy both with the same processing pipeline felt like a mistake.&lt;/p&gt;

&lt;p&gt;So I separated them.&lt;/p&gt;




&lt;p&gt;Beacon sits between AI agents and every downstream system.&lt;/p&gt;

&lt;p&gt;Incoming events are accepted immediately by lightweight gateway services before being published into Kafka. Rather than sending every event directly to a database, Kafka becomes the central event log that absorbs bursts of traffic while preserving ordering for each individual agent.&lt;/p&gt;

&lt;p&gt;That ordering is surprisingly simple.&lt;/p&gt;

&lt;p&gt;Every event is produced using the agent's identifier as the Kafka message key. Kafka guarantees ordering inside each partition, so every event belonging to the same agent always arrives in the order it was produced. No expensive sorting logic is required later because the ordering guarantee already exists inside the messaging system itself.&lt;/p&gt;

&lt;p&gt;Sometimes the simplest decisions end up removing entire categories of complexity.&lt;/p&gt;




&lt;p&gt;Once events enter Kafka, the pipeline splits into two completely independent consumer groups.&lt;/p&gt;

&lt;p&gt;The first consumer exists solely for the live dashboard. Its responsibility is simple: consume new events and immediately broadcast them to connected browsers using WebSockets. Users watching the dashboard see state transitions appear almost instantly, regardless of what is happening elsewhere in the system.&lt;/p&gt;

&lt;p&gt;The second consumer has a completely different job.&lt;/p&gt;

&lt;p&gt;Instead of prioritizing speed, it prioritizes efficiency. Events are accumulated in memory before being written to persistent storage in batches. This dramatically reduces the number of database transactions while maintaining a complete audit history. Offsets are only committed after a successful batch write, ensuring that failures never silently discard data.&lt;/p&gt;

&lt;p&gt;Neither consumer blocks the other.&lt;/p&gt;

&lt;p&gt;The dashboard remains responsive even if persistence slows down, and the database continues writing efficiently even during bursts of activity.&lt;/p&gt;

&lt;p&gt;That separation became the core architectural idea behind Beacon.&lt;/p&gt;




&lt;p&gt;While building the project, I intentionally chose technologies that emphasized the architectural ideas rather than production complexity.&lt;/p&gt;

&lt;p&gt;Redpanda provides a lightweight Kafka-compatible broker that is incredibly easy to run locally. SQLite keeps persistence simple while allowing the storage layer to be swapped for PostgreSQL later without changing the overall design. FastAPI made building independent services straightforward, while React handled the live dashboard that visualizes everything happening inside the system.&lt;/p&gt;

&lt;p&gt;The result is a project that demonstrates distributed event processing without requiring an entire Kubernetes cluster to understand.&lt;/p&gt;




&lt;p&gt;Beacon also reminded me that system design is far more enjoyable when ideas become software.&lt;/p&gt;

&lt;p&gt;Reading about partitions, event streams, consumer groups, batching strategies, and ordering guarantees is valuable, but seeing those concepts come alive inside a running system changes how you understand them. Suddenly they stop being interview buzzwords and become practical engineering tools for solving real problems.&lt;/p&gt;

&lt;p&gt;That has become my favourite way to learn.&lt;/p&gt;

&lt;p&gt;Read something.&lt;/p&gt;

&lt;p&gt;Think about it.&lt;/p&gt;

&lt;p&gt;Build it.&lt;/p&gt;

&lt;p&gt;Break it.&lt;/p&gt;

&lt;p&gt;Understand it.&lt;/p&gt;




&lt;p&gt;Beacon is completely open source because I wanted it to become more than just another portfolio project. Whether someone wants to learn distributed systems, monitor their own AI agents, experiment with Kafka, or contribute improvements, I hope the project becomes a useful starting point.&lt;/p&gt;

&lt;p&gt;If you've ever wanted to understand how large-scale event pipelines work without reading thousands of lines of production code, I hope Beacon gives you that opportunity.&lt;/p&gt;

&lt;p&gt;I'll continue building projects inspired by the ideas I learn, documenting the process, and sharing both the successes and the mistakes along the way.&lt;/p&gt;

&lt;p&gt;Because at the end of the day, that's how I learn best.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;⭐ GitHub:&lt;/strong&gt; &lt;a href="https://github.com/Koded0214h/Beacon" rel="noopener noreferrer"&gt;&lt;em&gt;Beacon&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📺 Full build video:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=_SybyOYfqFI" rel="noopener noreferrer"&gt;&lt;em&gt;I Built a System That Can Handle 50,000 AI Agents (Open Source)&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture Diagram:&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7hug70os2yfxorwes620.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7hug70os2yfxorwes620.png" alt="Beacon Architecture" width="800" height="635"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How Building Antlers Changed the Way I Think About Software</title>
      <dc:creator>koded</dc:creator>
      <pubDate>Sun, 05 Jul 2026 18:29:36 +0000</pubDate>
      <link>https://dev.to/coder0214h/how-building-antlers-changed-the-way-i-think-about-software-23dh</link>
      <guid>https://dev.to/coder0214h/how-building-antlers-changed-the-way-i-think-about-software-23dh</guid>
      <description>&lt;p&gt;For a long time, most of the things I built looked similar. A user opens an application, clicks a button, a request is sent to the backend, the backend processes it, stores some data, and returns a response. Whether it was a booking system, a social platform, or another web application, the pattern was always familiar. I was focused on building products that users could interact with directly.&lt;/p&gt;

&lt;p&gt;When I decided to start learning system design, I promised myself I wouldn't do it the way I usually learn new topics. Instead of spending weeks watching videos or reading articles before writing any code, I wanted to learn by building something that forced me to think differently. That decision eventually became &lt;a href="https://github.com/Koded0214h/Antlers" rel="noopener noreferrer"&gt;&lt;strong&gt;Antlers&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;At first, I thought I was building a real-time heatmap. Looking back now, I realize that the heatmap was probably the least interesting part of the project. What I was really building was the infrastructure required to continuously process thousands of events, transform them into something meaningful, and deliver those insights to users with almost no delay.&lt;/p&gt;

&lt;p&gt;The original problem was inspired by something I imagined happening inside a company like Glovo or Uber Eats. Suppose the marketing or operations team wants to display a live heatmap showing where orders are currently being placed across a city. From a customer's perspective, this creates excitement and social proof by showing that the platform is active. From an operations perspective, it provides immediate visibility into where demand is increasing.&lt;/p&gt;

&lt;p&gt;The obvious implementation would be to save every driver location or order event to the database and have the frontend periodically request the latest data. That approach works when there are only a handful of users. However, once you begin thinking about thousands of drivers sending location updates every few seconds, it becomes clear that constantly writing to the database and repeatedly querying it is an expensive way to answer a simple question: &lt;strong&gt;"Where is activity happening right now?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That realization completely changed the way I approached the project.&lt;/p&gt;

&lt;p&gt;Instead of treating the database as the center of the system, I started thinking about the movement of data itself. A driver's location is not just something that should be stored forever. It is first an event. Events arrive, they are processed, transformed into useful information, and only then do you decide what is worth storing permanently. This small change in perspective led me toward an event-driven architecture.&lt;/p&gt;

&lt;p&gt;Rather than processing everything inside the API, incoming location updates are immediately sent to Kafka, allowing the API to remain responsive regardless of how much traffic it receives. Dedicated consumers then process those events and aggregate them into geohash buckets inside Redis. Instead of broadcasting thousands of individual GPS coordinates to connected clients, the backend only sends aggregated density information through WebSockets, allowing the frontend to reconstruct the heatmap efficiently.&lt;/p&gt;

&lt;p&gt;One of the most interesting lessons from this architecture was understanding that not every piece of information deserves to live in a relational database. Driver locations are constantly changing. By the time one coordinate has been written to disk, the driver may already be somewhere else. Redis turned out to be a much better fit because it allows the system to maintain an in-memory representation of what the city looks like &lt;em&gt;right now&lt;/em&gt;, rather than what it looked like several seconds ago.&lt;/p&gt;

&lt;p&gt;As the project evolved, I started asking myself another question. If the system already knows where drivers are and how demand changes over time, why should it only describe the present? Why couldn't it make reasonable predictions about the immediate future?&lt;/p&gt;

&lt;p&gt;My first thought was to integrate an external AI API, but the more I considered that approach, the less it made sense. Continuously sending snapshots of operational data to an external model would introduce additional latency, recurring costs, and API rate limits. More importantly, the prediction problem itself wasn't particularly complicated. I wasn't trying to generate natural language or summarize documents. I simply wanted to estimate how demand was changing over time.&lt;/p&gt;

&lt;p&gt;Instead, I began experimenting with a lightweight regression model trained on periodic snapshots taken directly from Redis. Every few minutes, the system records the current state of activity across the city, allowing the model to gradually learn how demand evolves throughout the day. The longer the system runs, the more historical context it accumulates, all without relying on any external AI provider.&lt;/p&gt;

&lt;p&gt;The biggest takeaway from building Antlers wasn't learning Kafka, Redis, or WebSockets individually. It was realizing that system design is much less about choosing technologies and much more about deciding &lt;strong&gt;where responsibility should live&lt;/strong&gt;. Once each component has a single responsibility, ingesting events, buffering traffic, aggregating state, broadcasting updates, or making predictions, the overall system becomes much easier to reason about and extend.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>learning</category>
      <category>showdev</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Removing the Bare Minimum Limiter — Part 2</title>
      <dc:creator>koded</dc:creator>
      <pubDate>Mon, 13 Apr 2026 22:20:08 +0000</pubDate>
      <link>https://dev.to/coder0214h/removing-the-bare-minimum-limiter-part-2-4ah</link>
      <guid>https://dev.to/coder0214h/removing-the-bare-minimum-limiter-part-2-4ah</guid>
      <description>&lt;p&gt;&lt;em&gt;Week of chaos, exams, a hackathon I almost didn't attend, and somehow, a W.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;There's this thing that happens to me at hackathons.&lt;/p&gt;

&lt;p&gt;I show up, I build, we lose. Or I don't show up, and somehow, we win. It's happened enough times that it stopped being a coincidence and started feeling like a curse. Like my physical presence was the variable that broke everything.&lt;/p&gt;

&lt;p&gt;So when the Harvard Health Hackathon landed on the same week as my university exams; same area, same Lagos heat, I made peace with not going. I told my team I'd be around if they needed me. I wasn't planning to walk through those doors.&lt;/p&gt;

&lt;p&gt;Then I walked through those doors.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcn804ypsbk2zcyhsmts.jpg" alt="My conversation with a friend few hours to the pitch" width="800" height="421"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  The Last One In
&lt;/h2&gt;

&lt;p&gt;I was the last participant to arrive.&lt;/p&gt;

&lt;p&gt;My team had been there for a while. The energy was already off, deployment issues, things not connecting, the usual chaos that shows up right before a deadline. I dropped my bag and started asking questions.&lt;/p&gt;

&lt;p&gt;The main problem: we couldn't deploy the blockchain anywhere. Our backend needed to ping it, and a free Render server couldn't handle it. We were tight on time, no budget for a quick VPS, no clean solution in sight.&lt;/p&gt;

&lt;p&gt;I sat with it for a minute.&lt;/p&gt;

&lt;p&gt;Then: &lt;em&gt;run everything on my laptop.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Backend. Blockchain. Frontend. All of it local, on my machine, turned into a server. Tunnel only the frontend through ngrok. Print the prototype. Walk into the pitch room.&lt;/p&gt;

&lt;p&gt;It worked.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wa921obur7a030xd16v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3wa921obur7a030xd16v.png" alt="All services live" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  PharmChain
&lt;/h2&gt;

&lt;p&gt;The product was &lt;strong&gt;PharmChain:&lt;/strong&gt; a blockchain-based pharmaceutical supply chain tracker built for the Nigerian healthcare system. Counterfeit drugs are a real, deadly problem here. PharmChain puts every drug on-chain, traceable from manufacturer to patient, unforgeable.&lt;/p&gt;

&lt;p&gt;It was the kind of idea that makes judges lean forward.&lt;/p&gt;

&lt;p&gt;And when my teammate stood up to pitch; he was &lt;em&gt;professional&lt;/em&gt;. Clean slides, confident delivery, answered every question. The judges didn't just clap. They offered to put in a good word with the managing directors of companies in the space.&lt;/p&gt;

&lt;p&gt;I was sitting in the back trying not to manifest a loss.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Announcement
&lt;/h2&gt;

&lt;p&gt;You know that specific kind of fear; where you want something badly enough that your body starts preparing for disappointment before the results are even out?&lt;/p&gt;

&lt;p&gt;That was me. Sitting there. Running the mental math on every hackathon I'd physically attended.&lt;/p&gt;

&lt;p&gt;They called our name.&lt;/p&gt;

&lt;p&gt;I broke the loop.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxz5halqu9a7th6ihvmx.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxz5halqu9a7th6ihvmx.JPG" alt="The winning team" width="799" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Everything Else That Happened This Week
&lt;/h2&gt;

&lt;p&gt;Because apparently one thing isn't enough:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exams.&lt;/strong&gt; Multiple. Same week. Still standing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Leetcode Blind 75.&lt;/strong&gt; I'm at 40/75 in 13 days. Doing at least 2 problems daily, mastering patterns, not just solving, understanding &lt;em&gt;why&lt;/em&gt; the solution works. In my free time I'm watching coding interview breakdowns on YouTube and running mock interviews. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fog of War.&lt;/strong&gt; This started as a hackathon submission. I was literally one minute late to submit. But I'm still building it. Full sprite system, better controls, tighter game mechanics. This isn't a hackathon project anymore. This is a game I'm building until it's actually peak. Catch the vibe on X: &lt;a href="https://x.com/coder0214h" rel="noopener noreferrer"&gt;https://x.com/coder0214h&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stackd with Koded.&lt;/strong&gt; Week 2 with the first paying cohort. People are showing up. That means something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5 rejection letters.&lt;/strong&gt; They came in a batch one morning. Bending Spoons, Twilio, Remote, a couple others. It stings, I won't pretend it doesn't. But I applied, I got feedback, I improved the resume, I kept moving. That's the only response that makes sense.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VC conversations from the hackathon.&lt;/strong&gt; The judges' interest in PharmChain opened doors I didn't expect. More on this as it develops.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Pattern
&lt;/h2&gt;

&lt;p&gt;I used to think my presence at hackathons was the problem. Ten-plus events of building and losing while sitting right there, it messes with your head.&lt;/p&gt;

&lt;p&gt;But I think the real variable was never me being there or not. It was whether I showed up &lt;em&gt;ready&lt;/em&gt;. Whether I had something to give when things broke.&lt;/p&gt;

&lt;p&gt;This week, things broke. I fixed them. We won.&lt;/p&gt;

&lt;p&gt;That's the limiter coming off, not confidence, not motivation. Just doing the work until you're the person the team calls when it matters.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;More next week. Stay Cracked.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;— Köded&lt;/em&gt;&lt;/p&gt;

</description>
      <category>community</category>
      <category>devjournal</category>
      <category>learning</category>
      <category>watercooler</category>
    </item>
    <item>
      <title>My Last Few Months</title>
      <dc:creator>koded</dc:creator>
      <pubDate>Sat, 04 Apr 2026 23:24:54 +0000</pubDate>
      <link>https://dev.to/coder0214h/my-last-few-months-306p</link>
      <guid>https://dev.to/coder0214h/my-last-few-months-306p</guid>
      <description>&lt;p&gt;Nobody told me that doing everything at once was going to feel like this.&lt;/p&gt;

&lt;p&gt;Exams last month. A hackathon deadline this week. A full technical lead role at Teenovatex. A bootcamp I launched from scratch. And somewhere in between all of that, I wrote a book.&lt;/p&gt;

&lt;p&gt;This is what the last few months have actually looked like for me. Not the highlight reel. The whole thing.&lt;/p&gt;

&lt;p&gt;I am Koded. I build things. Sometimes too many things at the same time. And somewhere in the chaos of this season I stumbled into the most practical education of my life — one that no classroom, no book, and no two hour YouTube video could have given me.&lt;/p&gt;

&lt;p&gt;It started with a realization that hit me harder than I expected. I had been running on what I now call the bare minimum limiter. A quiet mental filter that killed high-effort ideas before they ever had a chance to breathe. Anything that felt like too much got scaled down automatically. I didn't even notice I was doing it.&lt;/p&gt;

&lt;p&gt;When I finally saw it clearly I made a decision. April would be different. No limiter. Full throttle.&lt;/p&gt;

&lt;p&gt;So here is what the last few months actually looked like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I built Janus.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Janus is an AI-native execution framework I built for the Ranger Hackathon on Solana. The idea was simple but the execution was anything but — an autonomous trading bot that manages Delta-Neutral strategies on Drift Protocol while enforcing on-chain compliance through a smart contract policy engine and MPC sharded key security via the Ika Network.&lt;/p&gt;

&lt;p&gt;What that means in plain English — most AI trading bots require full private key access, which is terrifying from a security standpoint. Janus splits the key, enforces spend limits and protocol rules on-chain, and requires an atomic compliance check before any trade executes. The AI is an operator, not an owner. It literally cannot move funds without permission from the on-chain judge.&lt;/p&gt;

&lt;p&gt;Four layers. Python and Gemini for strategy. Drift V2 and Jupiter for trading. Solana and Anchor for enforcement. Ika Network for security. Built while I had exams. Built while I was launching a bootcamp. Built because removing the limiter meant I stopped asking myself if now was a good time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07j08639rsvky7iaglaj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07j08639rsvky7iaglaj.png" alt=" " width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I led at Teenovatex.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As Technical Lead I have been making architecture decisions, running developer sessions, and making sure we are building things that actually matter. The role has taught me something I didn't expect — leadership is less about knowing the most and more about creating the conditions for other people to do their best work. That lesson has shown up everywhere else in my life since.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I launched Stackd with Koded.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Four days. That is how long it took to go from idea to paying students. Flier, pricing, copy, registration flow, WhatsApp community , built in a weekend. Then we hosted a free live session at Teenovatex. Thirty plus people showed up. We had a hostess, a TX rep, structured slides, a full script, interactive polls, real conversations. We broke down every major tech track in plain English and let people ask anything.&lt;/p&gt;

&lt;p&gt;The response was something I didn't fully anticipate. People didn't just find it useful. They felt seen by it. Because we talked about the real stuff, tutorial hell, not knowing where to start, being scared that tech is too hard, watching everyone else figure it out while you're still standing still.&lt;/p&gt;

&lt;p&gt;We now have paying students across all six tracks. More coming.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivc3xh7yjyzrr27w3rp4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivc3xh7yjyzrr27w3rp4.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I wrote a book.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After the session I sat down and wrote The Cracked Dev Playbook. Thirteen chapters. The entire framework we taught in the session, which track is right for you, what your first thirty days look like, how to build a resume that actually gets interviews, why YouTube tutorials are failing you, and what Stackd is here to do about all of it.&lt;/p&gt;

&lt;p&gt;It got over 100 reads in the first few hours. From a book I wrote in one sitting. After a hackathon build. After a live session. After exams.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz09w02w9pewdwu7vkqrc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz09w02w9pewdwu7vkqrc.png" alt=" " width="800" height="1192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here is what I actually learned from all of it. Not from reading. From doing.&lt;/p&gt;

&lt;p&gt;Warm leads go cold in five minutes. The moment someone says they're interested is the moment to act. Waiting even an hour changes the energy completely.&lt;/p&gt;

&lt;p&gt;Free value converts better than everything else. The free session brought in more students than every paid post combined. Give something real first. Trust does the selling for you.&lt;/p&gt;

&lt;p&gt;People buy from people. Every conversion happened in a direct conversation. Not from a caption. Not from a flier. From me talking to a person like a human being.&lt;/p&gt;

&lt;p&gt;Structure beats hustle. A clear offer, a clear price, and a frictionless way to register matters more than how loud you shout or how hard you grind.&lt;/p&gt;

&lt;p&gt;Your network is infrastructure. The senior developers in my circle are now tutoring on the platform. The resources around you are almost always being underused.&lt;/p&gt;

&lt;p&gt;And the biggest lesson of all — the bare minimum is a personality, not a strategy. Once it becomes your default you stop seeing the ceiling because you've convinced yourself the floor is enough.&lt;/p&gt;

&lt;p&gt;I am a few months into the most real education of my life. No campus. No lecturer. No exam; well, except the actual exams I was also sitting 😂. Just real decisions with real consequences and lessons that stick because they cost something.&lt;/p&gt;

&lt;p&gt;I don't know exactly where this goes. But I know I'm not doing the bare minimum anymore.&lt;/p&gt;

&lt;p&gt;And that changes everything. &lt;/p&gt;

</description>
      <category>career</category>
      <category>devjournal</category>
      <category>learning</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
