Done filling out the survey. I'm running CLJS tests with https://github.com/Olical/cljs-test-runner which was not there so I put it in other. But because it also uses doo
I also marked that field.
Thanks for the nod! :)
After years of running our production apps with java clojure.main
we have just, this week, switched to using java with AOT'd classes
-- interesting to see a question about exactly that 🙂
@seancorfield whoa how did you convince @hiredman :troll: ?
Neither of us are thrilled about this change. And we're using it purely as the very last stage when building an uberjar, just to get service start up times down, so rolling deploys go faster.
I've resisted even looking at AOT for start up times until after I added --compile
to depstar
🙂
can I ask what your startup times are roughly?
Before AOT, anything from 20 seconds to a minute and a half, depending on the service and what else the box is doing. After AOT, looks to be 5-10 seconds across the board. Still reviewing the improvement. And that's with New Relic's instrumentation agent doing its thing.
NR agent is a beast, too 🙂
thanks, this is useful info!
Deployment artifacts increased in size by about 50%. And we still have a few things that we run with java -cp ... clojure.main
but are also now much faster to start because nearly all "our" code is AOT'd.
We'll see whether it impacts debugging etc.
oh this is great information, I need to update our depstar dep to the latest and try out the --compile
flag, thanks @seancorfield!
I wondered what this question meant exactly. Does it mean you have a :gen-class
somewhere, build an uberjar and call it with java -jar
for example?
If that's it, I've never used java clojure.main
, can't remember having done so
too late for this perhaps, but for Q 22 would a column for "don't have an opinion" have made sense?
@borkdude gen-class not necessary for clojure.main
. Only a -main
method
java ..... clojure.main -m some.namespace
(clojure.main is a java class, which is surprising because most classes are capitalized)
I understand, but the other way "java with AOT'd classes" is what I asked about
sorry for not being clear
ah I see the two options now
We have always run our production tasks with java -cp path/to/uber.jar clojure.main -m our.main.ns
in the past (which still works with an AOT'd JAR).
We're switching to java -jar path/to/uber.jar
for JARs that were AOT'd with a (:gen-class)
shortly.
I suddenly feel as if up is down and left is right ... 🙂
Who are you and what have you done with the real Sean Corfield? 🙂
Where's my "side eye" emoji? 🙂 Yeah, like I said, neither of us are happy about making this change really. It makes the artifact build process a lot slower, and it makes the artifacts themselves a lot bigger, but it does have a worthwhile startup time improvement, as we've been working on streamlining that.
5-10 seconds to startup now -- is that time-to-healthcheck passing?
Yes, for almost all our services.
👍:skin-tone-4: do you track # of classes loaded?
Well, New Relic shows that metric but I wouldn't say we actively "track" it...
27,300 classes loaded right now, 3,430 unloaded, according to New Relic, on our main API service.
Java 8?
(thanks for fielding all the q's)
That's on Adopt OpenJDK 11.0.5
(we still have a few processes on Adopt OpenJDK 8u232 but those are mixed legacy technology)
Feel free to DM for more details if you want 🙂
You can skip any question
thanks