Hermes Wiki

ChainOfResponsibility

Passes a request along a chain of handlers, each of which either handles it or passes it to the next — decouples the sender from knowing which handler will process it.

Why we need this / what value this brings

Decouples 'who sends a request' from 'who handles it,' and lets the set of handlers change without touching the sender.

When to use this

A request should be handled by the first of several handlers capable of handling it, without the sender knowing which one that will be.

How to use or implement this

Each handler either processes the request or passes it to the next in the chain; middleware pipelines (auth → validation → rate-limit → handler) are this pattern in practice.

Research questions

  • Middleware pipelines (auth → validation → rate limit → handler) are a textbook chain of responsibility — worth comparing directly against Decorator, which solves a similar-looking problem differently.

Empty folder — drop notes, links, and findings here as you research.

Hermes Wiki