Almost as fast as Java, and for performance critic processes 99.9% of the time we bump on infrastructure performance problem BEFORE hitting the wall with Clojure (see https://clojure-goes-fast.com/blog/ for tips and tooling about performance)
> - Hosted on the JVM, so you're going to be dealing with Java eventually
For me it's a major selling point: JVM is battle tested and a wonder of engineering.
The Java ecosystem richness is incredible (see tooling above for monitoring and profiling for an example). And the platform is constantly moving forward (see latest JDK with virtual threads, generational ZGC, etc.). And of course GraalVM... (https://www.graalvm.org)
> - No automatic tail call optimization because of the limitations of the JVM, so it feels like you're writing a mess of macros rather than real functional code
Never have been a problem and I don't see the point with macros, and code we write looks _very_ functional...
> JVM is battle tested and a wonder of engineering. The Java ecosystem richness is incredible (see tooling above for monitoring and profiling for an example).
This is all true.
That said, the way I can't help but feel is: keep that entire galaxy of insane bloat two and a half million miles away from me please. :p
The Clojure's approach is to favour libraries over frameworks.
We use Clojure on various style of applications (mainly web and API based), hosted on widespread infrastructure technologies of Cloud Providers (Kubernetes, PostgreSQL, Kafka, etc.) and it's a breeze: here are our reasons for choosing Clojure https://defsquare.com/blog/why-we-bet-on-clojure
If you want to look at libraries where some people have settled, here are our _opinionated_ takes on libraries that we use on almost every project:
For infrastructure stuff (PostgreSQL, Keycloak, Solr, Kafka, etc.), just wrapping the underlying Java library or driver is often enough, and there are lots of wrappers for easing the integration. And we implement Hexagonal architecture style to put all of that in place.
Don't be afraid a libraries not moving a lot recently, it's a sign that the library is mature and battle-tested.
Clojure is a joy to use every day :)
Yes I agree, timbre and clojure.spec are great and I used them a lot, nowadays I move to μ/log and Malli for instance. My comment was to provide some guidance for someone outside of the Clojure community to navigate in the library ecosystem.
I updated my comment to reflect that it's an opinionated take and just that.
I use Keycloak a lot for authentication and authorisation and I like its flexibility and richness of features.
Running it in production is a no-brainer, the only problem we got was some bad behaviours of some clients that issue a token for every API call as it can put some stress on Keycloak, has to implements some rate limiting in front ok Keycloak to avoid that.
There is also the jank language [0] that plays in similar fields.
> jank is a general-purpose programming language which embraces the interactive, value-oriented nature of Clojure as well as the desire for native compilation and minimal runtimes. jank is strongly compatible with Clojure.
GraalVM issue an error if it can't resolve the proper method call or if another Thread is involved in the computation so I find it pretty safe to use.
Of course, GraalVM doesn't exempt you from doing some tests.
I'm one of the few client here in France for a few days. I moved from Paris to a quite isolated area (Vercors mountains) with only ADSL (no mobile coverage), and it's night and day, I now get between 100 Mbps and 200 mbps with 30/40 ms latency...
I don't have a lot of time with the service to give an exhaustive feedback, but for the moment I'm able to do video conferencing and call perfectly. And the setup experience is great!
Keycloak is a great piece of engineering. It's a robust IAM, fully-featured, easy to deploy and integrate with. My opinion is that people should rely on battle-tested 3rd party solution like Keycloak for their authentication and authorization needs.
We run it in production on GCP and it integrates nicely with the Clojure ecosystem (both on the frontend with a SPA and on the backend dealing with REST API security).
Good to hear that a Clojure wrapper is there. I've been thinking about Keycloak, but I was worried that the login or credentials management UI would be outside of my app (and different). But perhaps there is a way to integrate with it while keeping the UI in-app?
You can theme the Keycloak UI to be similar to your app's one, particularly the login/registration screens so the user experience is very smooth.
But you can also define the user/account UI and logic in your app and just delegate the authn and authz data through the Keycloak APIs.
The second option seems interesting! Theming wouldn't help, my app is waaaay different from an old-style themed template (server-side rendering, client-side ClojureScript, websockets, etc).
I have the same setup (re-frame SPA, websocket, etc.), the only page that is themed with Keycloak is the login and password change page, everything else is handled by API calls.
I prefer to deal with account data and logic in a dedicated component that map with users stored in Keycloak. Even if you can associate custom attributes with user and groups, I don't think it's a good idea to do so (performance, separation of concerns, etc.).
For me Keycloak jobs is to handle authentication and authorization data and/or logic (authorization service is very well designed but a little bit complex), for simple use-case a role check in the application is enough.
> The second option seems interesting! Theming wouldn't help, my app is waaaay different from an old-style themed template (server-side rendering, client-side ClojureScript, websockets, etc).
Well, since we are talking SAML or OIDC here - you don't really have a choice for the login/registration. The IdP provides the login and registration pages, not your application. You are free to build your own account management page, but you still have to ask Keycloak for a token.
Feel free to ask me anything about Keycloak in the Clojure ecosystem.
The README of keycloak-clojure needs some lifting but hopefully you'll find everything you need.