r/Clojure • • Apr 17 '16

The State of Clojure Web Development

http://yogthos.net/posts/2016-04-17-state-of-web-clj-dev.html
74 Upvotes

51 comments sorted by

View all comments

2

u/un_passant Apr 18 '16

What I don't really get in the state of Clojure Web Development is why pedestal did not really take off. Is it just because Ring was too entrenched and good enough of am I wrong in considering that pedestal server was better ? Pedestal client side was also the only client API that made sense to me until re-frame. I like Luminus (especially with Immutant !) and am a grateful and happy buyer of the "Web Development with Clojure" book, but I put some money on Kickstarter for Arachne to help move forward pedestal-server.

7

u/halgari Apr 18 '16 edited Apr 18 '16

There's several reasons for that I think. I will be the first to admit that Pedestal was a bit too complex when it was first released. That has changed a lot in the recent versions and I recommend that people take a look at the current state of things, as most internal things have been reduced to a few simple protocols.

Also, the feature set of Pedestal was designed for a rather specific set of goals, and those are goals that many people haven't thought much about, or simply don't need.

One such goal is "async all the way down" Pedestal (and perhaps Aleph?) is one of the few Clojure frameworks that allows you to do things like make async non-blocking calls inside a hander. So now your authentication module can make a call to a db and release the webserver thread. That's something that just can't be done in the Ring model.

Secondly, Pedestal's routing system is data driven. So it's completely possible to have routing tables that change at runtime, are post-processed by other code, etc. In that sense, the "routing code" is more like a JIT that generates a lookup table than a hard coded set of "comp-ed" functions.

These are just a few of the features that Pedestal supports that I think people are either unaware of, or don't think they need.

2

u/un_passant Apr 18 '16

Being data driven and async are indeed the benefits that I see in Pedestal. It took some efforts to wrap my head around it when it came (same for the client side, btw), but then it just made sense and seemed superior to Ring.

If arachne could be a kind of Luminus for Pedestal and give it momentum, I would consider my kickstarter funding well spent.