5 ms·
There is a non-obvious barrier to entry when it comes to the JVM, and that is learning the tools to performance tune a JVM in a production environment. To many
by codeduck 11y ago
There is a non-obvious barrier to entry when it comes to the JVM, and that is learning the tools to performance tune a JVM in a production environment.
To many people this is somewhat akin to black magic. CMS, G1, PermGen, Xmx, NewRatio... it takes time to get to grips with even the rudiments of the JVM, and many places simply do not have the expertise.
Also, it takes time to set up a JVM stack. You can have a rudimentary rails app running in a few minutes; it took me several hours to get a lightweight spark / mysql PoC up and running.
Java is performant, but it falls down in terms of RAD when contrasted against languages like Go and Ruby and against frameworks like Elixir or Rails.
- matwood 11y agoTake a look at spring-boot. My current go to for quickly starting projects is spring-boot, jooq, and postgres. And the basic jvm settings will get someone a long ways - much farther than an out of the box Rails setup.
- codeduck 11y ago> And the basic jvm settings will get someone a long ways But when it all goes tits-up it is a lot harder to work out why. Also, I'd forgotten just how much i hated annotations. And now I need eye bleach :/ I like spark because it maps very closely to Sinatra in ruby, and doesn't require much additional support.
- 67726e 11y ago> But when it all goes tits-up it is a lot harder to work out why. How so? Maybe you're just more comfortable with a different environment?
- hamburglar 11y agoYes, which is pretty much the answer to the original "why.". Different skill sets. You can't necessarily compare two wholly different stacks and say one is just as good as the other so why don't you use mine when there is accumulated knowledge associated with both. I have seen people arguing that rails is hard to set up in this thread, too, which seems really strange to anybody who doesn't consider setting up homebrew and rvm a burden. People have different things they have done and are familiar with and are productive at doing again. I think that is the complete answer to the thread.
- anuraaga 11y agoJava8 has removed permgen, which was the only parameter that was essential as it put a hard cap on the size of the app you can build. With that gone, the JVM running with defaults will run laps around any scripting language, and any additional tuning is just more cake. A modern rails setup with system/user level isolation usually requires homebrew and rvm or similar which is quite involving. Compare that with install java, hit new play app in IDE (or download template) and just run, and I'd say Java has a pretty good recipe for productivity. Deployment? Just copy a fat jar created automatucally by the build system and java -jar it, no virtualenvs in sight. So would I pick Java for a business? I don't know - I personally enjoy programming in Python way more than Java and would probably go with it, eventually regretting it...
- codeduck 11y agoI've been playing a bit with G1 and I'm still not 100% convinced that it's better than CMS. That said, it is nice to finally be rid of PermGen etc.
- blablabla123 11y agoWell also the documentation for that is really sparse. Years ago I messed around a lot with JRuby and I found this Xmx flag. So every time I had out of memory problems after, tuning Xmx worked just fine. ;) I always wondered why it's such a "hidden" parameter... Of course Go and Ruby work out of the box. On the other hand, their runtimes are kind of lightweight and less general purpose as the JVM.
- dandrick 11y agoYou're not wrong, but deployment is rarely simple. And there are gotchas in every environment I've ever worked with. It's just a different set of skills to pick up, no different from any others.