3 ms·
The JVM is one of the most optimized, most performant, most monitorable, most secure and most predictable software-runtimes there is. How exactly do you consid
by fzeindl 3y ago
The JVM is one of the most optimized, most performant, most monitorable, most secure and most predictable software-runtimes there is.
How exactly do you consider it a big disadvantage?
- doctor_eval 3y agoThe JVM may be full of technology that’s indistinguishable from magic, but deployment is a pain in the ass. Maybe things have changed in the last few years but - having to ship a huge file tree alongside the actual binary (or binaries because JARs are also a nightmare), and the slow startup time due to the need to interpret/compile bytecode instead of just running machine code, make Java really unpleasant to use in many common use cases.
- fzeindl 3y agoWell I shipped fat jars using capsule more than 15 years ago without any issues. Nobody ships file-trees. Also the Startup depends on how much memory you allocate, but much of it is due to verifying class security, a feature that other runtimes don't even have. Or badly used reflection, another feature others don't have. In any case I really never found it an issue if a server takes 3 seconds to start and I never understood why people complained about Java startup. My guess is they complain about clunky desktop application with a million classes written in it. Regarding the bytecode: the interpretation and just in time recompilation gives Java sometimes better than native performance. It also allows you to hook into the code on the fly and transform it with agents. Can native do that?
- doctor_eval 3y agoThe file tree I was referring to is the JRE, not the code. In any case, if Java works for you then that’s great. I’m just relating my own experience, where I found that the need for a JVM was less of a blessing than a curse. As a former C developer who has been using Java for 20+ years, moving to Go was like lifting a weight off my shoulders. (I suspect I’d have felt the same with Rust, Swift or any other modern AOT language). It’s so refreshing to just have a binary, and be able to execute it, and not worry about a pile of irrelevant external factors.