Mehdi Akiki

Posts tagged "api design"

  • Published on

    Article · Derived state

    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.
  • Published on
    Most API errors are written for a human reading logs, not for the program that has to react. Here is what most APIs do, what the standard says, and the small set of rules that actually make errors useful.
  • Published on

    Reference · Derived state

    Cursor Pagination vs Offset Pagination

    Offset pagination is easy to write and breaks in two ways: it gets slow, and it skips or repeats rows when the data changes. Cursor pagination fixes both. Here is the difference.
  • Published on

    Reference · Interrupted execution

    What an Idempotency Key Is (and How to Build One)

    A request times out, you retry, and now the customer is charged two times. An idempotency key is the small idea that makes retries safe. Here is what it is and how to build one.