Exactly-Once Publishing on Cloudflare D1 Without Transactions

https://hackernoon.imgix.net/images/79HRs4xnb5UK7XbfTI5Pz7TyOhu2-aig3b44.png

I run a small daily game, Costcodle, where everyone guesses the price of the same Costco item each day. Just after midnight UTC, a scheduled job publishes the answer page of every puzzle that has finished. It is a tiny job, and for a while it was the part of the system I trusted least.

The published answer page for Costcodle puzzle #1121: the product photo, the game price of $8.99 and the winning range of $8.55 to $9.43.

The reason was a migration. I was merging two Cloudflare Workers, one for the website and one for scheduled jobs, into a single Worker. Until the old one was deleted, both would fire the same cron string at the same moment, against the same database. I wanted three guarantees to survive that overlap:

  1. Every answer page is published exactly once, and the site's publication revision goes up exactly once per page.
  2. ...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more

https://assets.bwbx.io/images/users/iqjWHBFdfxIU/i51h5KmzUfwI/v1/1200x800.jpg

Sources: social media companies' payouts in teen addiction suits mostly ranged from $2M-$2.5M; Meta agreed to pay two teens a combined $7M in the past two weeks

More: Reuters, CNBC, New York Times, Network World, Associated Press, SemiAnalysis, NPR, Wired, CNBC, Daring Fireball, The Information, NBC News, NBC News, TechCrunch, CNBC, Bloomberg, Tech Brew, The Economist, Financial Times, TechCrunch, Key Context, The Verge, Moneycontrol, Mashable, Decrypt, Exponential View, Business Today, Tom's Hardware, The Guardian, Forbes,

https://media.cnn.com/api/v1/images/stellar/prod/2026-11-09t115214z-950371170-rc2akoa0jnij-rtrmadp-3-nvidia-probe-ceo.jpg?c=16x9&q=w_800,c_fill

Sources: US officials disagree on whether Alice Huang spied on Jensen Huang for China; some at ODNI and CIA say intelligence collected so far doesn't prove it

More: Reuters, CNBC, Network World, New York Times, Associated Press, SemiAnalysis, NPR, Wired, The Information, Daring Fireball, CNBC, New York Times, NBC News, NBC News, CNBC, TechCrunch, Bloomberg, The Economist, Tech Brew, Financial Times, TechCrunch, Key Context, Moneycontrol, South China Morning Post, Decrypt, The Verge, Exponential View, Mashable, Business Today,