This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
I want to create a simple HTTP API whose implementation is "async all the way down." How does pedestal compare with async http-kit? Ideally, I'd like to use core.async with my implementation, but I just want something that will allow be to implement as many things async as possible. (For this reason, I am looking for Ring alternatives. Middleware are inherently synchronous.)
Perhaps you'd better to stick with Aleph + manofold. Aleph provides an async HTTP server
Hmm... I thought Manifold was an alternative to Aleph after the author of Aleph learned some things while maintaining Aleph.
I'll look into both again, thanks! @U2FRKM4TW Regarding Ring 2, I havent looked to deep into it yet, but for now I want to stick with "stable" solutions. @UK0810AQ2 Yeah, I'm aware of the 3-arity pattern specified in Ring 1.5(?), but middleware still need to call a function to retrieve response maps IIRC, whereas interceptors allow some form of queuing of things to change and dont depend on the return results of a function.
I don't use non-LTS releases of Java and Clojure doesn't officially support them either AFAIK
@U06F82LES For now I'd say yes, the ecosystem isn't fully prepared for it yet, not to mention Clojure itself isn't ready wrt thread pinning, so I'd wait for a bit
Pedestal lets your async request handler return a core.async channel. While core.async does not have exceptions and is therefore not easy to use in an airtight way, Pedestal provides non-happy-path async features in its interceptor model. With Pedestal you organize interceptors as a list (and they can modify the list) instead of coding handlers calling handlers calling handlers. Aleph is a (Netty-based) webserver built on Manifold, which implements an async model that includes exceptions - very pleasant and capable and well-suited to general-purpose web-serving. Manifold is a work of art! But Aleph's innovation is all in Manifold, without the async-native higher-level interceptor stuff that's in Pedestal. Last I was aware, Aleph did not have any provision for serving HTTP/1.0 responses (minimum 1.1). Netty is both a server and a client, so Aleph is super excellent for writing webservers that are also clients of other HTTP services, because you can program them both in the same async framework: seamless and elegant.
Wasn't sure which channel to ask this. I've got a Clojure script (can also run in Babashka) I need it to execute once a week, it scrapes some websites and calls some APIs and renders some HTML. Then I want it to update the HTML in some static server. And then I want a way to serve that static HTML. What cloud/hosting setup would be cheapest or even free for this? (and maybe easy and quick to setup)
I've been using github's hosting for some small projects and have been happy with that. I have a paid account which is pretty cheap, but I think you get some amount of hours for free for open source projects. A generic setup can be similar to: • create an action that runs on a https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule • inside the action, create a static build • use the pages action to deploy
Here's the workflow I use for one of my projects: https://github.com/phronmophobic/dewey/blob/main/.github/workflows/static.yml
I've also got one in https://github.com/borkdude/cljs-showcase I think it uses the similar github action
I've also used s3 for static hosting which can be cheap and effective.
Cool, I wondered if GitHub actions could somehow be used. I'll check that out, seems simpler and cheaper than going with say Lambda + EventBridge + S3