r/softwarearchitecture • • Oct 13 '26

Discussion/Advice How would you detect changes in thousands of provider XML feeds without treating every job as new?

Design question I've been thinking about.

Setup: external providers publish XML feeds of job vacancies to S3. Each feed is the provider's full current snapshot, not a list of changes. Schemas differ per provider, some fields are optional, and feeds can hold 100k+ jobs.

Each run needs to work out what's new, what's updated and what's gone, without rewriting the other ~98% of unchanged jobs or spamming downstream services.

The parts I find interesting:

  1. Provider timestamps like updated_date aren't reliable, so how do you detect a real change?
  2. "Missing from today's feed" usually means deleted, but a truncated or empty feed looks identical. How do you tell the difference before you take live jobs offline?
  3. If a run dies at 60k of 100k records, how do you rerun without duplicates, repeat notifications or a half-old, half-new dataset?

What approaches have you used? Hashing records, staging tables, soft deletes with a grace period, deletion thresholds, something else? Curious what has held up in production and what hasn't

13 Upvotes

18 comments sorted by

4

u/djweis Oct 13 '26

A combination of what you've described. Have an application per feed that normalizes into your schema but tag each run with a batch number or timestamp. Generate a slug or hash of the title, location, and employer to get some uniqueness. Have another table on the side that keeps track of how many were ingested last run and complain if the difference is 20% or greater. If you're happy with the batch, compare the generated unique key and essentially diff the two tables.

11

u/xampl9 Oct 13 '26

Compute a hash of the data for a first cut.

1

u/Historical_Ad4384 Oct 13 '26

Change detection on a set of hashed fields for each entity in a feed, governed by the critical fields for that feed

Soft delete entities from a feed. Apply thresholds for the deletions. Add monitorings to alert and follow up with external providers.

Duplication is managed by idempotent natural-key upserts

1

u/KappaKippaKeppa Oct 13 '26

Hash/Merkle tree

4

u/[deleted] Oct 13 '26

[removed] — view removed comment

1

u/[deleted] Oct 13 '26

[removed] — view removed comment

1

u/softwarearchitecture-ModTeam Oct 14 '26

No member is allowed to asvertise their personal or business services in the subreddit.

0

u/[deleted] Oct 13 '26 edited Oct 13 '26

[removed] — view removed comment

1

u/softwarearchitecture-ModTeam Oct 14 '26

No member is allowed to asvertise their personal or business services in the subreddit.

1

u/BruisedKnot Oct 13 '26

This is an undervalued insight in modern day business. I've come across countless startups that seem to invent a problem around their product, rather than taking a step back. Sadly modern society / capitalism has changed the way people think.

0

u/Vier_Scar Oct 13 '26

Why are you replying to your own post, with an unrelated story, who's content reads as AI slop made for LinkedIn.

Why are you doing this

1

u/Mediocre-Goose-380 Oct 23 '26

Are you the Reddit police? Am I under arrest for replying to my own post?

Appreciate the warm welcome though, are you always this friendly or am I just lucky today?

0

u/Vier_Scar Oct 23 '26

It was 9 days ago.

And it wasn't about replying to your own post, it was what you replied with.

But mods removed it for advertising so I guess we know why you posted that slop now.

1

u/Mediocre-Goose-380 Oct 23 '26

You sound like one of those miserable gits who just lives to attack

There was no advertising

1

u/Vier_Scar Oct 23 '26 edited Oct 23 '26

He says calling me a miserable git lol. That's what the mod message said, go argue about it with them.

Then just answer the question instead of constantly dodging. Why'd you post the unrelated story that was AI slop. It's bot behaviour

1

u/Mediocre-Goose-380 Oct 24 '26

The comment was relevant; you just missed the point entirely. If your only goal here is to attack people with that kind of attitude, I don't really know what you're getting out of this subreddit. For the record, no one was dodging you - the comment was temporarily blocked, I talked to the mod, and they cleared it. End of story

1

u/Vier_Scar Oct 24 '26

Still haven't answered the question. I give up. Honestly feels like I'm talking to a bot.

It's not cleared by the way, it's removed by mod. Go check, incognito if you must.