Fork me on GitHub
#reitit
<
2022-09-03
>
polymeris20:09:30

Hello! Is there a fundamental reason why https://github.com/metosin/reitit/blob/master/modules/reitit-sieppari/src/reitit/interceptor/sieppari.clj is Clojure-only? I'm trying to find a solution for server-side CLJS routing that supports async execution, and thought that sieppari might be a good choice.

polymeris07:09:41

Oh, I see sieppari is like 0.0.0-alpha 😁

valtteri08:09:11

Yep and we’re not developing Sieppari anymore and don’t recommend it for new projects. 🙂 Tommi has this cooking up as replacement https://github.com/metosin/viesti

polymeris09:09:13

Thanks! Hmm... Sieppari is the only published async interceptors implementation I have found, do you know of any alternatives?

polymeris09:09:30

Otherwise I guess I'll have to go with it until viesti is public

polymeris09:09:10

In fact maybe I don't get viesti, but it doesn't seem to fill the same niche? :thinking_face:

valtteri09:09:04

Yeah it has broader scope but Tommi said he has included “lessons learned” from Sieppari in there

valtteri09:09:06

Sorry, I was mixing up Kekkonen and Sieppari in my head. 😄

valtteri09:09:48

If you’re looking for just a lib to does async interceptors I don’t know anything other than Sieppari and Pedestal

valtteri09:09:49

Hmm looking at Sieppari code I don’t see a reason why it wouldn’t work in CLJS. Only namespace that’s JVM only is the manifold-one.

valtteri09:09:47

And it’s an optional namespace

rolt10:09:58

would https://github.com/exoscale/interceptor suit your needs ? it supports core async

rolt10:09:26

i'd love to hear the "lessons learned" from sieppari. I used it and didn't encounter any issue as far as i remember

valtteri10:09:57

@U055NJ5CC can probably chime in 🙂

rolt10:09:17

well my only pain point was that a really long chain can make a really complex flow but that's every interceptor/middleware lib really

rolt10:09:57

oh maybe being agnostic of http ? i was using it for kafka and the field names were a bit annoying

👍 1
ikitommi10:09:40

That is one good alternative. Interceptor is a nice pattern but I lost faith in the dynamic queue thing. Not much benefits, makes things order of magnitude slower. Malli has embedded interceptors that are really good, no time to push Sieppari forward. Would need a joint agreement, now there are like 5+ libs, all bit different.

👍 1
ikitommi10:09:58

See #interceptors for discussion and listing of alternatives.

ikitommi10:09:05

happy to sunset Sieppari as soon as someone integrates a better alternative Into reitit.