← Binderdex dev log

One freshness clock was hiding three problems

#infra#tcg#web#product

A single dashed bar sits above three lanes, each filled to a different length and ending at its own deadline marker, the shortest one glowing amber

My pricing dashboard cried wolf so often that I'd stopped believing it. One rule covered the whole catalog: if any card's price was older than 30 hours, the global status flipped to breached.

That rule worked while BinderDex, my Pokémon card collection and price app, was small and every card refreshed on the same cadence. Then the catalog grew into segments that refresh at very different speeds. A portfolio card going stale at 12 hours is an emergency. A long-tail card going stale at 30 hours is a Tuesday. One clock treated both the same, so the real emergencies hid inside the noise.

Three lanes, three clocks

A lane is a group of cards that refresh on the same schedule. The portfolio lane holds cards that someone has in their collection, and those refresh most often. The value lane holds higher-value cards, and the catalog lane holds the rest. I retired the single metric and gave each lane a freshness SLA of its own, meaning the longest a price may go without a refresh.

BEFORE one clock for the whole catalog Any card older than 30 hours global breach, urgent or not AFTER each lane keeps its own SLA Portfolio lane 12 hours Value lane 24 hours Catalog lane 7 days stale is a user-facing breach mid-priority cards long tail, diagnostic only
The 30-hour rule judged every card alike. Each lane now answers to the deadline its readers need.

The breach check now asks two questions: is any active portfolio card missing a lane, and is any card stale inside its own lane?

function hasBreach(summary) {
  return summary.portfolioPricing.some(s => s.unmappedCards > 0)
      || summary.pricingLanes.some(s => s.staleCards > 0);
}

No lane is a hard red

The first question is the part I'm happiest with. A card with no lane used to count toward nothing and fell through silently. Now an active portfolio card without a lane is an explicit breach.

The old whole-catalog count stays on the dashboard as a diagnostic and no longer drives a decision. Six per-game stale-card series feed my monitoring dashboard, so I can see which game's pricing is lagging. The other freshness checks were already specific enough, so I left them alone.

An alarm needs one meaning

A single threshold over mixed workloads ends up too loud for the slow ones and too quiet for the urgent ones. Split the clock wherever the cost of being late is different.

This is the build log for Binderdex (www.binderdex.com) · All entries · Weekly essays