cd /news/developer-tools/deduplicating-event-feeds-name-and-s… · home › topics › developer-tools › article
[ARTICLE · art-180860] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Deduplicating event feeds: name and start time are not an event ID

A developer building the 3BetLab tournament finder outlined an ingestion pattern for deduplicating event feeds that relies on a provider's occurrence ID scoped to its namespace rather than a title-and-start-time key, since a rescheduled event would otherwise appear as new. The approach uses a separate monotonically increasing revision to order updates via a conditional upsert, retains cancellation states instead of deleting rows, and flags same-revision conflicts, with the developer warning that normalized titles and time windows should only suggest matches, not merge them automatically.

recommendation

Key event feeds on provider occurrence IDs and guard upserts with a revision comparison, then test duplicates, late older revisions, moved start times, same-title collisions and cancellation retries.

more in playbook: Running AI in production
by read2 min views3 publishedDec 3, 2026

Disclosure: The draft and sample SQL were generated with AI.

A calendar lists “Daily Turbo” at 18:00. An hour later the provider shifts it to 18:20. If your key is (title, start_time), the update looks like a new event. If you drop the time from the key, tomorrow’s “Daily Turbo” may overwrite today’s.

A reliable identifier is the provider’s occurrence ID, scoped to the namespace where it is unique. A recurring-series ID identifies a template, not one running of the tournament. If the provider has no reliable occurrence ID, don’t silently pretend a name and a clock time can supply one.

Use a separate revision to decide whether an update is newer. Receipt time tells you when you saw a message, not whether it supersedes another one. If the provider documents a monotonically increasing revision per occurrence, an upsert can enforce that ordering:

INSERT INTO event_occurrence
  (source_namespace, source_occurrence_id, revision, title, starts_at, state)
VALUES
  ($1, $2, $3, $4, $5, $6)
ON CONFLICT (source_namespace, source_occurrence_id)
DO UPDATE SET
  revision = EXCLUDED.revision,
  title = EXCLUDED.title,
  starts_at = EXCLUDED.starts_at,
  state = EXCLUDED.state
WHERE EXCLUDED.revision > event_occurrence.revision;

Import revision 12 twice and you still have one row. Import revision 11 after 12 and a reschedule cannot roll back. If revision 13 cancels the event, retain that cancellation state instead of deleting the row: otherwise, a late revision 12 could insert the event again. If two messages carry the same revision but different content, flag the conflict.

A public calendar and a live lobby may use different IDs for the same occurrence. Store both identities and map them to a canonical listing only when you have an explicit cross-reference or have verified the match. A normalized title and a narrow time window can suggest a candidate, but shouldn’t merge it automatically.

Test a duplicate, a late older revision, a moved start time, two distinct events with the same title and time, and a cancellation followed by a retry. Also check that a partial page doesn’t cancel an event simply by omitting it.

I develop the 3BetLab tournament finder, where tournament cards link back to published sources. The SQL illustrates an ingestion pattern, not the production schema.

── more in #developer-tools 4 stories · sorted by recency
── more on @3betlab 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/deduplicating-event-…] indexed:0 read:2min 2026-12-03 · —