Earlier quoted context omitted.
It is remarkable how bloated modern software is. My first hard drive, back in 1988, was 30 megabytes.
If you start talking to most programmers about efficiency, you’ll almost immediately be shut down with “premature optimization is the root of all evil” (no matter how non-premature the optimization might be). There’s a pervasive belief among programmers that hardware is so fast that, as long as the software works, it doesn’t matter how efficiently it uses memory, or CPU, or disk space, or the network… yet the #1 comp…
Really Small Java Apps
41–50 of 68 posts
Re: Really Small Java Apps
#42"Since bundling apps and runtime is the new best-practice" When did this become the new best-practice in Java land?
Re: Really Small Java Apps
#43I thought this article would be about something like https://en.wikipedia.org/wiki/Java_4K_Game_Programming_Conte... but it's more appropriately "Really Small JVM". For a simple project requiring java.net.http, using these steps produced a 23MB jlink image 23MB may seem tiny today, but depending on what that "simple project" does, in absolute terms it's still twenty-three million bytes. For comparison, a full install…
Things That Turbo Pascal is Smaller Than https://prog21.dadgum.com/116.html
Re: Really Small Java Apps
#44I get Docker and I use it, but it does bother me that one bundles the JDK along with the docker image. Such a waste of space. I like this idea, I hope it gets more traction. In terms of deployment of Java apps, we've found that Nomad works really well as it doesn't need a full Docker image (or equivalent) like Docker, Kubernetes etc. In Nomad you just make sure the worker node has the JDK, and then you specify the .j…
I'm not sure this is the issue you are referencing, but you can use multi-stage Docker image builds to avoid bundling the JDK in the final Docker image: FROM openjdk:jdk AS build COPY . . RUN mvn package FROM openjdk:jre COPY --from=build ./somepath/app.jar . CMD java app.jar The first stage (defined by the first FROM) is only used to build the ".jar", the second stage will only contain the JRE and the ".jar" copied…
Re: Really Small Java Apps
#45I get Docker and I use it, but it does bother me that one bundles the JDK along with the docker image. Such a waste of space. I like this idea, I hope it gets more traction. In terms of deployment of Java apps, we've found that Nomad works really well as it doesn't need a full Docker image (or equivalent) like Docker, Kubernetes etc. In Nomad you just make sure the worker node has the JDK, and then you specify the .j…
Docker images are layered, so this isn't a problem in most cases.
Re: Really Small Java Apps
#46Re: Really Small Java Apps
#47"Since bundling apps and runtime is the new best-practice" When did this become the new best-practice in Java land?
since the author internalized the AWS marketing message.
Re: Really Small Java Apps
#48Earlier quoted context omitted.
It is remarkable how bloated modern software is. My first hard drive, back in 1988, was 30 megabytes.
If you start talking to most programmers about efficiency, you’ll almost immediately be shut down with “premature optimization is the root of all evil” (no matter how non-premature the optimization might be). There’s a pervasive belief among programmers that hardware is so fast that, as long as the software works, it doesn’t matter how efficiently it uses memory, or CPU, or disk space, or the network… yet the #1 comp…
I strangely hear that quite often too on morning traffic ;). When will theses real professional engineers will learn?!?!?!
> make the most efficient use of resources
Can you define this? Everything can be done more efficiently.
A real professional engineers won't do premature optimization. You won't see bridges using some amazing new carbon material, it's not only too costly for the budget, it's also not needed (the bridge does everything it has to do per the requirement).
A real professional engineers will do the most he can with the resource he has, which is pretty much what we do in software engineering.
Re: Really Small Java Apps
#49"Since bundling apps and runtime is the new best-practice" When did this become the new best-practice in Java land?
Note this was not possible in the past as the java license prohibited redistribution.
Re: Really Small Java Apps
#50Now not only is it becoming "best practice" to bundle your whole runtime with your app, people are bundling the whole operating system via Docker.
I'm curious if people have compared actually using a single JVM that is kept hot in OS cache vs separate minimal packaging for every app. It might favor single packaging if you only run 1 java app, but if you ran 10 different ones the benefits of shared code might win.