Fork me on GitHub
#lambdaisland
<
2020-03-29
>
dominicm12:03:46

I'm curious to know what coffee grinders offer which interceptors do not. I don't see them as more general than interceptors, they appear to be interceptors.

plexus12:03:46

an interceptor is a coffee grinder but not the other way around. Nothing of what I show in that blog post is an interceptor.

plexus12:03:35

interceptors in particular have the enter/leave/error split, and the queue+stack, and a strong assumption that you're dealing with request->response (e.g. in Sieppari you can't just give it a context, you have to start from a request). So they're a specialized case that assumes you're doing http request handling. My point is that you can boil that down to its essence, and then do different things with it.

dominicm12:03:38

Sieppari seems to work with an arbitrary context. For example, the read me uses {:x 1}

dominicm15:03:13

I'm certain that pedestal also works with an arbitrary map too.

dominicm15:03:26

So the big difference would be the lack of pre post

plexus15:03:44

{:x 1} is a request map, not a context map

plexus15:03:19

The big difference is that one is a category of which the other is a member

dominicm15:03:45

I thought a request map was about ring, so I've misunderstood.

dominicm15:03:39

Hmm, so with sieppari, the reasoning is that it doesn't take the queue as part of the map it is initially given? It takes a M & a queue separately?

plexus15:03:46

That does seem to be what sieppari does, yes

dominicm15:03:01

What I'm trying to clarify, what the distinction is here.

plexus15:03:59

The distinction between what? I feel like you're asking me to explain to difference between rats and rodents, or between OO and Java

dominicm15:03:43

It's different from that. I understand the distinction between interceptors and sieppari. I don't understand the distinction between coffee grinders and interceptors. Coffee grinders are interceptors without enter/leave, and the API is focused on a context instead of a request?

plexus15:03:36

Coffee grinders=rodents, interceptors=rats. One is a sub group of the other

plexus16:03:16

Have a look at the first blog posts, there are some more examples there

plexus16:03:06

Or look at the definition at the top of the post, and see if you can imagine something that adheres to that that is not interceptors

plexus16:03:29

My main point is that instead of only using a few specific implementations for a few specific use cases people should be encouraged to see the general pattern, and how variations of it can be applied to many different use cases.

ikitommi16:03:41

there is #interceptors , goal was to do a spec for interceptors, like there is the ring spec. Or, discuss the difference with pedestal and sieppari.

dominicm16:03:53

I kinda thought that interceptors was that word previously, really.