This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-30
Channels
- # announcements (12)
- # babashka (25)
- # biff (30)
- # cherry (34)
- # cider (46)
- # clj-kondo (23)
- # clojure (37)
- # clojure-berlin (6)
- # clojure-europe (12)
- # clojure-nl (4)
- # clojure-norway (6)
- # clojure-uk (2)
- # clojurescript (8)
- # conjure (1)
- # cursive (4)
- # data-science (11)
- # datalevin (12)
- # datascript (15)
- # emacs (2)
- # events (1)
- # fulcro (14)
- # graalvm (16)
- # gratitude (23)
- # honeysql (11)
- # jobs (2)
- # jobs-discuss (14)
- # kaocha (1)
- # leiningen (8)
- # nbb (45)
- # off-topic (7)
- # portal (8)
- # re-frame (9)
- # releases (2)
- # shadow-cljs (24)
- # squint (5)
- # tools-build (17)
- # tools-deps (7)
- # vim (5)
Hi folks I hope everyone is doing great! I have a bit off-topic question, due the recent Heroku announce to drop the free tier, I'm researching a way to keep my portfolio projects running and my biggest challenge is a simple https://github.com/rafaeldelboni/super-dice-roll-clj that receives ~20 to 50 request per minute and has a Postgresql database. I saw that http://fly.io has something similar that Heroku gives in the free tier, but with half of the memory (256mb). With all that said I would like to know if any of you folks has a framework/boilerplate/example of a Clojure http service that I can compile using native-image? It need to have a routes, http client, logs, configuration manager (like aero) and database drivers, https://github.com/parenthesin/microservice-boilerplate and it work super fine, but in the project above it needs 512mb of ram to work normally 24/7 and I was hoping to get something less memory hungry with Graalvm. Yeah I know I could just pay 10 bucks a month to keep this running, but I like the challenge 😄
@rafaeldelboni Perhaps, if it's not too complicated, you could use #babashka or #nbb on Node.js (or compile with shadow-cljs). aero works with bb, I haven't tested with nbb. bb can easily serve hundreds of request per second. bb doesn't have postgres built-in, but this can be compiled with a feature flag or you can use the postgres pod. nbb can run any node.js library. That said, every component in bb is guaranteed to work with graalvm, else it wouldn't work in bb either.
Looking at your project, things that work well with graalvm are honeysql, jdbc, etc. Things that tend to bloat graalvm is clj-http, you could swap this out for clj-http-lite for example, or java-http-clj
I was thinking to use this stack: Server - https://github.com/http-kit/http-kit Client - https://github.com/schmee/java-http-clj Json - https://github.com/dakrone/cheshire
something I will miss is the reitit routes and pedestal interceptors
I saw that http-kit works with compojure http://http-kit.github.io/server.html#routing
if you want the lightest of all routers: https://github.com/askonomm/ruuter
cool, thats looks perfect for my needs, I just need to think something for interceptors now and create a boilerplate
maybe this, but it looks like a bazooka for what I need https://github.com/lambda-toolshed/papillon