Mehdi Akiki

Posts tagged "backend"

  • Published on

    Reference · Interrupted execution

    Give Every Agent Tool Call a Deadline

    When an agent calls a tool, it stops and waits. If the tool is slow, the whole turn is slow, and the user waits with it. The fix is small: put a deadline on every tool call.
  • 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

    Reference · Interrupted execution

    Optimistic Locking With a Version Number

    Two requests read the same row, both change it, and the second save quietly erases the first. A version number turns that silent bug into a conflict you can catch. Here is how optimistic locking works.
  • 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.