<?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 EZENWA CHRISTIAN CHIMEREMEZE on Medium]]></title>
        <description><![CDATA[Stories by EZENWA CHRISTIAN CHIMEREMEZE on Medium]]></description>
        <link>https://medium.com/@ezenwachristianchimeremeze?source=rss-5c5e4b2261b3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mllxqrH5eYabVSNTbCljRg.png</url>
            <title>Stories by EZENWA CHRISTIAN CHIMEREMEZE on Medium</title>
            <link>https://medium.com/@ezenwachristianchimeremeze?source=rss-5c5e4b2261b3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:37:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ezenwachristianchimeremeze/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[Designing Reliable Background Jobs in Python: Retries, Idempotency, and Failure Recovery]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/designing-reliable-background-jobs-in-python-retries-idempotency-and-failure-recovery-7edde3ac176e?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7edde3ac176e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 22:20:41 GMT</pubDate>
            <atom:updated>2026-11-26T22:20:41.686Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vNPzyIJXthS_DP9uCSLXHQ.png" /></figure><p>Most apps don&#39;t do everything inside a single request. Sending an email, processing an upload, generating a report, syncing with another service, crunching a big dataset — all of that takes time. If you try to do it all inside an HTTP request, responses get slow, servers get overloaded, and things start breaking.</p><p>That&#39;s why we move slow work into the background.</p><p>But here&#39;s the catch: moving work to the background doesn&#39;t automatically make it reliable. Workers crash. Networks time out. External services go down. And sometimes a task runs twice.</p><p>So if you&#39;re building background jobs in Python, you have to plan for failure from the start.</p><p>In this article, I&#39;ll walk through how to design background jobs that actually hold up — how to retry sensibly, how to stop duplicate work with idempotency, and how to recover when things go wrong.</p><p><strong>1. Understanding Background Processing</strong></p><p>Background processing just means doing work outside the user&#39;s immediate request.</p><p>Say your app lets users generate PDF reports. The naive way looks like this:</p><h3>@app.post(&quot;/generate-report&quot;)<br>async def generate_report():<br> report = generate_large_pdf()<br> return {&quot;report&quot;: report}</h3><p>That works until report generation takes 30 seconds, or two minutes. The user is left waiting. And if the request times out, it fails even though the work was still happening.</p><p>A better approach is to split submission from execution. You accept the request, create a job, return a task ID, and let a worker handle the heavy lifting.</p><p>It usually goes like this:</p><p><strong>1. Client submits a request.<br>2. App validates it.<br>3. App creates a background task.<br>4. Task goes into a queue.<br>5. A worker picks it up.<br>6. Worker runs the operation.<br>7. App records success or failure.<br>8. Client can check the task</strong> status.</p><p>You get faster responses, and your API isn&#39;t stuck waiting on slow work.</p><p><strong>2. Choosing the Right Background</strong> <em>Processing Architecture</em></p><p>Python gives you a few options. Which one you pick depends on how important the task is and how much infrastructure you want to manage.</p><p>In-process background tasks</p><p>For simple stuff, you can use what&#39;s built into your framework. FastAPI has BackgroundTasks:</p><h3>from fastapi import FastAPI, BackgroundTasks</h3><h3>app = FastAPI()</h3><h3>def send_notification(email: str):<br> print(f&quot;Sending notification to {email}&quot;)</h3><h3>@app.post(&quot;/notify&quot;)<br>async def notify_user(background_tasks: BackgroundTasks):<br> background_tasks.add_task(<br> send_notification,<br> &quot;developer@example.com&quot;<br> )</h3><h3>return {<br> &quot;message&quot;: &quot;Notification scheduled&quot;<br> }</h3><p>This is fine for lightweight, non-critical tasks.</p><p>But it&#39;s not a real job queue. If the process restarts, the task is gone. There&#39;s no persistent storage, no real recovery, no distributed workers. For anything important, you want something more durable.</p><p>Distributed task queues</p><p>A distributed queue separates submitting a job from running it.</p><p><strong>Common Python options:</strong></p><ul><li><strong>Celery:</strong> The heavyweight option. Multiple workers, brokers, retries, scheduling.</li><li><strong>RQ: Redis-backed</strong>, much simpler to reason about.</li><li><strong>Dramatiq</strong>: Built around actors and middleware, good for message processing.</li></ul><p>A typical setup looks like this:</p><p><strong>Client</strong><br> |<br> v<br> <strong>FastAPI Backend</strong><br> |<br> v<br> <strong>Task Submission</strong><br> |<br> v<br> <strong>Message Broker</strong><br> |<br> +-----+-----+<br> | |<br> v v<br> <strong>Worker 1 Worker 2</strong><br> | |<br> +-----+-----+<br> |<br> v<br><strong> External Services</strong><br> |<br> v<br> <strong>Result Database</strong></p><p>Backend submits jobs, broker holds them, workers do the work. You can scale API servers and workers separately.</p><p>The trade-off is more infrastructure to monitor and maintain.</p><p><strong>3. Why Background Jobs Fail</strong></p><p>Before you fix reliability, you need to know how jobs actually fail.</p><p>Network failures</p><p>Your worker calls an external API. The API is down for a minute, the connection times out, the network blips.</p><p>Worker termination</p><p>A worker dies mid-task because of a deploy, an OOM kill, a server restart, or a bug.</p><p>External service failures</p><p>A payment provider rejects a request. An email service is having a bad day. A cloud provider throttles you.</p><p>Duplicate execution</p><p>A worker finishes the work but crashes before acknowledging the message. The broker hands the same message to another worker, and it runs again.</p><p>Invalid task data</p><p>Some failures aren&#39;t temporary. The data is bad, the resource doesn&#39;t exist, the business rule is violated. Retrying that 10 times won&#39;t help.</p><p>A reliable system has to tell the difference between &quot;<strong>try again later</strong>&quot; and &quot;<strong>this will never work.&quot;</strong></p><p><strong><em>4. Implementing Retry Mechanisms</em></strong></p><p>Retries let a worker try again when the failure is temporary. If an external service hiccups, wait a bit and try again.</p><p>But retrying immediately is usually a bad idea.</p><p>Imagine a service is already overloaded. If hundreds of workers all retry at once, you just make the outage worse. That&#39;s a retry storm.</p><p>Exponential backoff</p><p>The fix is to wait longer after each failure.</p><h3>delay = min(max_delay, base_delay _ 2^attempt)</h3><h3>With a base delay of 2 seconds:</h3><h3>Attempt| Approximate delay<br>1| 2 seconds<br>2| 4 seconds<br>3| 8 seconds<br>4| 16 seconds<br>5| 32 seconds</h3><p>The max delay stops it growing forever.</p><p>Adding jitter</p><p>Jitter adds randomness so workers don&#39;t all retry at the exact same moment.</p><h3>import random</h3><h3>def calculate_retry_delay(<br> attempt: int,<br> base_delay: float = 2.0,<br> max_delay: float = 60.0<br>) -&gt; float:<br> exponential_delay = min(<br> max_delay,<br> base_delay _ (2 *_ attempt)<br> )</h3><h3>return http://random.uniform(0, exponential_delay)</h3><p>This picks a random delay between 0 and the exponential limit. It spreads the retry traffic out.</p><p>Implementing retries with asyncio</p><p>For async Python, you can write a small retry helper:</p><h3>import asyncio<br>import random<br>from http://collections.abc import Awaitable, Callable<br>from typing import TypeVar</h3><h3>T = TypeVar(&quot;T&quot;)</h3><h3>async def retry_operation(<br> operation: Callable[[], Awaitable[T]],<br> max_attempts: int = 5,<br> base_delay: float = 2.0,<br> max_delay: float = 60.0<br>) -&gt; T:</h3><h3>for attempt in range(max_attempts):<br> try:<br> return await operation()</h3><h3>except (TimeoutError, ConnectionError):<br> if attempt == max_attempts - 1:<br> raise</h3><h3>exponential_delay = min(<br> max_delay,<br> base_delay _ (2 ** attempt)<br> )</h3><h3>delay = http://random.uniform(<br> 0,<br> exponential_delay<br> )</h3><h3>await http://asyncio.sleep(delay)</h3><h3>raise RuntimeError(&quot;Operation failed&quot;)</h3><p>Example usage:</p><h3>import httpx</h3><h3>async def fetch_external_data():<br> async with http://httpx.AsyncClient(<br> timeout=10.0<br> ) as client:</h3><h3>response = await http://client.get(<br> &quot;https://api.example.com/data&quot;<br> )</h3><h3>http://response.raise_for_status()</h3><h3>return http://response.json()</h3><h3>async def main():<br> result = await retry_operation(<br> fetch_external_data,<br> max_attempts=4<br> )</h3><p>print(result)</p><p>In production, you still have to decide:</p><ul><li><strong>Which HTTP status codes are worth retrying?</strong></li><li><strong>Should you retry auth failures? Usually no.</strong></li><li><strong>What about rate limits?</strong></li><li><strong>Does the service send a Retry-After header?</strong></li><li><strong>Is this operation even safe to repeat?</strong></li></ul><p>Don&#39;t retry everything. Retry with intent.</p><p><strong>5. Understanding Idempotency</strong></p><p>Retries create a new problem: duplicate execution.</p><p>Say a background task creates an invoice. The worker creates it, but then loses connection before acknowledging the message. The broker redelivers it. Without protection, you now have two invoices for one request.</p><p>That&#39;s where idempotency comes in.</p><p>An operation is idempotent if running it again with the same input gives you the same result as running it once — no duplicate side effects.</p><p>Using idempotency keys</p><p>An idempotency key is a unique ID for one logical operation.</p><h3>import uuid</h3><h3>def create_idempotency_key() -&gt; str:<br> return str(uuid.uuid4())</h3><p>You generate the key when the operation is first submitted, and you reuse that same key for every retry.</p><p>A simple table might look like this:</p><h3>CREATE TABLE background_jobs (<br> id UUID PRIMARY KEY,<br> idempotency_key VARCHAR(255) UNIQUE NOT NULL,<br> status VARCHAR(30) NOT NULL,<br> result JSONB,<br> created_at TIMESTAMPTZ DEFAULT NOW()<br>);</h3><p>The unique constraint stops you creating two job records with the same key.</p><p>But that&#39;s only half of it. You also have to make sure the business operation itself can&#39;t happen twice:</p><h3>def process_invoice(<br> idempotency_key: str,<br> invoice_data: dict<br>):<br> existing = find_invoice_by_key(<br> idempotency_key<br> )</h3><h3><strong>if existing:</strong><br> return existing</h3><h3>return create_invoice(<br> invoice_data,<br> idempotency_key=idempotency_key<br> )</h3><p>Those functions are placeholders — you&#39;d implement them with proper transaction handling.</p><p>For real protection, enforce the key with a database unique constraint, and make the lookup + creation atomic. That matters a lot when multiple workers could process related messages at the same time.</p><p>Idempotency is not exactly-once execution</p><p>This is an important distinction. Most distributed systems give you at-least-once delivery. A task might arrive more than once.</p><p>Instead of pretending it will run exactly once, design it so running twice doesn&#39;t cause duplicate business effects. That&#39;s the practical way to think about reliability.</p><p><strong>6. Managing Task States</strong></p><p>Your system should keep a clear record of where each task is.</p><p>A basic model:</p><h3>State| Meaning<br>Pending| Task has been submitted but not started<br>Running| A worker is processing the task<br>Completed| Processing finished successfully<br>Failed| Processing stopped after an unrecoverable error<br>Retrying| Another attempt is scheduled<br>Cancelled| Task was cancelled before completion</h3><p>That makes monitoring and debugging so much easier.</p><p>For example:</p><h3>from datetime import datetime<br>from enum import Enum<br>from pydantic import BaseModel</h3><h3>class JobStatus(str, Enum):<br> PENDING = &quot;pending&quot;<br> RUNNING = &quot;running&quot;<br> RETRYING = &quot;retrying&quot;<br> COMPLETED = &quot;completed&quot;<br> FAILED = &quot;failed&quot;<br> CANCELLED = &quot;cancelled&quot;</h3><h3>class JobRecord(BaseModel):<br> job_id: str<br> status: JobStatus<br> attempts: int = 0<br> error_message: str | None = None<br> created_at: datetime<br> updated_at: datetime</h3><p>This is just a data model. In production, you&#39;d store it in durable storage and be careful about how state transitions happen.</p><p><strong>7. Recovering from Failed Jobs</strong></p><p>Retries help with temporary failures, but they shouldn&#39;t run forever. You need a clear plan for when a job just won&#39;t succeed.</p><p>Maximum retry limits</p><p>Every task needs a retry limit. Once you hit it, stop retrying automatically and record the final failure. Otherwise permanently failing jobs will eat your resources forever.</p><p>Dead-letter queues</p><p>A dead-letter queue holds messages that failed even after retries.</p><p>Instead of vanishing silently, failed jobs go somewhere you can actually look at them. You can check the error, figure out what went wrong, and decide if it should be fixed and resubmitted.</p><p>Failure classification</p><p>It helps to split errors into two buckets.</p><p>Transient failures:</p><ul><li><strong>Temporary network interruptions.</strong></li><li><strong>Service unavailability.</strong></li><li><strong>Request timeouts.</strong></li><li><strong>Temporary rate limiting</strong>.</li></ul><h3>Permanent failures:</h3><ul><li><strong>Invalid input.</strong></li><li><strong>Missing required resources.</strong></li><li><strong>Unsupported operations.</strong></li><li><strong>Auth errors that need human intervention.</strong></li></ul><p>Retry the transient ones. Record and surface the permanent ones — don&#39;t keep hammering them.</p><p>Graceful worker shutdown</p><p>Workers need to handle shutdowns well too.</p><p>During a deploy, a worker might get a termination signal mid-task. Ideally it either finishes within a grace period, or the task can be safely redelivered.</p><p>Exactly how you do that depends on your queue, your ack settings, and your worker setup.</p><p><strong>8. Observability: Knowing What Your Workers Are Doing</strong></p><p>A job that fails silently is a nightmare to maintain. You need to know what happened, when, and why.</p><p>At a minimum, log:</p><ul><li><strong>Job identifier.</strong></li><li><strong>Task type.</strong></li><li><strong>Current status.</strong></li><li><strong>Attempt count.</strong></li><li><strong>Execution duration.</strong></li><li><strong>Failure reason.</strong></li><li><strong>Worker identifier.</strong></li><li><strong>Submission and completion timestamps.</strong></li></ul><p>Python&#39;s logging module is a good start:</p><h3>import logging</h3><h3>logger = http://logging.getLogger(*name*)</h3><h3>def execute_job(job_id: str):<br> http://logger.info(<br> &quot;Starting background job&quot;,<br> extra={<br> &quot;job_id&quot;: job_id,<br> &quot;status&quot;: &quot;running&quot;<br> }<br> )</h3><h3>try:<br> process_job(job_id)</h3><h3>http://logger.info(<br> &quot;Background job completed&quot;,<br> extra={<br> &quot;job_id&quot;: job_id,<br> &quot;status&quot;: &quot;completed&quot;<br> }<br> )</h3><h3>except Exception:<br> http://logger.exception(<br> &quot;Background job failed&quot;,<br> extra={<br> &quot;job_id&quot;: job_id,<br> &quot;status&quot;: &quot;failed&quot;<br> }<br> )</h3><h3>raise</h3><p>Here process_job() is assumed to be implemented elsewhere.</p><p>In production, send those structured logs to a central platform. And track metrics like:</p><ul><li><strong>Queue length.</strong></li><li><strong>Average task duration.</strong></li><li><strong>Job failure rate.</strong></li><li><strong>Retry frequency.</strong></li><li><strong>Worker availability.</strong></li><li><strong>Jobs waiting too long</strong>.</li></ul><p>Those numbers will tell you something is wrong before your users do.</p><p><strong>9. Testing Background Job Reliability</strong></p><p>Testing background jobs isn&#39;t just &quot;does it return the right result?&quot; You also need to test what happens when things break.</p><p><strong>Good scenarios to cover:</strong></p><p><strong>Successful execution:</strong> Task completes and records the expected result.</p><p><strong>Temporary failure:</strong> First attempt fails, later attempt succeeds.</p><p><strong>Maximum retry reached:</strong> Task stops after the configured limit.</p><p><strong>Duplicate delivery:</strong> Same task processed twice, but no duplicate business effect.</p><p><strong>Worker interruption:</strong> Processing is interrupted and the task can be safely recovered.</p><p><strong>Invalid input:</strong> Task is rejected or marked as permanently failed.</p><p><strong>Concurrent execution:</strong> Multiple workers process related tasks without corrupting state.</p><p>Here&#39;s a unit test for the retry helper:</p><h3>import pytest</h3><h3>@pytest.mark.asyncio<br>async def test_retry_operation_succeeds():<br> attempts = 0</h3><h3>async def unstable_operation():<br> nonlocal attempts<br> attempts += 1</h3><h3>if attempts &lt; 3:<br> raise ConnectionError(<br> &quot;Temporary connection failure&quot;<br> )</h3><h3>return &quot;success&quot;</h3><h3>result = await retry_operation(<br> unstable_operation,<br> max_attempts=3,<br> base_delay=0.001,<br> max_delay=0.001<br> )</h3><h3>assert result == &quot;success&quot;<br> assert attempts == 3</h3><p>That confirms the operation is retried and eventually succeeds.</p><p>You should also test that permanent errors aren&#39;t retried, and that the max attempt limit is actually respected.</p><p><strong>10. Production Design Checklist</strong></p><p>Before you ship a background-processing system, run through this:</p><ul><li>[ ] Use a durable queue when task persistence is required.</li><li>[ ] Define clear task states.</li><li>[ ] Set connection and execution timeouts.</li><li>[ ] Implement bounded retry policies.</li><li>[ ] Use exponential backoff and jitter where appropriate.</li><li>[ ] Classify transient and permanent failures.</li><li>[ ] Implement idempotency for operations that may be repeated.</li><li>[ ] Use database constraints to prevent duplicate business records.</li><li>[ ] Configure dead-letter handling.</li><li>[ ] Implement graceful worker shutdown.</li><li>[ ] Monitor queue length and worker health.</li><li>[ ] Record structured logs and execution metrics.</li><li>[ ] Test duplicate delivery and failure recovery.</li><li>[ ] Protect sensitive information in task payloads and logs.</li></ul><p>Get those right and your system will be a lot easier to run and debug.</p><p><strong>Conclusion</strong></p><p>Background jobs are a core part of modern Python apps, but moving work out of an HTTP request doesn&#39;t make failure go away.</p><p>Reliability takes deliberate work.</p><p>Retries help you recover from temporary failures. Exponential backoff and jitter keep you from hammering a struggling service. Idempotency stops duplicate work from creating duplicate business effects. Task states, dead-letter queues, logging, and monitoring make failures easier to find and fix.</p><p>And most importantly: design for the case where a task gets interrupted, delivered twice, or fails in a weird place.</p><p>A reliable system doesn&#39;t assume everything works the first time. It&#39;s built to handle failure, recover safely, and keep your data correct.</p><p>That&#39;s the difference between just running background tasks and actually engineering a reliable background-processing system.</p><p><strong>Author: Ezenwa Christian Chimeremeze</strong><br><strong>Focus: Technical Writing | Developer Documentation | Python | Backend Engineering</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7edde3ac176e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Geminio OS: What I Learned When AI Became Part of My Development Process]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/building-geminio-os-what-i-learned-when-ai-became-part-of-my-development-process-b0d737cfae72?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0d737cfae72</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 21:49:07 GMT</pubDate>
            <atom:updated>2026-11-26T21:49:07.207Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OixHL6zlPlQzS-YVjxbAhA.png" /></figure><p>What were you building, and why?</p><p>My journey into software development became serious on April 1, 2023. I started with Python, driven by an interest in software engineering, artificial intelligence, automation, and eventually robotics.</p><p>As I learned more about technology, I became interested in a bigger question: What if AI could become more than a tool for generating code? What if it could become part of an entire software development ecosystem?</p><p>That idea led me to start building Geminio OS, an AI-powered full-stack development ecosystem.</p><p>My vision was to create an environment where developers could describe an idea, define requirements, generate and modify code, analyse implementations, debug errors, run tests, and prepare projects for deployment.</p><p>I wanted to explore how AI could support different stages of software development rather than simply generate isolated code snippets.</p><p>What did you expect to happen?</p><p>Initially, I expected AI-assisted development to make implementation significantly faster.</p><p>I imagined describing a feature, providing the necessary context, and allowing an AI coding assistant to help implement it. I expected the generated code to fit into the existing architecture with relatively little additional work.</p><p>I also expected that dividing a large project into smaller development stages would make the process straightforward.</p><p>However, building a complex application introduced challenges that were not immediately obvious. Generating code was only one part of the process. Making sure that the code worked correctly with everything already implemented was another challenge entirely.</p><p>The moment you realized something was off</p><p>One of my biggest realisations was that AI could generate an implementation that looked complete while still missing important context about the existing project.</p><p>In a growing application, individual features are connected. Authentication can affect routing. Database changes can affect API operations. Frontend components depend on backend behaviour. A modification to one area can introduce problems somewhere else.</p><p>I realised that a feature could appear successful in isolation without necessarily being correctly integrated into the wider application.</p><p>This changed how I approached development.</p><p>I stopped thinking only about what AI could generate and started paying much more attention to what needed to be preserved, tested, reviewed, and verified.</p><p>Everything you tried (including what didn&#39;t work)</p><p>I began organising Geminio OS development into structured sessions, with clearly defined requirements and responsibilities for each stage.</p><p>Instead of treating the application as one enormous implementation task, I separated major capabilities and approached them incrementally.</p><p>I became more deliberate about:</p><p>- Defining project requirements before implementation.<br>- Preserving existing functionality when introducing new features.<br>- Maintaining a consistent application architecture.<br>- Designing database structures and backend integrations.<br>- Reviewing authentication and security-related functionality.<br>- Testing API behaviour and frontend integration.<br>- Checking that new functionality worked with previously implemented features.</p><p>For the database architecture, I chose Supabase and PostgreSQL, with Drizzle ORM as part of the development stack.</p><p>The project has also involved authentication, session management, multi-factor authentication, persistent memory, workspace functionality, and AI integration.</p><p>One important lesson was that simply asking an AI assistant to regenerate or rewrite an implementation was not always the right solution. Replacing existing work could introduce new problems instead of solving the original ones.</p><p>I learned to be more specific about the intended changes, the existing implementation, and the expected results.</p><p>Testing and verification became essential rather than optional steps.</p><p>Who did you ask for help?</p><p>AI assistants became an important part of my development and learning process.</p><p>I used them to explore technical approaches, reason about architecture, investigate implementation problems, understand unfamiliar concepts, and work through development tasks.</p><p>However, I also learned not to treat AI-generated answers as automatically correct.</p><p>I needed to evaluate suggestions, understand the code being generated, and verify whether an implementation actually met the requirements.</p><p>This experience taught me that using AI effectively requires technical judgement. The developer must remain responsible for understanding and evaluating the final result.</p><p>Where things stand now</p><p>Geminio OS remains an ongoing development project.</p><p>Its architecture and capabilities have grown beyond my original idea. The project has progressed through structured development stages involving authentication, database integration, AI functionality, persistent memory, workspace features, and other application capabilities.</p><p>I have become much more conscious of software quality, maintainability, security, integration, and testing.</p><p>I am also learning to approach AI-assisted development as an engineering discipline rather than simply a faster way to write code.</p><p>There is still more work to do, but the experience has fundamentally changed how I plan and approach complex software projects.</p><p>Anything else you want our guests to weigh in on?</p><p>I would particularly like to hear how experienced developers and AI engineering teams approach context management when working with AI coding agents on large, existing codebases.</p><p>How do they prevent AI-generated changes from breaking previously implemented functionality?</p><p>What practices help maintain architectural consistency across multiple development sessions?</p><p>How do engineering teams decide when to trust generated code, when to request changes, and when to reject an implementation entirely?</p><p>I am also interested in how developers can build reliable AI development environments where code generation, debugging, testing, architecture, and deployment work together without sacrificing software quality.</p><p>My biggest takeaway from building Geminio OS is that AI can accelerate development, but acceleration alone does not guarantee quality.</p><p>The developer still needs to understand what is being built, why it is being built, and how to verify that it genuinely works.</p><p>Sometimes the most important part of building with AI is not getting the code generated. It is knowing how to evaluate it, integrate it, test it, and make sure it genuinely works.</p><p>That is the experience I would like to share with the CodeNewbie community.</p><p>#codenewbiestory</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0d737cfae72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database Migrations at Scale: How to Change Production Databases Without Breaking Applications]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/database-migrations-at-scale-how-to-change-production-databases-without-breaking-applications-633c8245c39a?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/633c8245c39a</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Wed, 18 Nov 2026 02:59:38 GMT</pubDate>
            <atom:updated>2026-11-18T03:05:33.402Z</atom:updated>
            <content:encoded><![CDATA[<h4>A deep dive into schema evolution, zero-downtime deployments, backward compatibility, data migrations, PostgreSQL, and reliable database engineering.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k5zaJ6ro61Fhroy6ONx1Xw.png" /></figure><p>Database Migrations at Scale: How to Change Production Databases Without Breaking Applications</p><p>By Ezenwa Christian Chimeremeze</p><p>An engineering deep dive into PostgreSQL, schema evolution, backward compatibility, zero-downtime deployments, data integrity, and production database reliability.</p><p>A database migration can look deceptively simple.</p><p>A developer adds a column, renames a field, changes a data type, creates an index, or introduces a new relationship between tables. The application works locally, the migration runs successfully, and the feature appears ready for deployment.</p><p>But production is a different reality.</p><p>An application may have thousands of active users, several running application instances, background workers, scheduled jobs, external integrations, and millions of existing database records. Not every component updates at the same moment.</p><p>A database migration that works perfectly in development can therefore cause application errors, unexpected locks, inconsistent data, or deployment failures in production.</p><p>This is why database migrations deserve more attention than simply writing SQL scripts.</p><p>They are an important part of software architecture, deployment engineering, and application reliability.</p><p>In this article, I will explore how database migrations work, why production migrations are difficult, and how engineering teams can introduce structural and data changes while keeping applications available.</p><p>The examples primarily use PostgreSQL, although many of the underlying principles apply to other relational database systems.</p><p><strong>1. Understanding Database Migrations</strong></p><p>A database migration is a controlled change to a database&#39;s structure or stored data.</p><p>These changes may include:</p><p>- Creating tables<br>- Adding or removing columns<br>- Changing column types<br>- Creating indexes<br>- Introducing foreign-key relationships<br>- Modifying constraints<br>- Moving data between tables<br>- Updating existing records<br>- Removing obsolete structures</p><pre>Consider an application that initially stores a user&#39;s name in a single column.<br>CREATE TABLE users (<br>    id BIGSERIAL PRIMARY KEY,<br>    name VARCHAR(255) NOT NULL,<br>    email VARCHAR(255) UNIQUE NOT NULL,<br>    created_at TIMESTAMPTZ DEFAULT NOW()<br>);<br>Later, the product requires separate first and last names.</pre><p>A developer might initially consider replacing the `name` column with two new columns.<br>ALTER TABLE users<br>DROP COLUMN name;</p><p>ALTER TABLE users<br>ADD COLUMN first_name VARCHAR(100),<br>ADD COLUMN last_name VARCHAR(100);<br>This looks straightforward.</p><pre>However, what happens if the currently deployed application still expects `users.name`?</pre><p>Its queries may immediately start failing.</p><p>This illustrates an important principle:</p><p>A database schema is not independent of the application that uses it.</p><p>The database and application form a connected system. Changing one can affect the other.</p><p>A migration must therefore consider application compatibility, deployment order, existing data, and operational behaviour.</p><p><strong>2. Why Production Database Migrations Are Difficult</strong></p><p>Development databases usually have fewer records, fewer concurrent connections, and fewer dependent services.</p><p>Production databases are different.</p><p><strong>Existing data</strong><br>A production database may contain millions of records accumulated over several years.</p><p>Adding a new field is not necessarily difficult, but deciding what value existing records should receive can be complicated.</p><p>For example, introducing a mandatory `account_status` field requires determining the correct status for existing accounts.</p><p><strong>Application compatibility</strong><br>During a rolling deployment, old and new application versions may run simultaneously.</p><p>The old version may expect one schema while the new version expects another.</p><p>If the migration breaks the old version before the deployment finishes, active application instances can fail.</p><p><strong>Database locks</strong><br>Some schema operations require locks that temporarily restrict access to database objects.</p><p>Depending on the operation and database version, a migration may block queries or wait behind long-running transactions.</p><p><strong>Data integrity</strong><br>Changing existing records can introduce inconsistencies if relationships, constraints, or transformation rules are not carefully considered.</p><p><strong>Deployment coordination</strong><br>A migration may affect web servers, background workers, scheduled tasks, reporting services, and external integrations.</p><p>Updating only the main application is not always sufficient.</p><p>These challenges explain why production migrations require planning rather than simply executing SQL.</p><p><strong>3. Schema Migrations and Data</strong> Migrations Are Different</p><p>It is useful to distinguish between two major categories.</p><p><strong>Schema migrations</strong><br>Schema migrations change the database structure.</p><p>Examples include:<br>ALTER TABLE users<br>ADD COLUMN phone_number VARCHAR(30);<br>Or:<br>CREATE TABLE projects (<br> id BIGSERIAL PRIMARY KEY,<br> name VARCHAR(200) NOT NULL,<br> owner_id BIGINT REFERENCES users(id)<br>);<br><strong>Data migrations</strong><br>Data migrations transform existing records.</p><p>For example, an application may need to convert a legacy status value into a newer format.<br>UPDATE users<br>SET account_status = &#39;active&#39;<br>WHERE account_status = &#39;enabled&#39;;<br>In small databases, this operation may be straightforward.</p><p>In larger databases, updating every record in one transaction can create operational problems.</p><p>Long-running transactions can increase resource consumption, delay maintenance, and create substantial database load.</p><p>Data migrations should therefore be designed around the volume of records and the application&#39;s availability requirements.</p><p><strong>4. The Expand-and-Contract Migration Pattern</strong></p><p>One of the most useful strategies for backward-compatible database changes is the expand-and-contract pattern.</p><p>The principle is simple:</p><p>Instead of replacing an existing database structure immediately, introduce the new structure alongside the old one, migrate the application gradually, and remove the old structure only after it is no longer needed.</p><p>Consider the earlier example involving a user&#39;s full name.</p><p>The original database contains:</p><p>`name VARCHAR(255)`</p><p>The new design requires:</p><p>`first_name VARCHAR(100)`<br>`last_name VARCHAR(100)`</p><p>A safer migration can be divided into stages.</p><p><strong>Stage 1: Expand the schema</strong><br>Introduce the new columns without removing the existing column.<br>ALTER TABLE users<br>ADD COLUMN first_name VARCHAR(100),<br>ADD COLUMN last_name VARCHAR(100);<br>The old application continues using `name`.</p><p>The database now supports both representations.</p><p><strong>Stage 2: Update application behaviour</strong><br>Deploy an application version that understands both structures.</p><p>For example, the application can read the new fields when available while retaining compatibility with existing records.</p><p>During the transition, writes must be handled consistently.</p><p>One possible approach is to temporarily maintain both representations through carefully controlled application logic.</p><p>However, dual writes introduce consistency risks. If one write succeeds and the other fails, the values can diverge.</p><p>For important data, the application should use appropriate transactions, reconciliation, or a deliberately designed synchronisation mechanism.</p><p><strong>Stage 3: Backfill existing records</strong><br>Existing records need to be converted.</p><p>For a simple illustrative example:<br>UPDATE users<br>SET<br> first_name = split_part(name, &#39; &#39;, 1),<br> last_name = NULLIF(<br> substring(name FROM position(&#39; &#39; IN name) + 1),<br> &#39;&#39;<br> )<br>WHERE first_name IS NULL;<br>This example assumes a relatively simple naming format. Real-world names are not reliably separable using a single-space rule.</p><p>A production migration should use business-approved transformation logic and preserve ambiguous records for review.</p><p><strong>Stage 4: Verify the new representation</strong><br>Check how many records still require migration.<br>SELECT COUNT(*)<br>FROM users<br>WHERE first_name IS NULL;<br>Additional validation should compare old and new representations and identify inconsistent records.</p><p><strong>Stage 5: Move application reads to the new fields</strong><br>Once the new representation is populated and verified, update the application so that it no longer depends on the old column.</p><p>All relevant application versions, workers, and integrations must be checked.</p><p><strong>Stage 6: Contract the schema</strong><br>Only after confirming that the old column is no longer used should it be removed.<br>ALTER TABLE users<br>DROP COLUMN name;<br>This final step should happen in a separate deployment, not as an immediate part of the initial migration.</p><p>The expand-and-contract pattern creates a controlled transition rather than forcing the database and application to change simultaneously.</p><p><strong>5. Understanding PostgreSQL Locks and Migration Safety</strong></p><p>PostgreSQL provides powerful transactional capabilities, but database operations have different locking requirements.</p><p>A migration that appears harmless can still interfere with production traffic.</p><p>For example:<br>ALTER TABLE users<br>ADD COLUMN phone_number VARCHAR(30);<br>This operation is generally metadata-oriented when adding a nullable column without a default, but it still requires a table lock.</p><p>The actual impact depends on existing transactions, lock contention, table activity, and the PostgreSQL version.</p><p>Developers should understand the locking behaviour of the operations they introduce.</p><p><strong>Using lock timeouts</strong><br>A migration should not wait indefinitely for a required lock.</p><p>PostgreSQL provides `lock_timeout`:<br>SET lock_timeout = &#39;5s&#39;;</p><p>ALTER TABLE users<br>ADD COLUMN phone_number VARCHAR(30);<br>If the required lock cannot be acquired within the configured period, the statement fails instead of waiting indefinitely.</p><p>This allows deployment systems to detect the problem and retry under appropriate conditions.</p><p><strong>Using statement timeouts</strong><br>A statement timeout can also limit how long a database operation is allowed to execute.<br>SET statement_timeout = &#39;60s’;<br>The appropriate values depend on the migration, environment, and operational requirements.</p><p>Timeouts are safeguards, not substitutes for understanding the migration&#39;s behaviour.</p><p><strong>Creating indexes safely</strong><br>Indexes can improve query performance, but creating them on heavily used tables requires care.</p><p>PostgreSQL supports concurrent index creation:<br>CREATE INDEX CONCURRENTLY idx_users_email<br>ON users(email);<br>This allows normal inserts, updates, and deletes to continue during much of the index-building process.</p><p>However, `CREATE INDEX CONCURRENTLY` cannot run inside a transaction block.</p><p>It also has additional operational considerations, including longer execution time and the possibility of an invalid index after a failed operation.</p><p>Migration frameworks must account for this rather than assuming every migration can run inside one transaction.</p><p><strong>6. Safely Migrating Large Datasets</strong></p><p>One of the biggest mistakes in database engineering is assuming that an operation tested against a small dataset will behave identically against production data.</p><p>Consider:<br>UPDATE users<br>SET account_status = &#39;active&#39;<br>WHERE account_status IS NULL;<br>This may work perfectly with a few hundred records.</p><p>But imagine millions of records.</p><p>A large update can produce significant write activity, generate substantial WAL, hold locks for an extended period, and increase replication lag.</p><p>A better approach may be to process records in batches.</p><p>*Batch-based migration*<br>A simplified PostgreSQL approach uses a common table expression:<br>WITH batch AS (<br> SELECT id<br> FROM users<br> WHERE account_status IS NULL<br> ORDER BY id<br> LIMIT 1000<br> FOR UPDATE SKIP LOCKED<br>)<br>UPDATE users AS u<br>SET account_status = &#39;active&#39;<br>FROM batch<br>WHERE u.id = batch.id;<br>This updates a limited number of records in one execution.</p><p>A migration worker can repeat the operation until no eligible records remain.</p><p>`SKIP LOCKED` can be useful when multiple workers process independent batches, but it is not necessary for every migration.</p><p>The implementation must also account for:</p><p>- Retry behaviour<br>- Transaction boundaries<br>- Progress tracking<br>- Failed batches<br>- Records updated concurrently by the application<br>- Final verification</p><p><strong>Make migrations resumable</strong><br>A robust large-data migration should be able to continue after interruption.</p><p>For example, the migration process can track:</p><p>- Total records expected<br>- Records processed<br>- Records remaining<br>- Last successfully processed identifier<br>- Failed records<br>- Completion status</p><p>It should not assume that the entire operation will always finish in one execution.</p><p>Resumability is especially valuable for large production systems.</p><p><strong>7. Transactions, Atomicity, and Migration Design</strong></p><p>Transactions are central to relational database reliability.</p><p>They allow related operations to succeed or fail together.</p><p>For example:<br>BEGIN;</p><p>UPDATE accounts<br>SET balance = balance - 100<br>WHERE id = 1;</p><p>UPDATE accounts<br>SET balance = balance + 100<br>WHERE id = 2;</p><p>COMMIT;<br>If the operation fails before commit, the transaction can be rolled back.</p><p>Database migrations can also benefit from transactions.</p><p>However, not every migration operation is transaction-compatible.</p><p>PostgreSQL operations such as `CREATE INDEX CONCURRENTLY` cannot run inside an ordinary transaction block.</p><p>Large data transformations may also be better handled through multiple bounded transactions rather than one enormous transaction.</p><p>The correct strategy depends on the operation.</p><p>A useful rule is to understand whether a migration requires atomic execution, incremental progress, or a specialised deployment procedure.</p><p><strong>8. Versioning and Migration History</strong></p><p>A database should have a clear migration history.</p><p>Without one, developers may struggle to understand which schema changes have already been applied.</p><p>Most migration frameworks maintain a migration tracking table.</p><p>For example:<br>001_create_users<br>002_add_account_status<br>003_create_projects<br>004_add_project_owner<br>005_create_project_indexes<br>Each migration represents a known change to the database.</p><p>The migration system records which changes have been executed.</p><p>Popular migration tools include:</p><p>- Alembic for SQLAlchemy applications<br>- Django migrations<br>- Flyway<br>- Liquibase<br>- Prisma Migrate<br>- Drizzle ORM migrations</p><p>The correct choice depends on the framework and architecture.</p><p><strong>Why migration history matters</strong></p><p>Migration history provides several benefits:</p><p>1. Reproducible database environments<br>2. Consistent development and production schemas<br>3. Traceability of structural changes<br>4. Better deployment automation<br>5. Easier investigation of schema-related failures</p><p>Migration files should generally be treated as version-controlled application assets.</p><p>Once a migration has been applied to shared or production environments, modifying its historical contents can create inconsistencies.</p><p>A new corrective migration is usually safer than silently rewriting an already-applied migration.</p><p><strong>9. Rollbacks Are Not Always Simple</strong></p><p>Many migration frameworks provide rollback commands.</p><p>However, reversing a database change is not necessarily equivalent to restoring the original state.</p><p>Consider:<br>ALTER TABLE users<br>DROP COLUMN middle_name;<br>Once the column is removed, its previous data is no longer available in that table.</p><p>A rollback migration can recreate the column, but it cannot automatically reconstruct the deleted values.</p><p>This is why rollback strategies must be designed before deployment.</p><p>Possible recovery approaches include:</p><p>- Restoring from verified backups<br>- Point-in-time recovery<br>- Reversing compatible schema changes<br>- Re-running corrective migrations<br>- Restoring data from an external source<br>- Rolling back the application while keeping the expanded schema</p><p>For destructive migrations, backups and recovery procedures must be verified rather than merely assumed to exist.</p><p><strong>Roll-forward versus rollback</strong><br>In some production systems, rolling forward with a corrective migration is safer than attempting to reverse a partially completed data transformation.</p><p>For example, if a new field has been populated incorrectly, a corrective migration may repair the affected records without reverting the entire application.</p><p>The choice depends on the failure, available recovery points, and data integrity requirements.</p><p><strong>10. Testing Database Migrations Before Deployment</strong></p><p>Migration testing should be part of the normal development process.</p><p>At minimum, test against representative versions of the database schema and realistic data.</p><p>Important test categories include:</p><p><strong>Fresh database tests</strong><br>Can a new database be created by applying the complete migration history?</p><p><strong>Upgrade tests</strong><br>Can an existing database move from the previous schema to the new schema?</p><p><strong>Data integrity tests</strong><br>Do existing records retain their expected relationships and values?</p><p><strong>Compatibility tests</strong><br>Can the old application version continue operating during the compatibility window?</p><p><strong>Performance tests</strong><br>Does the migration introduce excessive execution time, locking, or resource consumption?</p><p><strong>Failure tests</strong><br>What happens if a migration fails halfway through?</p><p>A migration that works only when everything goes perfectly is not sufficiently reliable for critical production environments.</p><p><strong>Example verification query</strong><br>Suppose a migration introduces a new required account status.</p><p>You can inspect remaining records:<br>SELECT<br> COUNT(*) AS total_users,<br> COUNT(*) FILTER (<br> WHERE account_status IS NULL<br> ) AS missing_status<br>FROM users;<br>The migration should not proceed to a stage requiring non-null values until the missing records have been appropriately handled.</p><p><strong>11. Integrating Database Migrations into CI/CD</strong></p><p>A database migration should be part of the application&#39;s deployment process.</p><p>A simplified pipeline might look like this:</p><p>Developer submits changes<br> |<br> v<br>Automated code review<br> |<br> v<br>Unit and integration tests<br> |<br> v<br>Migration validation<br> |<br> v<br>Staging deployment<br> |<br> v<br>Migration verification<br> |<br> v<br>Production deployment<br> |<br> v<br>Post-deployment checks<br> |<br> v<br>Monitoring and reporting</p><p>This sequence is illustrative. The exact order of application and schema deployment depends on the migration strategy.</p><p>For an expand-and-contract migration, for example, the schema expansion may need to happen before deploying the application version that uses the new columns.</p><p>The contraction happens later, after old application versions and dependencies have stopped using the old structure.</p><p><strong>Deployment responsibilities</strong><br>A reliable deployment system should:</p><p>- Prevent conflicting migration executions<br>- Record migration results<br>- Capture execution logs<br>- Apply appropriate timeouts<br>- Support safe retries<br>- Detect partial failures<br>- Verify the resulting schema<br>- Alert operators when migration steps fail</p><p>Database migrations should not run independently on every application instance during startup unless the migration system explicitly provides safe coordination.</p><p>Otherwise, multiple instances may attempt to execute the same migration simultaneously.</p><p>A dedicated migration job or controlled deployment step is often easier to reason about.</p><p><strong>12. Observability: Knowing Whether a Migration Is Healthy</strong></p><p>Executing a migration successfully is only part of the process.</p><p>Developers also need visibility into what happens afterward.</p><p>Useful metrics include:</p><p>- Migration execution duration<br>- Lock acquisition time<br>- Database CPU and memory utilisation<br>- Active database connections<br>- Query latency<br>- Replication lag<br>- Number of records processed<br>- Number of failed records<br>- Application error rates</p><p>PostgreSQL provides useful diagnostic views.</p><p>For example:<br>SELECT<br> pid,<br> state,<br> wait_event_type,<br> wait_event,<br> query<br>FROM pg_stat_activity<br>WHERE state &lt;&gt; &#39;idle&#39;;<br>This can help identify active queries and sessions waiting on database resources.</p><p>For production operations, developers should also investigate long-running transactions, blocked sessions, and replication health where relevant.</p><p>Monitoring allows teams to distinguish between a migration that technically completed and one that has introduced operational problems.</p><p><strong>13. Common Database Migration Mistakes</strong></p><p>Several mistakes <strong>repeatedlycreate</strong> problems in production environments.</p><p>1. <strong>Removing old columns too early -</strong> The application may still depend on them.</p><p>2. <strong>Running enormous data updates without planning</strong> - Large transactions can create unnecessary database pressure.</p><p>3<strong>. Ignoring lock behaviour</strong> - A migration can block application traffic even if the SQL statement looks simple.</p><p>4. <strong>Assuming rollback restores deleted data</strong>- Recreating a column does not restore the values that were removed.</p><p>5. <strong>Skipping realistic testing</strong> - A migration tested against ten records may behave differently against ten million.</p><p>6. <strong>Running migrations independently on every server-</strong> Uncoordinated execution can create deployment conflicts.</p><p>7. <strong>Forgetting background workers</strong> - Workers may continue using old queries after the main application has been updated.</p><p>8. <strong>Failing to verify data transformations</strong> - A migration can finish successfully while producing incorrect values.</p><p>9. <strong>Combining expansion and destruction in one deployment</strong> - This removes the opportunity for a controlled compatibility transition.</p><p><strong>10. Treating database migrations as an afterthought</strong> - Schema changes are part of application engineering and deserve the same planning and review as source-code changes.</p><p><strong>14. A Practical Production Migration Checklist</strong></p><p>Before deploying a database migration, consider the following.</p><p><strong>Architecture</strong><br>Does the new schema support the intended feature?<br>Have all dependent application components been identified?<br>Is the change backward-compatible?<br>Are background workers and external integrations considered?</p><p><strong>Data</strong><br>Is existing data preserved?<br>Are transformation rules clearly defined?<br>Can the migration resume after interruption?<br>Are validation queries available?</p><p><strong>Performance</strong><br>Could the migration acquire restrictive locks?<br>Is an index operation suitable for concurrent creation?<br>Are timeouts configured appropriately?<br>Has the migration been tested against realistic data volumes?</p><p><strong>Security</strong><br>Are permissions appropriate?<br>Are sensitive values protected?<br>Are backup and recovery procedures available?</p><p>*Deployment*<br>Is migration execution coordinated?<br>Is the deployment sequence correct?<br>Are application versions compatible during the transition?<br>Is there a recovery plan?</p><p><strong>Verification</strong><br>Have migration tests passed?<br>Has the resulting schema been inspected?<br>Are data integrity checks available?<br>Will application and database health be monitored afterward?</p><p>This checklist is not a replacement for database-specific documentation, but it provides a useful foundation for engineering reviews.</p><p><strong>15. Final Thoughts: Database Migrations Are Part of Software Reliability</strong></p><p>As software applications grow, their databases must evolve.</p><p>New features introduce new relationships, changing business requirements demand different data structures, and increasing workloads create new performance requirements.</p><p>The challenge is not simply making these changes.</p><p>It is making them without unnecessarily disrupting the systems that already depend on the database.</p><p>That requires a combination of architectural planning, backward compatibility, transaction management, data validation, deployment coordination, testing, and observability.</p><p>The expand-and-contract pattern offers a practical way to manage many structural changes. Batch processing helps make large data transformations more manageable. Migration versioning improves consistency, while monitoring and recovery planning help protect production systems.</p><p>There is no universal migration strategy that works for every database operation.</p><p>The correct approach depends on the database engine, schema, data volume, application architecture, deployment model, and availability requirements.</p><p>But one principle remains important:</p><p>A successful database migration is not merely one that executes without errors. It is one that preserves data integrity, maintains application compatibility, and leaves the system in a healthy, verifiable state.</p><p>Database engineering is not just about storing information. It is about ensuring that information remains reliable as software evolves.</p><p><strong>About Me</strong></p><p>I&#39;m Ezenwa Christian Chimeremeze, a developer, technical writer, and founder of Geminio OS, an AI-first full-stack development ecosystem. I&#39;m passionate about software engineering, database architecture, artificial intelligence, developer documentation, and automation. I enjoy exploring complex technical challenges, building practical solutions, and documenting what I learn through real-world development experiences.</p><p><strong>You can connect with me:</strong></p><p><strong>- GitHub:</strong> https://github.com/ezenwachristianchimeremeze<br><strong>- Portfolio:</strong> https://ezenwa-christian.netlify</p><p><strong>LinkedIn: </strong><br>https://www.linkedin.com/in/ezenwa-christian-chimeremeze-b77115440</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=633c8245c39a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Built a Production-Ready AI App on an Android Phone]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/why-i-built-a-production-ready-ai-app-on-an-android-phone-6927bdb2dbdf?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6927bdb2dbdf</guid>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[atificial-intelligence]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 00:11:10 GMT</pubDate>
            <atom:updated>2026-11-16T00:11:10.786Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>You don&#39;t need a $2,000 MacBook to build the future. You need a problem, a phone, and a relentless drive to solve it.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tV-AKz80gS4u_m5st2AmYw.jpeg" /></figure><p>When most developers think about building a full-stack AI application, they picture a dual-monitor setup, a high-end MacBook, and a comfortable office chair.</p><p>I didn&#39;t have any of that. I had an Android phone and a deep frustration with the job-hunting process.</p><p>Instead of waiting until I could afford expensive hardware, I decided to build my solution anyway. I built Career Agency AI, a full-stack, AI-powered SaaS application, entirely on my mobile device.</p><p>Here is how I did it, and why the constraint of a mobile phone actually made me a better engineer.</p><p><strong>The Stack: Doing More with Less</strong></p><p>To build an app on a phone, you have to abandon heavy frameworks. I used Termux, an Android terminal emulator, to create a Linux environment right on my device.</p><p>For the backend, I chose Python and Flask. For the database, I used SQLite, which is perfect for mobile environments because it doesn&#39;t require a separate server process.</p><p>To make it an AI app, I integrated the Google Gemini API. The app takes a job description and a user&#39;s CV, and using LLM function calling, it generates a tailored cover letter and calculates an ATS match score.</p><p><strong>The Hardest Part? The Event Loop.</strong></p><p>Building an AI app on a phone means you have zero room for inefficiency.</p><p>When I first integrated the Gemini API, my server kept freezing. I realized I was using time.sleep() to wait for the API response, which was blocking the entire Python event loop.</p><p>I had to rewrite the architecture to use asynchronous programming (asyncio). I implemented real-time streaming so the AI&#39;s response appeared on the screen chunk-by-chunk, just like ChatGPT. I also had to build in exponential backoff and retry logic to handle API rate limits gracefully.</p><p>Because my hardware was limited, I couldn&#39;t just throw more RAM at the problem. I had to write better code.</p><p>The Lesson: Constraints Breed Creativity</p><p>Building an entire SaaS product on a mobile phone taught me a lesson that no computer science textbook could: You do not need permission to build.</p><p>If you are waiting for the perfect laptop, the perfect course, or the perfect moment, you will be waiting forever. The tools are already in your pocket.</p><p>I used AI assistants to help me write boilerplate, but I rigorously reviewed every line of code. I deployed the app, ran over 66 automated tests, and now I use it to apply for software engineering and technical writing roles.</p><p>I didn&#39;t just build an app. I proved to myself that I am an engineer, regardless of the hardware I own.</p><p><strong>What are you waiting for?</strong></p><p>If you have an idea, start building it today. Use the phone in your hand. Break the problem down into small pieces. Fail, debug, and try again.</p><p>You might be surprised by what you can build.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6927bdb2dbdf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Boy Who Built an Empire from "Rubbish"]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/the-boy-who-built-an-empire-from-rubbish-db9acd5ae674?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/db9acd5ae674</guid>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[lifes-lessons]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[software-developer]]></category>
            <category><![CDATA[nigeria]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 14:36:37 GMT</pubDate>
            <atom:updated>2026-11-13T14:36:37.246Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qz1zyZ4dKDvTJO8UkpwxcA.jpeg" /><figcaption>(Story originally shared by Peace Saratu Ayuba).</figcaption></figure><p>What a young Nigerian boy taught me about software engineering, legacy code, and the true value of things other people throw away.</p><p>Whenever people threw away broken chairs, damaged radios, old cooking stoves, cracked tables, or rusty machines, Daniel would quietly pick them up.</p><p>“Daniel, na rubbish you dey gather?” his friends would laugh.</p><p>But Daniel never argued.</p><p>He would carry the broken things home, clean them, study how they worked, repair what he could, and sometimes combine parts from three useless objects to create one working item.</p><p>One afternoon, a wealthy restaurant owner threw away six badly damaged wooden tables. Daniel carried them home.</p><p>His mother looked at him and shook her head.</p><p>“My son, when will you stop bringing people&#39;s rubbish into this house?”</p><p>Daniel smiled.</p><p>“Give me time, Mama. Maybe what people call rubbish is only something they don&#39;t know how to use again.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Du0m6KOfUJdnqBGnnH8v1g.jpeg" /></figure><p>For two weeks, Daniel worked. He removed rotten wood, replaced broken legs, polished the surfaces, and turned the six damaged tables into beautiful restaurant pieces.</p><p>He took pictures and showed them to a furniture dealer in town. The dealer was shocked.</p><p>“Who made these?”<br>“I did.”</p><p>The man bought all six. That was Daniel&#39;s first real payment.</p><p>Instead of spending the money on new clothes or luxury, Daniel bought tools.</p><p>Then he started collecting discarded furniture, appliances, bicycles, and small machines. People began bringing their broken things to him. Soon, Daniel&#39;s tiny repair corner became a proper workshop.</p><p>One day, the same friends who used to laugh at him arrived with a damaged machine.</p><p>“Daniel, please help us fix this.”</p><p>Daniel looked at them and smiled.</p><p>“Ah! So rubbish don turn business now?”</p><p>They laughed.</p><p>Years later, Daniel owned several workshops and employed young people who had once believed that success only came from having rich parents or expensive education.</p><p>During the opening of his biggest workshop, a reporter asked him:</p><p>“What was your secret?”</p><p>Daniel looked around at the machines, furniture, and tools surrounding him.</p><p>“I simply learned to see value where other people had stopped looking.”</p><p><strong>Why I Think About Daniel Every Time I Write Code</strong></p><p>As a software engineer and technical writer, I think about Daniel a lot.</p><p>In the tech industry, everyone wants to build the next shiny, new thing from scratch. We idolize the people who create new apps, new frameworks, and new AI models.</p><p>But there is immense value in the &quot;rubbish&quot; of the tech world.</p><p>I think about Daniel when I dive into an unfamiliar, messy codebase that a company abandoned. I think about him when I debug legacy code that everyone else gave up on. I think about him when I write documentation to make a confusing API readable again.</p><p>You don&#39;t always need a brand-new idea to build wealth or create impact. Sometimes, you just need the patience, the skill, and the vision to repair what everyone else threw away.</p><p>The opportunity you are searching for might be hiding inside the thing everybody else has already given up on.</p><p>---</p><p>Did you grow up knowing that something &quot;old&quot; could become valuable with a little repair? If this story resonated with you, follow my journey as I build software and write about technology here on Medium.</p><p>(Story originally shared by Peace Saratu Ayuba).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db9acd5ae674" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Handle Asynchronous AI Streams in FastAPI Without Freezing Your Server]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/how-to-handle-asynchronous-ai-streams-in-fastapi-without-freezing-your-server-492f72f4611c?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/492f72f4611c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 14:12:16 GMT</pubDate>
            <atom:updated>2026-11-13T14:12:16.577Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OFQD-gcdkkIubfp2_3xDZg.jpeg" /></figure><p>When I built my AI career app on an Android phone, I hit a wall. My server kept crashing every time I called the Gemini API. Here is how I fixed it.</p><p>When I built my full-stack AI career app using Termux on my Android phone, I was incredibly proud. I had a Flask backend, SQLite for data, and I was calling the Google Gemini API to generate cover letters.</p><p>But I had a major problem.</p><p>Every time the AI started generating a long response, the entire server would freeze. I couldn&#39;t click any other buttons, the UI would hang, and eventually, the app would time out.</p><p>I realized I had fallen into the classic asynchronous trap. Here is what I learned about handling streaming AI responses in Python, and how you can avoid the same mistake.</p><p>The Blocking Trap</p><p>In my first attempt, I was using standard Python time.sleep() to wait for the AI to respond before sending the data to the frontend.</p><p>The problem? time.sleep() is synchronous. It completely blocks the Python event loop. This means while the server is waiting for the AI to finish generating text, it cannot process any other requests. It is literally standing still, waiting.</p><p>If you are building an AI app, you cannot do this. You need your server to stay awake and handle other tasks while the AI is thinking.</p><p>The Fix: asyncio and Streaming Responses</p><p>To fix this, I had to refactor my backend to use FastAPI and asyncio.</p><p>Instead of waiting for the AI to finish and then sending the whole block of text at once, I used a StreamingResponse. This allows the backend to send the AI&#39;s text to the frontend chunk by chunk, as it is being generated.</p><p>Here is a simplified version of the code I used:</p><p>```python<br>from fastapi import FastAPI<br>from fastapi.responses import StreamingResponse<br>import asyncio<br>import google.generativeai as genai</p><p>app = FastAPI()</p><p>async def generate_ai_response(prompt: str):<br> # Configure the Gemini API<br> model = genai.GenerativeModel(&#39;gemini-pro&#39;)<br> <br> # Generate content asynchronously<br> response = await model.generate_content_async(prompt)<br> <br> # Yield the text chunk by chunk<br> for chunk in response:<br> yield chunk.text<br> # CRITICAL: Use asyncio.sleep, not time.sleep<br> await asyncio.sleep(0.01)</p><p>@app.get(&quot;/generate-cover-letter&quot;)<br>async def generate_cover_letter(job_description: str):<br> prompt = f&quot;Write a cover letter for this job: {job_description}&quot;<br> <br> # Return a streaming response<br> return StreamingResponse(generate_ai_response(prompt), media_type=&quot;text/event-stream&quot;)<br>```</p><p>Handling API Rate Limits with Exponential Backoff</p><p>Another issue I ran into was the Gemini API rate limit. If I sent too many requests too quickly, the API would throw an error and my app would crash.</p><p>To fix this, I implemented exponential backoff using asyncio. If the API fails, the server waits a bit, then tries again. If it fails again, it waits twice as long.</p><p>```python<br>import asyncio<br>from google.api_core.exceptions import ResourceExhausted</p><p>async def safe_api_call(prompt: str, max_retries: int = 3):<br> for attempt in range(max_retries):<br> try:<br> return await model.generate_content_async(prompt)<br> except ResourceExhausted:<br> if attempt == max_retries - 1:<br> raise<br> # Wait exponentially longer each time<br> await asyncio.sleep(2 ** attempt)<br>```</p><p><a href="https://dev.to/ezenwa_christian_5243b406/how-to-handle-asynchronous-ai-streams-in-fastapi-without-freezing-your-server-40j4">How to Handle Asynchronous AI Streams in FastAPI Without Freezing Your Server</a></p><p>The Lesson</p><p>Building AI applications is not just about connecting an API and hoping for the best. It is about understanding the event loop, managing asynchronous state, and writing code that can handle real-world constraints (like mobile servers and API limits).</p><p>If you are building an AI backend, don’t block your event loop. Use asyncio, stream your responses, and handle your rate limits. Your users will thank you.</p><p>When I built my AI career app on an Android phone, I hit a wall. My server kept crashing every time I called the Gemini API. Here is how I fixed it.</p><p>When I built my full-stack AI career app using Termux on my Android phone, I was incredibly proud. I had a Flask backend, SQLite for data, and I was calling the Google Gemini API to generate cover letters.</p><p>But I had a major problem.</p><p>Every time the AI started generating a long response, the entire server would freeze. I couldn&#39;t click any other buttons, the UI would hang, and eventually, the app would time out.</p><p>I realized I had fallen into the classic asynchronous trap. Here is what I learned about handling streaming AI responses in Python, and how you can avoid the same mistake.</p><p>The Blocking Trap</p><p>In my first attempt, I was using standard Python time.sleep() to wait for the AI to respond before sending the data to the frontend.</p><p>The problem? time.sleep() is synchronous. It completely blocks the Python event loop. This means while the server is waiting for the AI to finish generating text, it cannot process any other requests. It is literally standing still, waiting.</p><p>If you are building an AI app, you cannot do this. You need your server to stay awake and handle other tasks while the AI is thinking.</p><p>The Fix: asyncio and Streaming Responses</p><p>To fix this, I had to refactor my backend to use FastAPI and asyncio.</p><p>Instead of waiting for the AI to finish and then sending the whole block of text at once, I used a StreamingResponse. This allows the backend to send the AI&#39;s text to the frontend chunk by chunk, as it is being generated.</p><p>Here is a simplified version of the code I used:</p><p>```python<br>from fastapi import FastAPI<br>from fastapi.responses import StreamingResponse<br>import asyncio<br>import google.generativeai as genai</p><p>app = FastAPI()</p><p>async def generate_ai_response(prompt: str):<br> # Configure the Gemini API<br> model = genai.GenerativeModel(&#39;gemini-pro&#39;)<br> <br> # Generate content asynchronously<br> response = await model.generate_content_async(prompt)<br> <br> # Yield the text chunk by chunk<br> for chunk in response:<br> yield chunk.text<br> # CRITICAL: Use asyncio.sleep, not time.sleep<br> await asyncio.sleep(0.01)</p><p>@app.get(&quot;/generate-cover-letter&quot;)<br>async def generate_cover_letter(job_description: str):<br> prompt = f&quot;Write a cover letter for this job: {job_description}&quot;<br> # Return a streaming response<br> return StreamingResponse(generate_ai_response(prompt), media_type=&quot;text/event-stream&quot;)<br>```</p><p>Handling API Rate Limits with Exponential Backoff</p><p>Another issue I ran into was the Gemini API rate limit. If I sent too many requests too quickly, the API would throw an error and my app would crash.</p><p>To fix this, I implemented exponential backoff using asyncio. If the API fails, the server waits a bit, then tries again. If it fails again, it waits twice as long.</p><p>```python<br>import asyncio<br>from google.api_core.exceptions import ResourceExhausted</p><p>async def safe_api_call(prompt: str, max_retries: int = 3):<br> for attempt in range(max_retries):<br> try:<br> return await model.generate_content_async(prompt)<br> except ResourceExhausted:<br> if attempt == max_retries - 1:<br> raise<br> # Wait exponentially longer each time<br> await asyncio.sleep(2 ** attempt)<br>```</p><p><a href="https://www.sitepoint.com/stop-building-dumb-ai-wrappers-getting-real-with-llm-function-calling/">Stop Building Dumb AI Wrappers: Getting Real with LLM Function Calling</a></p><p>The Lesson</p><p>Building AI applications is not just about connecting an API and hoping for the best. It is about understanding the event loop, managing asynchronous state, and writing code that can handle real-world constraints (like mobile servers and API limits).</p><p>If you are building an AI backend, don&#39;t block your event loop. Use asyncio, stream your responses, and handle your rate limits. Your users will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=492f72f4611c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Data Pipeline for Your AI App with Airbyte and FastAPI]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/how-to-build-a-data-pipeline-for-your-ai-app-with-airbyte-and-fastapi-65c3a7c23ab9?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/65c3a7c23ab9</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[airbyte]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 21:33:17 GMT</pubDate>
            <atom:updated>2026-11-06T21:33:17.098Z</atom:updated>
            <content:encoded><![CDATA[<h4>Stop writing custom Python scripts for every API. Here is how I automated my data ingestion using <strong>Airbyte</strong>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h9ARUefbq_CBqLkP3jX5Ww.jpeg" /></figure><p>If you are building an AI application, your biggest bottleneck isn’t the LLM—it’s the data.</p><p>For my project, Career Agency AI, I needed to pull job listings from multiple sources (like Remotive and Arbeitnow), clean the data, and store it locally so my Gemini-powered backend could analyze it. Initially, I wrote custom Python scripts for every single API. It was a nightmare. I had to handle pagination, rate limits, and schema changes manually.</p><p>Then, I discovered <strong>Airbyte</strong>.</p><p>In this tutorial, I will show you how I used Airbyte to build an automated ETL (Extract, Transform, Load) pipeline, syncing external job APIs directly into a PostgreSQL database, which my FastAPI backend then served to the AI.</p><p><strong>The Architecture</strong></p><p>Instead of writing complex integration code, I moved the heavy lifting to Airbyte. Here is the flow:</p><p><strong>1. Source:</strong> External Job APIs (HTTP).</p><p><strong>2. Extract &amp; Load:</strong> Airbyte handles the syncing.</p><p><strong>3. Destination:</strong> A local PostgreSQL database (or SQLite for mobile deployments).</p><p><strong>4. Serve &amp; AI:</strong> FastAPI reads the data and passes it to the Gemini API.</p><ul><li><strong>Step 1: Setting up Airbyte</strong></li></ul><p>Because I was developing on constrained hardware, I used Airbyte’s Docker setup. It is incredibly straightforward.<br>(Pro Tip: You can also use Airbyte Cloud for a managed experience.)</p><pre>{```bash<br>git clone https://github.com/airbytehq/airbyte.git<br>cd airbyte<br>docker compose up<br>```}</pre><p>Once the containers spin up, you can access the Airbyte UI at http://localhost:8000.</p><p><strong>Step 2: Configuring the Source and Destination</strong></p><p>This is where <strong>Airbyte</strong> shines.</p><p><strong>1. In the UI, I connected a Source</strong> (using Airbyte&#39;s HTTP API connector or a custom Python connector if the API is highly specific).</p><p><strong>2. I set up my Destination as PostgreSQL.</strong></p><p>Instead of writing a 200-line Python script to paginate through the job APIs and insert records into Postgres, Airbyte did it in a few clicks.</p><p><strong>Step 3:</strong> Building the FastAPI Backend</p><p>Once Airbyte syncs the raw job data into my database, I use FastAPI to serve it to my frontend and pass it to the AI.</p><p>Here is a simplified endpoint showing how I query the Airbyte-synced data:</p><p>```python<br>from fastapi import FastAPI, HTTPException<br>from pydantic import BaseModel<br>import psycopg2</p><p>app = FastAPI()</p><p># Connection to the database Airbyte populated<br>def get_db_connection():<br> return psycopg2.connect(<br> dbname=&quot;career_agency&quot;,<br> user=&quot;postgres&quot;,<br> password=&quot;[YOUR_PASSWORD]&quot;,<br> host=&quot;localhost&quot;,<br> port=&quot;5432&quot;<br> )</p><p>@app.get(&quot;/jobs/latest&quot;)<br>def get_latest_jobs():<br> conn = get_db_connection()<br> cursor = conn.cursor()<br> <br><strong> # Query the table that Airbyte</strong> automatically created and synced<br> cursor.execute(&quot;SELECT title, company, description FROM job_listings ORDER BY created_at DESC LIMIT 10;&quot;)<br> jobs = cursor.fetchall()<br> <br> conn.close()<br> <br> if not jobs:<br> raise HTTPException(status_code=404, detail=&quot;No jobs found&quot;)<br> <br> return {&quot;jobs&quot;: jobs}<br>```</p><p><strong>Step 4: Feeding the AI</strong></p><p>Now that FastAPI has the data, the AI integration is seamless. When a user selects a job, my backend sends the description to the Google Gemini API:</p><p>```python<br>import google.generativeai as genai</p><p>genai.configure(api_key=&quot;[YOUR_GEMINI_KEY]&quot;)</p><p>@app.post(&quot;/generate-cover-letter&quot;)<br>def generate_letter(job_id: int):<br> # 1. Fetch job description from the <em>Airbyte-synced</em> DB<br> # 2. Pass to Gemini<br> model = genai.GenerativeModel(’gemini-pro’)<br> response = model.generate_content(f&quot;Write a cover letter for this job: {job_description}&quot;)<br> <br> return {&quot;cover_letter&quot;: response.text}<br>```</p><p><strong>Conclusion</strong></p><p>If you are building AI applications, your time is too valuable to spend writing API integration scripts.</p><p>By using <strong>Airbyte</strong> to handle the ETL pipelines, I was able to focus entirely on building the FastAPI backend and engineering the AI prompts. The data was always fresh, the schema changes were handled automatically, and I saved hours of development time.</p><p>If you are building a data-heavy AI app, spin up <strong>Airbyte</strong>. Your future self will thank you.</p><p><a href="https://medium.com/u/f06c4cfda819">Airbyte</a> <a href="https://medium.com/u/35a7f4b97802">Airbyte</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65c3a7c23ab9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built a Production-Grade AI App on an Android Phone]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/how-i-built-a-production-grade-ai-app-on-an-android-phone-0782d5719632?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/0782d5719632</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 20:57:53 GMT</pubDate>
            <atom:updated>2026-11-05T20:57:53.266Z</atom:updated>
            <content:encoded><![CDATA[<h3>You don’t need a $2,000 MacBook to build the future. You just need Termux, Python, and a relentless drive to solve problems.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*kmZpyAlKoioYegq6pP3wMA.jpeg" /></figure><p>Most developers will tell you that you need a high-end laptop, a paid cloud subscription, and a perfect setup to build a real AI application.</p><p>I am here to prove them wrong.</p><p>Recently, I designed, built, and deployed a full-stack, AI-powered SaaS application entirely on my Android phone. It wasn&#39;t a toy project. It was a fully functional Career Agency app designed to automate job hunting, using asynchronous data streaming and the Google Gemini API.</p><p>Here is how I did it, the architecture I used, and what it taught me about being an engineer.</p><p><strong>The Constraint: No Laptop</strong></p><p>I live in Nigeria, and like many self-taught developers in emerging markets, access to expensive hardware is a barrier. But I had an Android phone and a Linux environment emulator called <strong>Termux</strong>.</p><p>I decided that if I could build an entire backend on a mobile device, I could prove that engineering is about problem-solving, not the hardware you own.</p><p><strong>The Tech Stack</strong></p><p>To ensure the app could run efficiently on mobile hardware, I kept the stack lightweight but production-ready:</p><p><strong>· Backend: </strong>Python &amp; Flask</p><p><strong>· Database:</strong> SQLite (for local, zero-latency data persistence)</p><p><strong>· Frontend:</strong> Vanilla JavaScript (built as a PWA so it installs like a native app)</p><p><strong>· AI Engine:</strong> Google Gemini API (with LLM function calling)</p><p><strong>· Environment: </strong>Termux on Android</p><p>The Hardest Technical Challenges</p><p>Building on a phone means you can’t rely on heavy frameworks. You have to optimize everything.</p><p><strong>1. Managing the Event Loop</strong><br>When integrating the Gemini API, I needed a live typing effect for the user, similar to ChatGPT. I used the JavaScript Fetch API with ReadableStream to read the AI&#39;s response chunk by chunk. On the backend, I had to ensure that all I/O operations were asynchronous. If I used a blocking time.sleep() instead of asyncio.sleep() during a retry, the entire mobile server would freeze.</p><p><strong>2. API Rate Limits and Backoff</strong><br>AI APIs are expensive and rate-limited. I implemented an exponential backoff and retry logic system. If the Gemini API timed out or hit a limit, the server would wait and try again, ensuring a seamless experience for the user without crashing the app.</p><p><strong>3. Keeping the Server Alive 24/7</strong><br>A web app isn&#39;t useful if the server dies when you close the terminal. I configured Termux:Boot and wrote custom bash scripts with auto-restart loops. Even if the phone restarted, the Flask server would spin back up automatically.</p><p><strong>4. Reviewing AI-Generated Code</strong><br>I used AI coding assistants to accelerate the boilerplate (like the regex parsers and database models). But as I wrote in a recent SitePoint article, AI is for velocity; the engineer is for integrity and security. I rigorously reviewed the AI&#39;s output, caught memory leaks, and wrote 66 automated tests to ensure the backend was bulletproof.</p><p><strong>The Lesson: Constraints Breed Creativity</strong></p><p>Building this app on a phone forced me to become a better engineer. I couldn&#39;t just install a massive Docker container or rely on heavy enterprise libraries. I had to understand the exact flow of data from the frontend, through my Flask API, into the SQLite database, and out to the Gemini API.</p><p>This project proved to me that <strong>you don’t need permission to build.</strong></p><p>If you are a developer in an emerging market waiting for a laptop to start your journey, stop waiting. Download Termux. Open GitHub. Start typing.</p><p>The tech industry needs builders who can engineer their way out of tight corners, not just people who can afford expensive hardware.</p><p>---</p><p>Ezenwa Christian Chimeremeze is a Full-Stack Python Engineer and Technical Author. He specializes in FastAPI, AI integrations, and building production systems from scratch. Connect with him on LinkedIn: https://www.linkedin.com/in/ezenwa-christian-chimeremeze-b77115440</p><p>or view his work on GitHub: https://github.com/ezenwachristianchimeremeze</p><p>Read more of his technical writing on SitePoint: https://www.sitepoint.com/from-a-shattered-screen-to-the-cloud-building-an-ai-future-with-termux-in-nigeria/</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0782d5719632" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No Laptop, No Problem: How I Built a Full-Stack AI Career App on My Android Phone]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/no-laptop-no-problem-how-i-built-a-full-stack-ai-career-app-on-my-android-phone-e321059cf6a4?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e321059cf6a4</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 20:12:18 GMT</pubDate>
            <atom:updated>2026-10-24T20:12:18.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*M5eOWTVDgaMr22_lCEd2Uw.jpeg" /></figure><p>Most developers will tell you that you need a powerful MacBook, a mechanical keyboard, and two monitors to build a production-ready SaaS application.</p><p>I’m here to tell you they are wrong.</p><p>For the past few weeks, I have been building <strong>Career Agency</strong>—a full-stack, AI-powered career management ecosystem. It fetches global remote jobs, filters out scams, analyzes my CV, and uses Large Language Models (LLMs) to generate tailored cover letters.</p><p>Oh, and I built the entire thing from scratch using only my Android phone and a terminal app called Termux.</p><p>Here is the story of how I did it, the tech stack I used, and why the future of software development is mobile-first.</p><p><strong>The Tech Stack: Less is More</strong></p><p>Because I was building on a mobile device, I couldn&#39;t rely on heavy IDEs or bloated frameworks. I had to strip everything down to the essentials:</p><p>· <strong>The Environment:</strong> Android + Termux (a Linux terminal emulator).<br><strong>· The Backend: </strong>Python and Flask.<br><strong>· The Database:</strong> SQLite (lightweight and file-based).<br><strong>· The Frontend:</strong> Vanilla HTML, CSS, and JavaScript (no React, no Tailwind).<br><strong>· The AI Engine:</strong> Google Gemini API (using standard HTTP requests).</p><p>Everything lives inside a single app.py file. No microservices, no Docker containers (just yet), and no cloud hosting bills. The app runs entirely locally on my phone, 24/7.</p><p><strong>The Killer Features</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*B441xNaNag-B856vF3gbGg.jpeg" /></figure><p>I didn&#39;t just build a simple chatbot. I built a machine that actively hunts for jobs while I sleep. Here is what Career Agency can do:</p><p>1. <strong>Automated Job Fetching:</strong> A background Python thread connects to APIs like Jobicy and Remotive every three hours. It pulls global remote jobs and filters out anything that requires a US-only visa, Rust, or senior-level experience.<br>2. <strong>ATS-Optimized CV Generation: </strong>By feeding the AI my raw profile and the job description, it generates a tailored cover letter and a CV formatted specifically to pass Applicant Tracking Systems (ATS).<br>3. <strong>Text-to-Speech &amp; Speech-to-Text:</strong> I integrated browser-native APIs so I can dictate my prompts and have the AI read its responses aloud.<br>4. <strong>The 5-Job Lock:</strong> To prevent doom-scrolling, the app locks the job search until I have either applied to or skipped the current batch of jobs.</p><p><strong>The Challenges (and How I Solved Them)</strong></p><p>Building on a phone is not without its headaches.</p><p>· <strong>Memory Limits:</strong> Mobile OSs are aggressive at killing background apps. I had to use termux-wake-lock and write an infinite while true loop in bash to keep the Flask server alive.<br>· <strong>PDF Parsing:</strong> Generating clean PDFs that ATS bots can actually read was a nightmare. I learned that standard Google Docs exports work best, and avoided complex HTML-to-PDF canvases.<br><strong>· API Limits: </strong>Hitting Google&#39;s free Gemini API limit constantly forced me to build a smart rate-limit tracker directly into the app&#39;s UI.</p><p><strong>The Results: $250k Jobs and Real Interviews</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*CH5XV0aNECsOFl3bsYz29g.jpeg" /></figure><p>I didn’t build this app just for fun. I built it to change my life.</p><p>Using this very app, I found a <strong>Software Engineer</strong> role at Sticker Mule paying <strong>$150,000 – $250,000,</strong> generated a flawless CV, and applied. I found a <strong>Technical Author</strong> role at Canonical (the company behind Ubuntu), and I am currently moving through their interview process. I even applied for a $<strong>1,000-per-task AI Coding role </strong>at Askable.</p><p>The app found the jobs, wrote the applications, and tracked the progress. All I had to do was hit &quot;Submit.&quot;</p><p><strong>Why You Should Build on Mobile</strong></p><p>If you are waiting for a better laptop, a faster internet connection, or the perfect moment to start building, stop waiting.</p><p>The smartphone in your pocket has more computing power than the computers that sent humans to the moon. With tools like Termux, an internet connection, and the help of AI coding assistants, you can build real, production-grade software from anywhere.</p><p>The barrier to entry has never been lower. The only limit is your imagination (and maybe your battery life).</p><p>---</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*KvD_mo1CYlKvb9ZRa84YkQ.jpeg" /></figure><p><strong>Ezenwa Christian Chimeremeze</strong> is a Full-Stack Developer and Published Technical Author specializing in Python, AI integration, and edge automation. You can connect with him on LinkedIn or check out his projects on GitHub.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e321059cf6a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Geminio OS: Why AI-Powered Software Development Needs More Than Code Generation]]></title>
            <link>https://ezenwachristianchimeremeze.medium.com/building-geminio-os-why-ai-powered-software-development-needs-more-than-code-generation-c19f5d35d2db?source=rss-5c5e4b2261b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c19f5d35d2db</guid>
            <dc:creator><![CDATA[EZENWA CHRISTIAN CHIMEREMEZE]]></dc:creator>
            <pubDate>Tue, 13 Oct 2026 23:02:23 GMT</pubDate>
            <atom:updated>2026-10-13T23:02:23.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jdr3hOHZQsN6cWsA8BF3ng.png" /></figure><p>By Ezenwa Christian Chimeremeze<br>Founder &amp; Developer, Geminio OS<br>Location: Nigeria</p><p>The idea behind Geminio OS</p><p>Artificial intelligence is changing how developers write code. Today, AI tools can help generate functions, explain errors, suggest improvements, and speed up many everyday development tasks.</p><p>But I believe there is a bigger opportunity.</p><p><strong>What if AI could help developers manage more of the software</strong> development process—not just generate code?</p><p>That question is one of the ideas behind Geminio OS, an AI-powered development ecosystem I am building to explore a more structured approach to software creation, automation, productivity, and learning.</p><p>I am developing Geminio OS while continuing to improve my skills in software development, technical writing, backend engineering, and AI systems. It is a long-term project, and I am approaching it one component at a time.</p><p>Why code generation alone is not enough</p><p>Writing code is only one part of building software.</p><p>Before a useful application can be completed, someone must understand the problem, define requirements, make architectural decisions, test the implementation, identify errors, and prepare the system for deployment.</p><p>AI-generated code can be helpful, but developers still need to understand what they are building and verify whether the result works as intended.</p><p>A useful development workflow should consider the entire process:</p><p>Project Goal → Requirements → Architecture → Code Generation → Code Analysis → Debugging → Testing → Deployment</p><p>This is the direction I want to explore with Geminio OS.</p><p>Rather than treating AI as a tool that simply receives a prompt and returns code, I want to investigate how AI can support different stages of development while keeping the developer involved in important decisions.</p><p>Exploring the AI Builder</p><p>One of the central concepts in Geminio OS is the AI Builder.</p><p>The idea is to organise software creation into connected stages.</p><p>1. Project goal and context</p><p>The process begins with understanding what the developer wants to build, who the application is for, and what problem it should solve.</p><p>2. Requirements and planning</p><p>The system should help turn an initial idea into clearer requirements, features, constraints, and implementation steps.</p><p>3. Project creation and code generation</p><p>Once the requirements are sufficiently clear, AI can assist with creating project structures and generating or modifying code.</p><p>4. Code analysis and debugging</p><p>The implementation should be reviewed for potential errors, inconsistencies, and problems that need attention.</p><p>5. Testing and validation</p><p>Generated code should not automatically be treated as correct. Testing and validation are necessary to establish whether the application behaves as expected.</p><p>6. Deployment preparation</p><p>The final stage involves preparing the application for deployment, documenting relevant steps, and making sure the developer understands how the system is intended to run.</p><p>These stages are part of the direction I am exploring, not a claim that every capability is already complete.</p><p>Why documentation matters to me</p><p>My interest in technical writing influences how I think about software architecture.</p><p>Good documentation is not simply something written after development. It can help developers understand requirements, explain system behaviour, describe APIs, record architectural decisions, and make projects easier to maintain.</p><p>For Geminio OS, I want documentation to be part of the development process.</p><p>That includes thinking about how technical specifications, API references, workflows, testing notes, and deployment instructions can help people understand a system rather than merely interact with its interface.</p><p>This is also why I am interested in the relationship between AI, developer tools, and technical communication. A powerful system becomes more useful when people can understand how it works, what it can do, and where its limitations are.</p><p>Building from Nigeria, one step at a time</p><p>Building a technology project takes more than having an ambitious idea. It requires patience, research, experimentation, and the willingness to revise an approach when it does not work.</p><p>I am building Geminio OS from Nigeria while continuing to learn and develop my engineering skills.</p><p>Some parts of the vision are clear, while others still need research and implementation. I do not expect every idea to work on the first attempt. My goal is to make steady progress, understand the systems I build, and document useful lessons along the way.</p><p>The long-term vision extends beyond a single coding assistant. I am interested in how AI-driven development, automation, learning tools, and eventually device-oriented workflows could fit into a broader ecosystem.</p><p>That vision will take time. For now, I am focused on turning the larger idea into smaller, understandable engineering problems.</p><p>What comes next?</p><p>My next steps involve refining the architecture, improving the development workflow, documenting the system, and testing individual components as they are built.</p><p>I also want to share more of the process publicly—not only the ideas that sound exciting, but also the technical questions, limitations, and lessons that emerge during implementation.</p><p>I believe building in public can create opportunities to learn from other developers, technical writers, researchers, and people interested in AI systems.</p><p>Geminio OS is still a work in progress. I am not presenting it as a finished platform. I am sharing the direction I am working towards and the reasoning behind its design.</p><p>I’m Ezenwa Christian Chimeremeze, the founder and developer behind Geminio OS. I’m building it from Nigeria, one system, one experiment, and one lesson at a time.</p><p>The journey is still beginning.</p><p>A question for fellow developers: If you could design an AI development environment from the ground up, which part of the software development process would you want it to improve first—and why?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c19f5d35d2db" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>