interceptors

mdiin 2022-09-09T06:56:03.464839Z

I see more people mentioning that Sieppari is tied to the request/response model, but isn’t that only if you use the execute function? To me it looks like the execute-context function makes no assumption about the underlying context.

👍 1
mdiin 2022-09-09T06:56:58.311659Z

I’m only using sieppari with reitit at the moment, but am trying to understand more about using it in other contexts.

ikitommi 2022-09-09T11:23:38.601539Z

what kind of contexts? Story of sieppari: 1. it was inlined in reitit 2. it was pulled out as a separate library 3. it got new features, which were not all good 4. it’s stable (`0.0.0-alpha13`😉 ) but not actively develop

👍 1
ikitommi 2022-09-09T11:23:45.986409Z

you can use it in other contexts too

ikitommi 2022-09-09T11:24:52.920289Z

but, like with other dynamic-queue-interceptor-libs, you have a performance penalty of allowing the queue to be modified at fly. If that’s ok, it’s an ok lib.

ikitommi 2022-09-09T11:26:30.244939Z

for example, for #malli, we created a synchronous interceptor runner with static queues instead. For that given problem domain, it’s 1000x faster than sieppari and dead simple.

ikitommi 2022-09-09T11:27:08.678859Z

(actually, it’s faster than composing function with clojure.core/comp)

ikitommi 2022-09-09T11:28:02.781769Z

for dynamic queues &/ async, sieppari is better.

👍 1
mdiin 2022-09-09T11:53:07.017549Z

I’m thinking CLI apps maybe, or event processors. But nothing I see coming in the near future.

mdiin 2022-09-09T11:54:54.543459Z

I guess I’m struggling to understand the reason for using e.g. exoscale interceptors instead of sieppari. Is it just because it’s a simpler implementation, or is it just because sieppari is not maintained anymore?

ikitommi 2022-09-09T12:07:31.887539Z

if sieppari works for you, go for it. It’s not actively developed, but PRs welcome.

ikitommi 2022-09-09T12:08:52.845929Z

I’ll write a post about our https://github.com/metosin/open-source#project-status-model soon.

mdiin 2022-09-09T12:33:35.746859Z

Alright, that makes sense. Thanks. 🙂