fullmeta-dev / web

BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Add websocket Jetty support #3

Closed vkz closed 2 years ago

vkz commented 2 years ago

Quick note after looking into adding support for websocket to jetty server.

https://github.com/sunng87/ring-jetty9-adapter is the only out of the box solution. It effectively replaces ring-jetty-adapter.

Pedestal has its own implementation for jetty, but then you need to buy into their own way of doing everything with interceptors and sever lack of docs.

Above, having peeked into ring-jetty-adapter and how little code it takes, also with understanding that a whole bunch of crap it provides like SSL etc I don't even need assuming "behind load-balancer" setup, I'm starting to think that going directly to the underlying Java Jetty carries most benefits at little cost. Jetty docs are superb and Jetty framework offers a ton of stuff including client libs, has many examples that show how little code it takes to handle requests. Also, Jetty provides its own handler API which is straightforward and you don't need to use Java Servlet API.

I'm kind of getting the feeling that almost averything outside of Clojure and Clojure core libs was a mistake. Interop with Java libs directly.

vkz commented 2 years ago

For the time being I'll attempt to switch over to ring-jetty9-adapter as a low cost effort to have websocket running, so that I don't get blocked.