codewithkarani
All topics

Category

Software Design

Every guide on Software Design from Code With Karani - 7 field-tested articles on Software Design for developers and teams.

7 articles

July 2026

  1. A payment source, not a payment parser: what keeping the pipe dumb actually buys

    The SMS gateway could have extracted the M-Pesa transaction code on the phone. It deliberately does not. Here is what that bought, what it cost, and the boundary question every integration eventually has to answer: where does meaning belong?

    11 min read

  2. The agent drafts, the human commits: designing the write path for a business AI

    A wrong read costs minutes. A wrong write costs a reconciliation. So the commit lives behind an HTTP endpoint the agent cannot call - and everything it can do is scoped to the requesting user, written to an audit row in the same transaction, and given a tested reversal.

    6 min read

  3. Hosted brain, dumb connector: splitting an AI agent so the data never leaves the client

    Ship your agent to the client and you hand over your product. Pull their data to your platform and you become the custodian of their business records. The third option is a split: a hosted brain that decides what to fetch, and an on-prem connector with no intelligence in it at all.

    6 min read

June 2026

  1. Your Redis Cache Is Serving Yesterday's Data: Fixing Invalidation Properly

    Stale cache incidents have no error message, only a DEL that returns 0. Here is why Redis invalidation breaks, the structural fix, and how to prove it worked.

    10 min read

May 2026

  1. Your Queue Isn't Broken: Background Jobs Need Idempotency, Not Exactly-Once

    A crashed worker charged the card twice. The queue did its job: at-least-once delivery. The real fix is an idempotent handler, not exactly-once infrastructure.

    8 min read

April 2026

  1. Why Last-Write-Wins Sync Silently Destroys User Data (and What to Use Instead)

    Last-write-wins on a client clock is data loss disguised as conflict resolution. Here is the mechanism, and the version numbers, per-field counters and CRDTs that fix it.

    8 min read

May 2022

  1. How To Remotely Host ERPNext Database

    Good software design will emphasize the importance of separating the database from the software application. The server where the database is hosted needs an extra layer of protection as it contains…

    2 min read