ring will continue with middleware, but as pedestal has shown, interceptors are nicer with async apps. would it be possible to polish the pedestal interceptor spec to be abstract spec like the ring-spec?
would allow one to write (and use!) 3rd party interceptor libs with multiple web frameworks.
If the pedestal-spesific keys for queue, stack and error would be lifted into the spec? e.g. :io.pedestal.interceptor.chain/error
could be just :error
.
so, the interceptors as maps would look like this:
{:enter "ctx => ->ctx function with :request key"
:leave "ctx => ->ctx function with :response key"
:error "ctx => ->ctx function with :error key"}
or supporting dynamic queuing:
{:enter "ctx => ->ctx function with :request & :queue key"
:leave "ctx => ->ctx function with :response & :stack key"
:error "ctx => ->ctx function with :error key"}
that is basically what we did with Sieppari.
@ddeaguiar what do you think?