I’ve pushed 0.8.0-alpha-2 to Clojars.
Changes:
• Lots of documentation changes
• io.pedestal.connector/with-routing renamed to with-routes, removed the parameter for the router constructor (e.g., :sawtooth)
• io.pedestal.http.csrf/anti-forgery is no longer added by io.pedestal.connector/with-default-interceptors
• Some dependency version bumps
• New tests to fills some gaps in code coverage
https://github.com/pedestal/pedestal/compare/0.8.0-alpha-1...0.8.0-alpha-2
🎉 Still passing all tests for cljdoc! (still not deployed to prod and still using jetty). Looking forward to finding some time to read those doc updates, I'm sure there's plenty I don't know about pedestal.
The new abstractions and terminology are, I hope, an improvement. Like, WTF is a servlet interceptor (which is neither a servlet nor an interceptor)? The new docs talk about a Network Connector (Jetty or Http-Kit) and a Pedestal Connector, which is essentially the contract between the NC and the rest of Pedestal, which doesn’t care about the network.
Writing great docs is tough. Thanks for putting in all the effort!
Stu Halloway challenged me “what makes Pedestal relevant now?” (beyond the fact that its part of the core of Nubank’s architecture). I think there’s two particular ways where Pedestal stands out: • Self-describing: a Pedestal application is aware of its wiring: data, not just middleware • Batteries-included: we don’t ask you to cobble together your own solution until you fully outgrow ours • Documentation: More than just a README and a couple of wiki pages The sad state of documentation is that Pedestal’s is way ahead of others, but could still be light years better.
Cool. Yeah, I strive to write good docs too. It is not easy, and I'm not sure how close they come to "good", but I do try!
It seemed to me that Pedestal was a leader in http-1.1-response-as-async-channel (which, by the way, is that ever a good idea in the long run?) and response-with-async-channel-body. I noticed news that Ring has async features now - has Pedestal been caught up with?
Like six years ago, I think.
I like the "algebra" of interceptors and the "algebra" of core.async. Pedestal has the appearance of having been well thought out
My take, which I need to confirm with the OGs, is that the initial code was boosted out of actual applications.
I think of them as unsentimental pragmatists. Poets who mean business.
By the way, the "WAR deployment" guide still wonders aloud whether it is up-to-date. The lein section says, "surely there are Leiningen plugins to do this all?" and the deps.edn section says, "Forthcoming; but the essentials are the same: package your resources, Clojure sources, and (rarely present) compiled Java classes.[...]..then zip everything up". When I first looked at Pedestal, I was worried about the path to a WAR file evidently not having been blazed. However, I guess in practice WAR deployment is pretty unusual
We actually do it at Nubank, at least for the meantime. We start a Jetty and deploy a WAR file into it. The outer Jetty handles certain ops- and auth-related things, the inner WAR handles the actual application. We’re looking to move to something that leverages K8s better: Pods, Sidecars, Daemons, but there’s a lot of inerftia and non-essential complexity in the way.
A "poor man's reverse proxy"! 🙂 In every sow's ear there is a silk purse.
Well anyway if they've noticed that there is a good paved road to a WAR file nowadays, perhaps you could invite an update to the WAR Deployment page
It’s all about scarce resources, even though anyone can contribute documentation.
Rewrite the other two getting started guides: https://pedestal.io/pedestal/0.8/guides/hello-world-content-types.html