Skip to main content

3 posts tagged with "queues"

View All Tags

The integration sidecar: customer integrations outside your SaaS core

· 10 min read
Martin
Co-Founder and Maker @ Codehooks

Most B2B SaaS teams hit the same request sooner or later. A large prospect is ready to sign, on one condition: the product has to sync with their NetSuite setup, or send webhooks in a format their middleware already expects, or drop a CSV on their SFTP server every night.

The request is reasonable, and the deal is worth it. The awkward question is where the code goes.

This post describes a pattern one of our customers arrived at on their own. They run each customer integration as a small, isolated backend beside their SaaS product, and their core product doesn't change at all. We've started calling it the integration sidecar.

Making a scheduled job resumable after partial failure

· 8 min read
Jones
Co-Founder and Architect @ Codehooks

A nightly job starts at three in the morning, works through 200,000 records, and dies at 03:40 with about 80% done. Nobody is awake. It runs again the following night from the beginning.

If that job is idempotent you lose some compute and nothing else. If it is not, you have just sent 160,000 duplicate emails, or double-charged a batch of invoices, and the morning is going to be unpleasant.

Resumability is what makes the difference, and it is mostly about where you keep three small pieces of state.

Nightly reconciliation: proving two systems agree

· 7 min read
Jones
Co-Founder and Architect @ Codehooks

Every integration between two systems drifts, and usually not through any fault in the code. One side was unavailable for four minutes, or a request timed out after the write had already landed, or someone edited a record by hand.

The integration itself does not notice. It processed the event, got an error, retried a few times and gave up. From its point of view that is a handled failure. From the client's point of view, their stock numbers are wrong.

A reconciliation job is the thing that finds those records. It runs on a schedule, compares the two sides, and re-queues whatever does not match.