5 ms·
Seriously? When was the last time you deployed something as a standalone, static binary? Hardly anything with any amount of complexity is shipped like that, esp
by elric 6y ago
Seriously? When was the last time you deployed something as a standalone, static binary? Hardly anything with any amount of complexity is shipped like that, especially not cross-platform. Just about everything requires some kind of runtime, some kind of dependencies or some kind of environment. I can go "dnf install firefox" just as easily as I can go "dnf install ant". Both of these come with a boatload of dependencies. One of them depends on a JVM, the other doesn't. Both are packaged pretty well and both can be installed in a single step.
I indeed won't admit that "Java apps" are a pain to deploy, because it's a meaningless and overly generalistic statement. Some apps are a pain to deploy, but it's almost always down to the way they're packaged/distributed, and rarely down to the underlying technology.
- bsaul 6y agoI'm not sure what you mean. Deploying static binaries was the main way to go before, and is now the standard approach with go. Pretty much every service developed in go is deployed as a standalone statically compiled binary, and i would assume it's the same for code developped in Rust.
- Tsarbomb 6y agoExcept you need to make sure you built against the correct version of libc because you cannot statically link that. I remember when docker first came out and people were losing their minds about how they will be able to deploy their applications with all their dependencies in a single shippable bundle, kind of like an uber jar.
- touisteur 6y agoIsn't that what go is trying to alleviate, with their use of direct syscalls and no use of libc?
- nitsky 6y agoRust programs can be statically linked to musl libc, producing binaries that will run on any linux distribution. You can run ldd on the binaries and confirm they have zero dependencies on shared libraries.
- hkeide 6y agoI build my Linux Go binaries on my macOS development machine. Cross compilation is trivially easy in Go and I never had any libc version problems.
- buzzkillington 6y ago>Hardly anything with any amount of complexity is shipped like that, especially not cross-platform. Including the JVM. The paths alone.
- apta 6y agoYou can ship the JVM with your code (uber jar), so no paths to set up. And now with jlink, you can even strip it down to only parts of the JVM that your code uses, to optimize size.
- lostapathy 6y agoFrom the perspective of a java developer, this makes total sense. From the perspective of a sysadmin who just wants to deploy an app that ships as a jar and doesn't come pre-packaged with any convenience features like you mentioned, it's an awful lot to work out and learn.
- kitotik 6y ago> Hardly anything with any amount of complexity is shipped like that The entire HashiCorp stack and Cockroachdb comes to mind. I’m sure there are things that are much more complex in the world, but they do some fairly heavy lifting. > especially not cross-platform I find it drastically simpler to download a single binary for each platform I need to deploy to(macOS,Linux,FreeBSD) than it is to get a consistent Java environment setup on those same platforms.
- tamale 6y agoYou're kinda omitting the insane amount of configuration you can give to pretty much every hashicorp product and cockroachdb I think the big difference is that Java projects TEND to be more 'up front' about their configuration options, with shipped default files with a lot of the options already set to some default value, while projects like the ones you mentioned require you to look up every property yourself and set it to something if you want to change it from the default.
- kitotik 6y agoI did not mention the configs, because those are plain text and do not really add dependencies I don’t already have. Are you saying that Java projects tend to have more sane defaults and come bundled with more out of the box? The last Java project I had to deploy was ElasticSearch/Kibana, and there was a LOT of configuration needed that required consulting a lot of disparate documentation.
- parasubvert 6y agoNearly everything written in Golang is deployed as a static binary with minimal dependencies, which is partly why it has grown in popularity. It’s a nearly universal experience that different language runtimes have very different experiences with dependencies. Someone who ships a Node, Python or Ruby-based tool for example has a tough time, to the point of needing to write a wrapper installer that vendors all dependencies including the runtime itself, just to be sure. The JVM with Maven and fat JARs isn’t probably as bad as these cases, as mostly it’s just requiring a compatible JRE. This is why Spring Boot apps for example are so popular for deployment - no more app server insanity! Jlink makes this more like Golang, but isn’t used enough. That said Golang dependency management for the developer / builder is a history of horrors. Maven has had its issues but has gotten past most of them.