databases
Relational, time-series and the schema decisions that outlive the code.
-
OpenTaberna: Headless, Open-Source E-Commerce You Self-Host
OpenTaberna is headless, open-source e-commerce: an Apache-2.0 shop API on FastAPI and PostgreSQL that you self-host with Docker Compose.
-
The Transactional Outbox: Never Losing a Job You Already Committed
Transactional outbox in Postgres: commit-then-enqueue loses jobs on a crash. A SKIP LOCKED relay to Redis Streams and an idempotent consumer.
-
Running Alembic Migrations Once, Before the Workers Fork
alembic upgrade head in app code runs once per gunicorn worker and races. Running it in the entrypoint under pg_advisory_lock, before exec.
-
Preventing Overselling with a Database CHECK Constraint
violates check constraint "stock_not_negative": why check-then-decrement oversells under READ COMMITTED, and a single conditional UPDATE that cannot.
-
Sizing Redis maxmemory Against a Stream Trim Threshold
OOM command not allowed when used memory exceeds maxmemory on XADD MAXLEN: why the stream never trims itself, and why a standalone XTRIM still works.