~/writing · pragmatic engineering · AI agents · teams

Engineering notes, on reliable software, AI systems, and delivery.

Design decisions, failure paths, and verification methods from building product infrastructure and production AI systems.

featured notearchitecture

Practical idempotency patterns for reliable workflows

Use idempotency keys, state predicates, and an outbox so retries return one business outcome.

moMohamed Meabed· 9 min read
// from the work
architecture → decision → check
↘ result
// team rule
change = reviewed + tested
Latest writing
architecture·Jul 23, 2026

How I built my site

One validated MDX entry feeds SSR, raw Markdown, search, RSS, sitemap, and social images; Bun runs the Nitro server and SQLite write path.

13 min read
mongodb·Jun 28, 2026

Flexible MongoDB schemas for fast-changing apps

Indexed fields, schema versions, and tolerant readers let old and new application versions run together while record-specific fields change.

8 min read
mongodb·Jun 28, 2026

Build RAG with MongoDB Vector Search

Store chunks, embeddings, metadata filters, permissions, and answer traces together, then keep dimensions and candidate counts tied to runtime configuration.

8 min read
llm·Mar 4, 2026

LLMs in production: tools, retrieval, evals

A production LLM system needs traceable retrieval, constrained tools, evaluations, and an explicit path for low-confidence answers.

9 min read
llm·Feb 25, 2026

Scope and verify coding agents

Repository rules, infrastructure code, CI, tests, and logs give agents concrete boundaries and checks.

8 min read
aws·Feb 16, 2026

How an AWS-to-GCP migration cut our cloud bill about 70%

Inventory dependencies, move one workload at a time, measure cost and behavior, then delete the old path after rollback is no longer needed.

8 min read
kubernetes·Feb 6, 2026

Offline-first mobile when the network is bad

The cluster and API only matter if the field worker can capture intent offline, reconnect, and trust the result that comes back.

9 min read
nodejs·Jan 28, 2026

MongoDB modeling mistakes that show up late

Pick the datastore by how the app reads and writes data, then watch the document that quietly outgrows memory.

9 min read
terraform·Jan 19, 2026

Use Terraform for durable settings and Ansible for machines

I keep repository and cloud configuration in Terraform, machine setup in Ansible, and one small command interface in front of both.

6 min read
nginx·Aug 12, 2018

Redirect plain HTTP sent to an nginx HTTPS port

nginx uses internal code 497 for this protocol mismatch. Handle it at the TLS listener, keep the caller visible in logs, and fix clients you control.

5 min read
docker·Oct 27, 2014

Docker images should package verified builds

Run the checks in CI, keep config at runtime, and give the container one explicit writable directory.

8 min read
magento·Sep 5, 2013

How Magento catalog, stock, payment, and cache state disagree

The fastest way through a Magento incident is to identify the authoritative record, then reconcile the indexes, caches, and external systems that copied it.

8 min read