Is there an actively maintained clojure web server with websocket support? I’d like to use some with Sente but all of the supported ones (Aleph, http-kit, Immutant) seem to have little or no support from maintainers. Or am I totally wrong and there is a project that is just stable?
I am pretty certain Immutant is stable. I have been using it in production for several years without problems at least. I do not know about the others.
We use http-kit since years, it also works fine for websockets. jetty probably has the most maintainers, support for websockets and a Ring adapter.
We replaced websockets with long-polling a while ago. Getting the connection retry logic for websockets correct took us a few days. We used sente before, where it was also complicated to get right. If you do not really need the low-latency and minimal payload overhead of websockets, use something that requires less code to be robust, like long-polling, server-sent-events, Pusher.com or Pubnub.com
Ok, thank you for your advices!
Pretty sure they’re all actively maintained. Aleph had a commit 3 months ago. Http-kit had one 5 months ago. Immutant didn’t have one in a full year, that might be a bit worrisome, but lots of people use it, and it’s mostly a wrapper over undertow, so it might just not need very many changes to be made to it that often.
I use Aleph and it’s great.
Yeah, I hear you. While I totally agree in general about library stability in Clojure, I’m not quite sure about web frameworks. As I said, it’s probably just me
PartsBox (https://partsbox.io) relies heavily on websockets, using sente and http-kit. I’m considering switching to Aleph in the future. I haven’t seen any major websocket-related issues in the last two years or so of fairly intense usage, so I’d say the situation is pretty good.
The problems I have with websockets are mostly on the client side: things like detecting disconnects, actively reconnecting, etc. — sente could use some improvements in that area. But on the server side I haven’t seen many problems.
For actively maintained and performant stuff, check out the awesome work by Metosin here: Clojure Web Server Performance
… also… i never figured out how to do a cookie-store for sessions on immutant…
… also… nvd may still report a vulnerability for jetty…