lambdaisland

dominicm 2020-03-29T12:26:46.004500Z

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.

plexus 2020-03-29T12:32:46.005100Z

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

plexus 2020-03-29T12:36:35.007200Z

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.

dominicm 2020-03-29T12:47:38.008300Z

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

dominicm 2020-03-29T15:08:13.008900Z

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

dominicm 2020-03-29T15:08:26.009400Z

So the big difference would be the lack of pre post

plexus 2020-03-29T15:32:44.010Z

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

plexus 2020-03-29T15:33:19.010600Z

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

dominicm 2020-03-29T15:43:45.011200Z

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

dominicm 2020-03-29T15:49:39.012400Z

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?

plexus 2020-03-29T15:52:46.013Z

That does seem to be what sieppari does, yes

dominicm 2020-03-29T15:55:01.013700Z

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

plexus 2020-03-29T15:55:59.014900Z

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

dominicm 2020-03-29T15:57:43.017600Z

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?

plexus 2020-03-29T15:59:36.018700Z

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

plexus 2020-03-29T16:00:16.019800Z

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

plexus 2020-03-29T16:01:06.021200Z

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

plexus 2020-03-29T16:06:29.023200Z

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.

ikitommi 2020-03-29T16:09:41.025800Z

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.

dominicm 2020-03-29T16:14:53.026400Z

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