Coming Soon

The YPMan Atomic Table Swap

Zero-downtime directory updates without microservices

2026-05-22 ~10 min
Coming soon. This article is on the writing queue. The outline below sketches what the finished piece will cover. In the meantime, the Celenite Stack reference and the source on github.com/davestj are the best places to dig into the underlying systems.

How a 10-stage internet-radio directory sync pipeline lives inside a single C++ daemon, and the single MariaDB RENAME TABLE call that gives the public yp.casterclub.com directory zero-downtime guarantees even when the upstream Xiph feed breaks.

Live repository

davestj/Mcaster1YPMan private
Mcaster 1 YP Manager
0 0 Mar 10, 2026

What the article will cover

The problem

How "the upstream feed broke halfway through your sync" becomes "your public directory is empty" — and why that's unacceptable.

The 10-stage pipeline

Fetch → parse → crawl → sanitize → verify → write → guard → archive → swap → export. What each stage does and how they share state safely in one process.

Writing to temp tables

Why every write goes to temp_stations / temp_mounts instead of live, and what guarantees that buys you.

The Swap Guard

The 100-station floor that aborts the swap on a bad sync. The full check matrix and the abort/retry logic.

RENAME TABLE: the atomic call

The single line of SQL that flips live to old and temp to live atomically. Why MariaDB guarantees this and what happens to in-flight reads.

Why microservices would lose this

A walk through how splitting this pipeline into a "fetcher service" and "writer service" breaks the guarantee — and what saga patterns can't recover.

mariadbc++atomicitypipelines
All Engineering articles