My current go-to web library is now yada.
If you are just starting out, the introductory server is Compojure. I see it as the apache
of web servers in the Clojure world (in which case yada/aleph would be nginx). You could use Luminus as a template. There are variants of it, like compojure-api.
I tried ou Pedestal and was globally satisfied with it. I don't claim to master it, but it has a pleasant syntax, feels very cohesive, and looks like it does have great performance. It is also backed by Cognitect
(the Clojure/Datomic company where Rich Hickey works).
I found Aleph to present an interesting abstraction, and the built-in backpressure seems interesting. I have yet to play with it, but it's definitely on my list.
After playing a bit with various web servers, here is my quick Pro/Cons list :
Short answer : have a look at Luminus to get started quickly, maybe move on to something else as your needs evolve (Yada maybe).
Compojure
Pros (1):
- easy, lots of templates/examples (ex. Luminous)
Cons (2):
- Not performant (a thread per request), expect performances slightly better than rails
- Not simple, the middleware model has inconvenients
Pedestal
Pros (3):
- interceptor model, pleasant syntax to add interceptors to a subset of routes
- performant router
- supports json/transit/multipart forms transparently out of the box, without asking anything. Very cool !
Cons (4):
- no websocket support (yet), returning core.async channels would be nice
- a bit slow to reload if putting it in a Stuart Sierra's component (I think you are supposed to use the reload interceptor)
- no testing facility for async interceptors
- requires buy-in (?)
Aleph
Pro (3):
- Performant
- backpressure
- Websocket/SSE support when returning a manifold stream
Cons (1):
- Low level, do it yourself style (ie. it just gives you a way to make your handlers do something. No router, no nothing). Not really a cons, just be aware of it.
Yada
Pro (3):
- built on Aleph
- content negociation
- swagger integration
- bidi is quite ok (though I like pedestal router syntax better)
Cons (1):
- documentation (although not as bad as nginx-clojure, quickly improving).
HttpKit
Pro (2):
- Written in Clojure ! (and Java...)
- performance looks good (see the 600K concurrent connections post)
Cons (2):
- No CORS support
- Bugs ? Also, not a lot of recent commits
Nginx-Clojure
Note : I haven't played with it, mainly because of the lack of documentation. It looks interesting though, and very performant.
Pros (2):
- Nginx (performant, offload ssl, restart workers...)
- Could this model allow zero-downtime updates ? That would be so awesome !
Cons (1):
- Documentation (improving). Also, I don't want to program in strings embedded in an nginx config file if that is the only way to do it.
- Probably complicates a bit the first deployment (?)
Immutant
Note : I haven't played with it.
Pros :
- integrated (caching, messaging, scheduling, wildfly deploy)
Cons :
Catacumba
Note : I haven't played with it, although the documentation looks excellent. I am probably going to try it next. There are example chat projects that look interesting, their heavy use of protocols put me off at first as a novice Clojure dev.
Pros (6):
- documentation ! Like all funcool projects, the doc is very pleasant to read.
- pedestal-like routing syntax
- should be performant (on top of Ratpack)
- backpressure
- websockets, sse, cors, security, ssl...
- unique features to dig : postal
Cons (2):
- Not completely sure about how pleasant the ct/routes syntax is, and about ditching the Ring spec (supposedly for the async story, but I thought the pedestal guys fixed that)
- Not sure how one would integrate swagger etc.
- when I tried it, I was not able to make it work straight away
Note : a benchmark of Clojure web servers is available, if raw performance is all that matters.