Hacker News new | ask | show | jobs
by otterley 1549 days ago
To get the best performance, many Java applications, especially network-intensive ones, use native libraries. Netty is a perfect example, and is used by a lot of projects.

> Even worse, given that Docker and Kubernetes basically take Java/.NET application servers to other programming languages.

No they don’t. Not sure what you intended to convey here.

2 comments

Many (basically all?) Java libraries that use native code have pre-compiled code for all platforms. They'll just work on all platforms.

We've been upgrading our dependencies for arm64 support; for the most part it is as simple as updating our pined version to a newer version of the jar. Sometimes the native code is in a separate jar so you just add it (opencv works this way).

Package them inside of shared libraries of the Application container, or use a multitarget JAR/WAR/EAR file.
OK. The next problem is, what if you have a bunch of different apps that require different JVMs, potentially at different versions, and you want to run them all on the same box? You can do this with JAVA_HOME, but running them in containers is a lot more convenient, and safer, because you can ship the runtime with the app. As a developer, you also don’t have to concern yourself with whether the target machine already has the correct JVM installed, and update it yourself if you like, without waiting on someone else to do it for you.
You also get the practical benefits of containers such as a convenient distribution mechanism that is language agnostic (a container registry) and abstracted management of network config like port bindings.

You’ll always be able to build a unique deployment solution for Java, python, or a native binary. But containers let you solve this problem the same way for every program.

Convenient only when one doesn't know better.
If you think you know better, why don't you give everyone a useful, detailed solution, instead of providing curt, unsubstantive, and argumentative responses?

Per the HN Guidelines:

"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

The technology is well established now. I've noticed a similar kind of solution in the Python community, swatting flies with sledgehammers becomes the norm because modern machines can often take it. Until they can't.
Plenty of documentation and books available from decades of software development before Docker became a thing, no need to repeat them.
That's not a solution. Telling people to go look things up themselves in some unspecified place and devise their own solutions is pretty much a giant middle finger to this community (and is still against the HN rule against shallow dismissals). It also does nothing to persuade anyone that you actually know what you're talking about, as opposed to someone who just makes shallow criticisms to scoop up HN points.