Zum Inhalt springen
#0712
Exec
NEW PRIMITIVE

Middleware without a framework

A rate limiter, in front of a cache, in front of an auth gate, in front of the API. Four concerns, four scripts, each one MITMing the next: chained interception with no fixed depth.

Each layer is an exec script with its own URL. Reordering the stack is repointing URLs. Removing the cache is pointing past it. Testing the auth gate alone is calling its URL directly. No framework mounted these layers and no process contains them; one can even live in a different container than the next.

Middleware used to be a call stack inside one app, born and dying with the process. Here it's infrastructure: addressable, rearrangeable, deletable layer by layer.

The middleware stack is a chain of URLs.