Fork me on GitHub
#pedestal
<
2019-11-26
>
penryu06:11:02

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.

penryu06:11:20

The pedestal homepage says it support netty deployment, but the list item for Netty on http://pedestal.io/reference/index is frustratingly not clickable.

penryu06:11:00

Am I just blind, or am I ignorant of something obvious everyone else knows?

penryu07:11:57

I should probably say, I'm using deps.edn, and I'm used to lein.

penryu07:11:39

Maybe I'm expecting a way to deploy a jar for java -jar my-app.jar, and I'm just supposed to clj ......

dangercoder10:11:32

I used https://github.com/seancorfield/depstar to build an uberjar (.jar) with deps.edn,

penryu14:11:42

@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?

dangercoder14:11:54

@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

penryu18:11:23

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!

hlship22:11:44

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.

ddeaguiar22:11:31

@hlship that’s how the router spec works (2 stages). It’s just not exposed

ddeaguiar22:11:51

match then enqueue

hlship22:11:25

I'll look at the code, maybe find a way to split the two.

hlship22:11:27

I was just looking at that code. I wish it was already in two parts.