← BACK TO SELECTED WORK04 / REFERENCE SYSTEM / INTEGRATION RECOVERY

Relay Sync

A product catalog and an external storefront will eventually disagree. The integration needs to explain why and give an operator a path back to a consistent state.

ROLE SYSTEM DESIGN / IMPLEMENTATIONSTATUS RUNNABLE REFERENCE + BROWSER REPLAYDOMAIN COMMERCE INTEGRATIONS
01 / PROBLEM

A successful HTTP request is not a reliable sync strategy.

Catalog webhooks can be repeated or arrive out of order. A partner may accept a write and then time out before acknowledging it. Someone may edit the storefront without changing the source catalog. The integration has to preserve what it knows, expose what it does not, and make repair deliberate.

02 / DELIVERY CONTRACT

Signed intake, version gating, and idempotent delivery.

The Python reference service verifies HMAC signatures over raw request bytes and records events in an inbox. It rejects conflicting event IDs, prevents older product versions from overwriting newer ones, and sends an idempotency key to an optional HTTPS partner adapter.

  • Temporary failures receive bounded exponential retries; permanent failures move to dead letters.
  • Operators can inspect queue health and replay an event after resolving the cause.
  • A receiver must durably deduplicate the idempotency key when a response is lost after acceptance.
03 / FAILURE & REPAIR

Make drift measurable and repairable.

The system keeps a source snapshot and target mirror. A reconciliation pass compares source-owned fields and can restore the target while recording an audit entry. The local dashboard shows pending events, dead letters, product mirrors, and drift.

With a real external endpoint, there is no atomic transaction spanning the local database and the partner. The design treats that uncertainty as an integration contract, not an implementation detail to hide.

ENGINE
Python · SQLite · signed webhook API
DELIVERY
Version gates · retries · dead letters · idempotency keys
OPERATIONS
Audit trail · drift detection · replay and repair
04 / DEMO & LIMITS

Run the failure path yourself.

In the browser replay, generate an event, simulate a partner outage, process until it dead-letters, then replay and deliver it. Introduce storefront drift and repair it. The hosted page is synthetic and browser-local; the Python/SQLite service is runnable separately from the repository.

REFERENCE SYSTEM · SYNTHETIC CATALOG · NO LIVE SHOPIFY OR CUSTOMER CONNECTION

BACK TO THE FIRST PROJECTPropsynk ↗