prop/config
Graham McIntire 690a3523e2
Dual-write propagation scores to binary files on /data
First step of the disk-backed scores migration from the DuckDB plan
doc. Ended up shipping the raw-binary variant instead of Parquet
because the data is disposable after ~2h — the ecosystem benefits
of Parquet only pay off for long-lived datasets, and the binary
path has zero new dependencies.

Microwaveprop.Propagation.ScoresFile writes one file per
(band_mhz, valid_time) tuple under the configured scores dir,
default /data/scores in prod and priv/dev_scores in dev. Layout is
a 33-byte header plus a dense n_rows × n_cols uint8 array (255 is
the no-data sentinel). The whole CONUS grid serializes to ~93 KB
per band, and writes use the temp-then-rename pattern so NFSv4
concurrent readers never see a partial file.

Propagation.replace_scores/2 now materializes the score stream
once and dual-writes: Postgres on the primary path, then one
ScoresFile per band as a best-effort follow-up (any file error is
logged but doesn't fail the DB write, so we can verify the file
path in prod before cutting readers over).

Propagation.prune_old_scores/0 also clears expired score files so
the existing 15-minute prune cron covers both storage layers.

Dev configuration points at priv/dev_scores/, added to .gitignore.
Test configuration points at a per-run tmp directory.
2026-04-14 14:36:55 -05:00
..
config.exs Process one forecast hour per PropagationGridWorker perform 2026-04-14 13:24:59 -05:00
dev.exs Dual-write propagation scores to binary files on /data 2026-04-14 14:36:55 -05:00
prod.exs Configure outbound SMTP email via Swoosh with TLS 2026-04-02 13:08:50 -05:00
runtime.exs Move NFS share from skippy to node3 at 10.0.15.103:/data 2026-04-14 14:25:42 -05:00
test.exs Dual-write propagation scores to binary files on /data 2026-04-14 14:36:55 -05:00