Searching for a web server

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

1 Like

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.

1 Like

I use Aleph and it’s great.

The thing with Clojure is just because a library hasn’t had a commit in a while doesn’t mean it doesn’t work or isn’t maintained. Often it’s just finished. I use libraries that haven’t had commits in years and they work just fine. Clojure is very stable, they’re almost no breaking changes, in fact I can’t remember the last breaking change. As a result there’s a lot less churn/commits require to keep a library in a working state compared to some other languages. Not to say projects don’t get abandoned in Clojure, but my threshold for what is considered abandoned is a lot higher. I don’t get half as nervous when a project has not had a commit in 6-12 months as I would with javascript.

1 Like

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 :slightly_smiling_face:

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…

I’m a fan of Immutant, but it appears to be deprecated and needs open-source maintainers.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.