News for hackers. Stuff that matters.
Re:A year with Go by twic on Friday June 05, 2015 @08:42PM (#9669088)
> And compared to Java, the fact that Go compiles to a native binary is a huge benefit.

I'm baffled by this. I've been deploying Java applications for years, and this has literally never been a problem. You build a WAR (or EAR, or uberjar, or distzip, or whatever). You install a JRE on the machine. You deploy. You're done. It's never been a problem for me, and it's not something that's talked about as a problem in the Java community, which suggests it's not a problem for other people.

When i see someone suggesting that Go has a significant advantage over Java in terms of deployment, i assume that they don't actually have experience of deploying Java apps, they're just regurgitating the standard Go talking points.

Re:A year with Go by falcolas on Friday June 05, 2015 @09:06PM (#9669149)
> You deploy. You're done.

Then you set your memory parameters. Then you tweak them, to make it more performant. Then you increase them some more to make the GC work less. Then you hook up to the JMX port so you can profile what's going wrong, and identify some XML library as allocating megabytes of strings when it then dumps. Then...

Yeah.

Re:A year with Go by mavelikara on Friday June 05, 2015 @10:14PM (#9669327)
The ability to tune GC and availability of monitoring solutions are things I consider as big pluses for deploying on the JVM.

I would love to have a GC which tunes itself to accommodate the workload. On the JVM, G1 is a step in the right direction. How does Go's GC work in this regard - does it auto-tune itself?

Also, how are Go programs monitored in production? Are there tools like AppDynamics, NewRelic, JConsole or similar APM/telemetry solutions available to monitor Go applications?

Re:A year with Go by Skinney on Friday June 05, 2015 @09:48PM (#9669247)
Setting memory parameters and tweaking them would be similar to deciding what compilation flags to use when compiling your program. I also much prefer profiling over JMX than re-compiling the application with the profile flag activated and re-deploying.
Re:A year with Go by Alphasite_ on Friday June 05, 2015 @09:26PM (#9669193)
Yeah. But you don't have to, you're literally complaint that the user has options. It's not like Go doesn't have a GC either.
Re:A year with Go by threeseed on Saturday June 06, 2015 @12:04AM (#9669605)
And the biggest joke is that when you tweak the default settings you often end up making it worse.

The JVM has generally excellent performance with the defaults.

Re:A year with Go by nosequel on Friday June 05, 2015 @11:21PM (#9669499)
Exactly, and Go's GC is years behind the JVM.
Re:A year with Go by sleepydog on Friday June 05, 2015 @11:25PM (#9669507)
As someone else who has been deploying Java applications for years, I'm not saying it's hard, but you have to take care when upgrading the JRE on a server, because with most setups (such as the default Sun JDK RHEL packages) it's a shared resource. You can go ahead and bundle a JRE with your jars. With Go this specific problem doesn't exist.
Re:A year with Go by twic on Sunday June 07, 2015 @05:23AM (#9673954)
Fair point. I've always used the approach of dedicating a machine to one particular application (using virtual machines once those became available), so the impact of upgrading the a global JRE is limited.

I did once work on a system where we installed two JREs in parallel, and selected which one to use for the app based on an entry in the manifest file. That let us upgrade Java versions under application control, without requiring sysadmin intervention. Took a couple of lines of shell script.

Re:A year with Go by andrepd on Friday June 05, 2015 @08:46PM (#9669097)
I think you must agree that no matter how painless it is, binary < JAR + JRE, in terms of deployment effort.
Re:A year with Go by Skinney on Friday June 05, 2015 @09:45PM (#9669242)
Depends. For me, creating an uberjar with my default project/package manager is easier than to setup cross-compilation with Go. YMMW.
Re:A year with Go by nulltype on Friday June 05, 2015 @10:46PM (#9669410)
Why don't they just combine the JRE and JAR file? Then I can be sure it works when I download it.
Re:A year with Go by Skinney on Friday June 05, 2015 @11:06PM (#9669456)
For the same reason you don't deploy Windows, BSD and Mac OS X binaries of your Go program to a Linux server.
Re:A year with Go by nulltype on Saturday June 06, 2015 @03:16AM (#9670019)
Yeah I use the Linux binary, I'm not sure what you're saying here.
Re:A year with Go by Skinney on Monday June 08, 2015 @08:05PM (#9683298)
The JRE is platform specific, the JAR isn't. Bundling them makes little sense.
Re:A year with Go by nulltype on Wednesday June 10, 2015 @05:20PM (#9695516)
I think it makes a lot of sense. I can download the Windows version of an app and double click on it and it runs. As opposed to I double click on it and it's all "oh you don't have a JRE" or "you have the wrong JRE, mysterious error" or "you need to install this JRE", or it installs a JRE for me, but another app requires a different JRE.
Re:A year with Go by taylodl on Saturday June 06, 2015 @09:38AM (#9670752)
I'm surprised you didn't mention Java compiles to byte code which is then JITed for the processor on which you're currently executing - I don't need to recompile for every platform and I still get native performance. This has been Java's primary strength since the introduction of JIT. Even better, I don't have to use Java to create the byte code. My favorite happens to be Clojure but you have several language options to suit your needs.
Re:A year with Go by fauigerzigerk on Saturday June 06, 2015 @05:20AM (#9670236)
You never had any classloader issues with things like logging libraries and their configs or XML parsers? No versioning problems with dependencies of dependencies getting confused at runtime? No inconsistent clasloader behaviour with differnt Java EE containers?

I'm not saying that library versioning and dependencies are not a problem with Go. Quite the contrary. But it's a compile time issue. There are far fewer surprises at runtime and that makes deployment a lot easier.

Re:A year with Go by sagichmal on Saturday June 06, 2015 @02:19AM (#9669922)

    > You install a JRE on the machine. 
Whoops. That's where you lost me.
Re:A year with Go by twic on Sunday June 07, 2015 @05:26AM (#9673961)
Fair enough. I certainly agree that Go is an excellent language for people incapable of doing basic stuff like this.
Re:A year with Go by sagichmal on Sunday June 07, 2015 @10:16AM (#9674683)
I'm perfectly capable, I just don't see the reason. Why should I install a JRE to run your program? The JRE has nothing to do with your program; it's incidental complexity. Go gives us a way to eliminate that incidental complexity and so is a step forward.
Re:A year with Go by serge2k on Saturday June 06, 2015 @05:11AM (#9670215)
hmm, well we can dumb things down if you really need it. I think things are already pretty simple though.
Re:A year with Go by djhworld on Saturday June 06, 2015 @02:39AM (#9669961)
I suspect this comes from classic Java setup of using an application container like weblogic, websphere, JBOSS or web containers like Tomcat.
Re:A year with Go by politician on Friday June 05, 2015 @11:26PM (#9669509)
> You install a JRE on the machine. You deploy.

That's two steps. The first one can ruin your day.

Re:A year with Go by threeseed on Saturday June 06, 2015 @12:06AM (#9669613)
How so ? It takes minutes to install it.

Just download it, copy it and set JAVA_HOME to make it easier for other applications.

I've done this on hundreds of servers during my lifetime and never once had an issue.

Re:A year with Go by sdenton4 on Saturday June 06, 2015 @02:41AM (#9669965)
Oh, look, there's already an antique jre installed on my os, not compatible with the particular jre needed by this application, which I first need to uninstall. And then hope that it doesn't break anything else in the process, because I haven't been following the minutae of java development environments for the last n+1 years...

I think it falls solidly in the "easy if you know it, and a wasted q hours if you don't" category.

Re:A year with Go by amaranth on Saturday June 06, 2015 @04:35AM (#9670157)
That's why he said to set a JAVA_HOME so this JRE can exist separately from the system one.