Mehdi Akiki
Writing / Series

Reliable Data Integrations

Synchronization, events, schemas, and recovery

Engineering patterns for integrations and distributed data flows that must stay understandable when APIs change, deliveries repeat, and parts of the system fail.

The model behind the series

Connecting two systems is easy in the successful case. The durable design appears in the less comfortable cases: duplicate delivery, partial progress, conflicting changes, disappearing records, schema drift, and a replay that happens months later.

This series treats integration as a systems problem. It develops explicit models for identity, ownership, ordering, recovery, and observability, then shows how those models guide implementation.

Core principles

01

Model identity and ownership first

A synchronization flow needs explicit answers about which records correspond and which system may change each field.

02

Design the replay before the happy path

Retries, idempotency, checkpoints, tombstones, and reconciliation are normal operation, not exceptional add-ons.

03

Translate at system boundaries

Stable internal models contain provider-specific schemas and keep external change from spreading through the product.

Start here

Entry points into this subject, ordered as a reading path.

01

How to Keep Two Systems in Sync

When you sync two systems with webhooks, the copy slowly becomes wrong: some events are lost, some are duplicated, some arrive in the wrong order. Reconciliation is the way to make the two systems agree again. Here is how to design an API for it.

03

gRPC from the Ground Up: The Real Parsing Stack

What actually happens between bytes arriving on a socket and your gRPC handler running? This article walks one real request through every parsing layer — TCP, HTTP/2 frames, HPACK, gRPC envelope, protobuf — so the magic disappears.

Articles

Interrupted execution

Resuming a Paginated Import After Page 417 Fails

A paginated import should resume from a committed cursor and stable item identities, not from a human page number that may no longer describe the same data.

Interrupted execution

Preventing an OAuth Token Refresh Stampede

A concurrent refresh design using local single-flight work, database versions, conditional writes, and recovery rules for providers that rotate refresh tokens.

Interrupted execution

Webhook Signatures Need Replay Protection Too

Webhook verification middleware and tests that authenticate the exact request bytes, reject stale signed deliveries, support key rotation, and deduplicate effects durably.

Interrupted execution

Sharing One Provider Quota Across Many Customers

When all tenants consume one provider quota, local retries and per-worker limits are not enough. Use a global budget with fair tenant admission and feedback.

Shorter pieces and reference

Older, introductory or narrower pieces on the same subject.

Engineering context

When an integration has to survive production

I design data and integration systems around explicit contracts, observable failure, safe recovery, and the realities of changing external APIs.