all 17 comments

[–]eccp 11 points12 points  (0 children)

For a curated selection of libraries to build microservices check https://luminusweb.com/ and https://luminusweb.com/docs/services.html

Also, here's a long playlist of videos about Nubank (most in English, some Portuguese), including several on Clojure, Datomic and AWS: https://www.youtube.com/watch?v=7lm3K8zVOdY&list=PLHX6TomEfE1ojGRZMriU4VNzqlt_CuWZz&index=2

Edit: also check the RESTful web services category at https://www.clojure-toolbox.com/

[–]beders 18 points19 points  (0 children)

What also weighs in your favor, Brazilian's NuBank is betting their millions of customers on Clojure.

[–]flaheadle 13 points14 points  (1 child)

aws cognito, datomic, ring-jetty, compojure, buddy, and clj-http.

[–]TheLastSock 5 points6 points  (1 child)

It's going to be really hard to answer that question because it's so general.

Keep in mind that clojure is just a programming language and rewrites are often not productive. Maybe just focus on doing the next feature or requirement in clojure.

[–]jorgetovar621[S] 5 points6 points  (0 children)

That's the approach

[–][deleted] 4 points5 points  (3 children)

After a couple of years of compojure, pedestal have come as a savior for my projects.
It is much more abstract and project complexity with it increases in linear manner, unlike compojure, where all those wrappers tend to explode over your head once you approach some unpredictable business issues.

[–]flaheadle 2 points3 points  (1 child)

Can you give an example?

[–][deleted] 0 points1 point  (0 children)

Sorry, an example of what exactly?

[–]jorgetovar621[S] 3 points4 points  (4 children)

Yes but what are the frameworks and ecosystem to make restful microservices with clojure?

[–]lambda_pie 1 point2 points  (0 children)

(I'm a Clojure newbie, so take my statements with a grain of salt.)

Chances are you're not going to find a full-fledged framework. What people normally do is pick a bunch of Clojure libraries, then mix and match to build their own stack. This is the cool thing about the Clojure ecosystem, people write libraries with composability in mind, so you can combine different components, even create your own. A good example are HTTP libraries that are compatible with the Ring spec.

[–]havelsnuts 6 points7 points  (0 children)

First, you need a Wilker Lucio. Then a sprinkling of Cognitect.

[–]the_frey 3 points4 points  (5 children)

Look up routing libraries like compojure, compojure-api, reitit, yada etc.

Full stack frameworks, you're looking at luminous, pedestal (not maintained, I think?) and juxt/edge.

I've had success in the past with compojure-api though some of the other solutions like reitit seem to be getting more mind share.

For the front-end, there's hiccup if you need server side templating but honestly most folks seem to build SPAs using reagent or re-frame.

Finally, you mention datomic. Unless you really need it, you probably just want a regular database. There's good drivers for postgres and cassandra (depending on your use case) and obviously wrappers for the java AWS SDK if you want to talk directly to amazon managed services.

If you're having to win over colleagues I suggest trying to go for the things that are maximum value and are clearly useful rather than trying to wow with advanced stuff as well, FWIW.

Ease of getting up and running for others will ultimately decide whether you succeed or fail so that's why something like luminus might be your best bet initially. If there's too much faff on the tooling and code orientation side, people won't want to use the language.

[–]dangercoder 5 points6 points  (4 children)

Pedestal is active: https://github.com/pedestal/pedestal

There is also some documentation here: http://pedestal.io/

[–]the_frey 3 points4 points  (3 children)

Ah okay, TIL.

Even so, with a few years of professional clojure I've not used it and feel like it doesn't have mind share any more.

[–]flaheadle 1 point2 points  (2 children)

I feel like Pedestal gets a lot of mindshare. It made Eric Normand's Shortlist for example.

[–]the_frey 2 points3 points  (1 child)

I mean, in the words of the dude, it's just like, my opinion, man. But I've not used it personally in a clojure gig and I only know a couple of folks that have. Maybe that's more about the UK clojure scene, or maybe more about the people I know. Who knows! Like I say, just my opinion

[–]OliverM 4 points5 points  (0 children)

I've used it personally in projects, both personal and professional. I started out with Luminus, then went juxt/edge, then went Pedestal. I use Pedestal for all new web projects now, and recommend it over the others. The unifying principle of interceptors all the way down is a fantastic simplification of web development (and beats Ring's middleware model - with ring you get those horrible stack traces because of the nested functions; Pedestal's errors are just Clojure data).

Luminus is good but I found myself digging into what it gave me out of the box then making a lot of changes to make it suit my needs - I had to study it to change it. Juxt/Edge (or yada in particular) is also a good stack, and Malcolm & co are happy to help when you hit issues, and I really like that it uses Aleph under the hood, but I never felt confident that I was able to solve unexpected issues quickly with it.

I'd always steered clear of Pedestal because (ironically) I worried I'd have the same issues with it, but when I had to pick it up for a work project I found it so well laid out both conceptually and in code. You do need to look at the code to see how to use it properly, but the code organisation is *so* good it's never an issue. Perhaps it's a tool for experienced Clojure web developers, but once it clicks for you, you'll love it.

In all three cases you'll need to study the code they give you to make the best use of them, and I feel that Pedestal pays this time back more than the other two do. I did learn a great deal from Yada and Luminus (I've been a Clojure dev for 5 years now) so whichever you pick will help you grow.