Fork me on GitHub
#pedestal
<
2016-09-15
>
mtnygard21:09:06

New guide published: Defining Routes http://pedestal.io/guides/defining-routes (this uses the table routing syntax)

mtnygard21:09:21

Reviews, issues, and pull requests are most welcome.

shaun-mahood21:09:05

I see some blank spaces in the guide for interceptors - if I wanted to read up on them generally, are there any existing resources you would recommend?

mtnygard21:09:41

Calling it "some blank spaces" is being kind... that guide is nothing but blank spaces as yet. 🙂

mtnygard21:09:11

You can get some information from the somewhat outdated guide in the pedestal repo itself. https://github.com/pedestal/pedestal/blob/master/guides/documentation/service-interceptors.md

mtnygard21:09:45

A more recent version appears in one of the hello world guides. http://spark-gap:8820/guides/hello-world-content-types#_interceptors

mtnygard21:09:52

Oops, local link. One ec.

mtnygard21:09:22

As you read those, please send me any questions that they don't answer. That'll help me know what to cover.

shaun-mahood21:09:58

While we're on the topic, was there any kind of prior or inspiration for Pedestal interceptors that would be worth looking into for general interest? I can't remember if I've ever seen anything about the genesis of the idea and always have had the assumption that they were invented for Pedestal based on issues with Ring middleware.

mtnygard21:09:24

They came up through a long series of discussions that many people at Relevance took part in. We looked at things like servlet filters, valves (from Tomcat IIRC), ATG's servlet pipeline.

mtnygard21:09:33

All of those were very code-centric solutions.

mtnygard21:09:40

We wanted something that was more like data.

mtnygard21:09:55

We started talking about continuation-passing systems and the idea of a reified call stack emerged.

mtnygard21:09:44

Things clicked quickly after that. It was easy to see how to implement parts of the framework itself as interceptors. It was also easy to see how we could pause and resume on different threads. Async and SSE was always part of the design space for Pedestal, so interceptors really fit the bill there.

mtnygard21:09:02

More broadly, I guess you could say interceptors are an example of the Pipeline architecture pattern.

shaun-mahood21:09:25

Cool, that's pretty interesting - reified call stack is a concept that really sits well with me.