I may just have lost my google fu for the evening with all the excitement leading up to the holiday, but I'm having the hardest time finding out how to deploy a pedestal app (the hello world app from the Getting Started tutorial) on netty.
The pedestal homepage says it support netty deployment, but the list item for Netty on http://pedestal.io/reference/index is frustratingly not clickable.
Am I just blind, or am I ignorant of something obvious everyone else knows?
I should probably say, I'm using deps.edn, and I'm used to lein.
Maybe I'm expecting a way to deploy a jar for java -jar my-app.jar
, and I'm just supposed to clj ...
...
I used https://github.com/seancorfield/depstar to build an uberjar (.jar) with deps.edn,
@jarvinenemil Thank you for the response! I’ve found several options for packaging the app, and @seancorfield’s fork of depstar was the first result and it worked! But I’m still stumped on how to use the Netty support the pedestal documentation mentioned. Do you have any pointers?
@penryu Glad to hear that. I hope someone will reply regarding Netty, I have no idea 🙂. If you get no help here regarding Netty I would ask here: https://groups.google.com/forum/#!forum/pedestal-users https://clojureverse.org/ https://ask.clojure.org/ If you get no replies on thoose forums (which is unlikely) you will have to dig into the pedstal code-base: https://github.com/pedestal/pedestal
Thanks for the tips! After seeing this, I did some of my due diligence and didn't find any mention of netty anywhere in the source, except in docs mentioning it was supported. My concern now is that either • it was removed without updating the docs, or • it's some plugin or magic value an experienced pedestal dev would know, but hasn't been written down I'll follow up on one of those sites. Thanks again!
Has anyone looked into the idea of separating routing into two stages: 1) identifying the route and 2) adding' the selected routes interceptors to the queue? Why would you want that? In our case, we get a lot of garbage requests hitting our servers, stuff (usually from internal security) probing for known weaknesses (as if we were running unpatched IIS or something). We don't like to clutter our logs with those,so we have a whitelist interceptor that does some regexp on the request and rejects non-matching requests before we even log. However, we need to keep the whitelist synchronized with actual routing. It would be nice if the routing table itself could act as a white list.
@hlship that’s how the router spec works (2 stages). It’s just not exposed
match then enqueue
I'll look at the code, maybe find a way to split the two.
The bits are here https://github.com/pedestal/pedestal/blob/master/route/src/io/pedestal/http/route.clj#L440-L451. Perhaps you can roll your own impl.
I was just looking at that code. I wish it was already in two parts.