News for hackers. Stuff that matters.
Re:State of Clojure 2016 – Results and Analysis by hammerandtongs on Tuesday February 07, 2017 @02:44PM (#13592046)
One of the things that always stops me pushing too far into clojure is memory footprint.

Does anyone have any suggestions or resources for how to keep the upfront memory cost of the jvm to a minimum (and monitor that its still within bounds over time).

128m is not acceptable, for my uses clojure would need to compete with go and rust which I can deliver 10-20m running in memory (and lightning fast).

I don't expect 10-20m but 10x doesn't work for me.

Think of deploying to Sandstorm.io as my goal ie small personal servers.

Re:State of Clojure 2016 – Results and Analysis by yogthos on Tuesday February 07, 2017 @02:51PM (#13592123)
I'm working on a port of the Ring stack to Node.js for that exact reason. https://github.com/macchiato-framework/macchiato-core

I wrote about the motivation for the project in some detail here http://yogthos.net/posts/2016-11-30-Macchiato.html

You can see some example projects here https://github.com/macchiato-framework/examples

I've already ported some of my JVM services to it, and I've been very happy with the results. There's a Clojurians slack channel #macchiato where project discussions are happening, and others have been using it successfully as well.

I don't see Node.js as a replacement for the JVM, but it is a better fit for certain types of applications. Being able to develop Clojure using essentially the same stack on both platforms means being able to choose the right tool for the job.

Re:State of Clojure 2016 – Results and Analysis by hammerandtongs on Tuesday February 07, 2017 @03:56PM (#13592718)
I think it's really cool that you are pushing on this.

I'll probably pursue the jvm for a little while longer but I can see the attraction to clojurescript for this and will check in down the road.

Re:State of Clojure 2016 – Results and Analysis by juskrey on Wednesday February 08, 2017 @01:49AM (#13596335)
With recent introduction of cheap high-RAM VPS and dedicated boxes like Scaleway, I don't feel this is a problem anymore. Running of Clojure on Java gives excellent multithreading environment - I personally don't want to sacrifice it for smaller memory footprint.
Re:State of Clojure 2016 – Results and Analysis by pron on Tuesday February 07, 2017 @03:28PM (#13592443)
By default, the JVM will use all the memory you give it. Have you tried simply setting a small maximum heap size? You can use VisualVM to visualize the heap and GC. Deep monitoring is one of the JVM's greatest strengths.
Re:State of Clojure 2016 – Results and Analysis by hammerandtongs on Tuesday February 07, 2017 @03:51PM (#13592673)
Yes this was my thinking on how to proceed.

I'm just kind of surprised and disconcerted how little I could find on the web, specifically for minimizing footprint.

Re:State of Clojure 2016 – Results and Analysis by pron on Tuesday February 07, 2017 @04:02PM (#13592770)
The JVM does not lack in documentation and advice; Clojure is riding on that.
Re:State of Clojure 2016 – Results and Analysis by bheesham on Tuesday February 07, 2017 @03:33PM (#13592491)
You may be able to get there with AOT compilation and slimming down the JAR and JRE.