← All work

01Case study, Harvest Group

Three systems at Harvest Group

Three systems I built at Harvest Group, where I have worked since 2021. This is employer work, so it stays at the level of design and decisions: no client names, internal names, code or confidential data, and the figures are rounded.

Role
Design Engineer, senior software engineer level
Timeline
2021 to now
Systems
Ingestion, digital shelf, self-healing scraper
Stack
.NET, Python, Azure, AWS, Snowflake, Airflow

1. A Snowflake bill cut by over 99%

In 2025, as Application Development Manager, I redesigned how an ads platform's hourly metrics reach Snowflake: about a million messages a day on the largest of three datasets.

The problem. Each message was written to S3 as its own file, and Snowpipe loaded every file separately. In four weeks that came to about 35 million tiny files, and Snowpipe charges an overhead on each file, however small.

The fix. Batch before Snowflake ever sees the data. A Lambda triggered by SQS takes up to 10,000 messages, or five minutes of traffic, sums the metrics per campaign and hour, and writes one file. A second Lambda, on a schedule, combines those files again and archives its inputs. Snowpipe now loads about 100 files a day, and the pipes use under one Snowflake credit a month.

The tradeoffs. They were deliberate. Two of the three datasets now arrive daily instead of hourly, and summing per campaign and hour drops finer ad-level detail. Because the metrics are sums, the order in which messages arrive does not matter.

What I would do differently. Make each batch write idempotent from the start, using the stream's own message IDs, instead of removing duplicates downstream. Add a dead-letter queue and an alarm on queue age. Keep the functions in infrastructure as code, with tests.

2. From a proof of concept to a production digital shelf

Spotlight. I built Spotlight as a proof of concept, and I still maintain it on my own. Account teams use it to see a product's price and stock in a given US zip code, and how they change. An hourly job checks each tracking rule's schedule, asks a scraping vendor for every product in every zip code, polls for the results and appends them to Snowflake. A .NET 8 API compares consecutive scrapes when they are read, and a React app shows what changed.

Every scrape costs money. That shaped the design more than anything else. Airflow retries are off on purpose, because each retry pays for a new scrape; the call that starts a scrape retries with backoff instead. A run claims its slot when it starts, not when it succeeds, so a slow scrape is never started twice. Runs that outlive the polling window are parked and picked up on the next tick, and results that already finished are downloaded again rather than scraped again.

Into production. Spotlight's approach became the digital shelf in the company's production platform, and I built its first version. It is event-driven: the vendor delivers JSON exports to Blob storage, a Service Bus message triggers an Azure Function, and the function loads PostgreSQL as current state plus a change log, ingesting each file version once. A .NET API serves it to a React app. It reads 15M+ product pages a month, and the platform's own team runs it today.

What I would do differently. Treat cost per scrape as a first-class metric from day one, with a daily budget and an alert when spend crosses it. And keep dashboards and alert rules as code, next to the pipeline.

3. A scraper that repairs its own selectors

The problem. Scrapers break when a retailer changes its page layout. Someone notices the gaps, finds the broken selector and patches the parser by hand.

The design. Two paths. The normal path is deterministic C#: saved selectors, checked as they run, with no LLM call, so it stays cheap and predictable. Gemini runs only when a retailer is onboarded, or when every saved selector fails its check. It proposes new selector mappings, and each set is stored as a new version of a JSON file.

Why not let the model scrape? An LLM call on every page would cost more, run slower and could give different answers on different days. Keeping the model at the edges turns its output into something a person can read, compare and roll back.

Where it stands. A proof of concept I built on my own in about two weeks, running on Azure Container Apps.

What I would do differently. Have a person approve a new mapping before it goes live for a high-value retailer, and track how often the fallback fires for each retailer: that number is the honest measure of how often layouts change.