Skip to main content
WritingVideosSpeakingCodeAbout

Series

The Second Pattern

Nine architecture patterns that rarely get named in PHP, and one article on the ones that are not worth it. Each starts with the obvious move, finds the exact point it breaks, then reaches for the pattern that fits. Built in Tempest, aimed at anyone writing PHP REST APIs.

10 parts128 minStarted Aug 2026

The curriculum

10 parts, read in order.

  1. 1

    The Second Pattern: Specification

    Nine optional parameters is the symptom. The problem is a business rule that has to run in SQL and in memory, written twice and quietly drifting apart.15 min read
  2. 2

    The Second Pattern: Anti-Corruption Layer

    Carrier B speaks GraphQL, so the response arrives shaped like your query and feels like it belongs to you. It does not, and their vocabulary is now load-bearing in your domain.12 min read
  3. 3

    The Second Pattern: Transactional Outbox

    Commit then notify loses messages. Notify then commit sends lies. The dual write problem has no clever solution, and Tempest ships more of the machinery than it advertises.15 min read
  4. 4

    The Second Pattern: Idempotent Receiver

    Select then insert handles the easy half of duplicate delivery and misses the concurrent case, which is the half that actually fires. This time the framework has already done it properly.11 min read
  5. 5

    The Second Pattern: Claim Check

    A payload that is 40KB almost always and 12MB occasionally cannot be sized for. Making it smaller is not the fix, because the problem is the channel it is moving through.12 min read
  6. 6

    The Second Pattern: Bulkhead

    Carrier B did not go down, it got slow, and every worker sat inside an eleven second call that returned a valid 200. Circuit breakers ask the wrong question about that.13 min read
  7. 7

    The Second Pattern: Process Manager

    Everyone calls it a Saga. Most of the time it is a Process Manager, and the muddle is why teams adopt the word and then never write the compensations it never promised them.14 min read
  8. 8

    The Second Pattern: Event-Carried State Transfer

    A consumer that receives an ID and immediately asks you for the record has not been decoupled from you. It has been given a slightly slower way to call your API.12 min read
  9. 9

    The Second Pattern: Blackboard

    A pipeline works until one step both needs and improves the same piece of information. That is a cycle, and a topological sort has exactly one contract: there are no cycles.12 min read
  10. 10

    The Second Pattern: The Ones I Left Out

    Five patterns I know well, that come up constantly, and would not reach for in PHP. Not because they are bad ideas, but because of what the runtime does and does not give you.12 min read

Share

XLinkedIn

Related

More series

All series →