</>CodeWithKarani
All topics
Topic

Software Design

7 articles in this topic.

Software Design11 min read

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?

Read
AI Engineering6 min read

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.

Read
AI Engineering6 min read

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.

Read
Databases10 min read

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.

Read
APIs & Integrations8 min read

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.

Read
Mobile Engineering8 min read

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.

Read
Technology2 min read

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…

Read