Hi Chris,
You raise a very interesting question which gets debated at every conference and on-line gathering for Java and JVM folks :-). We'll give you our take on it (which is backed up a little by empirical evidence from Red Monk, an analysis firm who we like, because they're not sensationalist).
chris webster wrote:As a very rusty Java programmer with an interest in other JVM languages, this book looks like a very interesting mix of key Java concepts and polyglot programming: exactly what I'm looking for to resurrect and improve my JVM-based skills.
So I'd like to ask if this is where you see the Java platform heading?
About half your book seems to be on other JVM languages, but some of these have been around for some time (e.g. Groovy) yet still have not really taken off in mainstream development, some may slowly be starting to gain traction in the mainstream (Scala), while Clojure is so different from mainstream languages outside academia that it may have more trouble getting into many organisations, especially the big outsourced development houses that depend on large numbers of relatively inexperienced (and thus cheap and interchangeable) developers.
So do you see the polyglot model taking off on a large scale, as Java did, or is it likely to remain something of a niche?
Firstly, according to Red Monk's numbers, we are entering the 2nd age of the JVM. Adoption of the platform is increasing both in real terms and percentage growth. Interestingly, Java is still outgrowing the other JVM languages (also in real terms as well as percentage terms) but certainly the number of Groovy, Clojure, Scala and JRuby based projects are all growing at a fair rate. We help run the London Java Community and have had numerous conversations with start-ups through to Tier-1 Investment Banks that that are all successfully using a blend of JVM languages, it just hasn't hit the tech mainstream reporting yet.
Why has this resurgence/pattern occurred? Well we think three things:
1.) The JVM has proven to be the runtime to go to for large scale / cloud based applications (Twitter moved to it, LinkedIn uses it, Facebook now has a JVM Hadoop cluster etc). It's JIT, GC and multi-threading capabilities (which we feel are still a little crude, but still very good) and general stability means its an absolute winner.
2.) The JVM allows you to chose the right language for the right task (Java simply isn't the right language for many tasks we face today). It means that you can now do rapid web development (say Groovy/Grails, or JRuby/Rails) some really safe concurrency work (say Scala/Akka or Clojure) and still talk to your base of solid, well-tested Java. As an example, at our start-up (jClarity) we use Scala for a DSL that drives the Rules engine because Scala is simple more flexible than Java to build a DSL with (we prototyped both). Now that the Scala tooling is decent, the experience is *seamless*, we have Scala --> Java --> Scala and Java --> Scala --> Java scenarios that simply work out of the box.
3.) Moore's law - in order to take advantage of multi-core, you need a runtime that works intelligently on it. Since Java 6, the JVM has been a leader in this space.
Looking to the future we think an interesting trend will be Ruby developers moving to the JVM (JRuby). JRuby is currently the fastest Ruby implementation out there and Red Hat has recently grabbed all of the top JRuby engineers in a strategic move for their Open Shift platform. Think of all of the Rails apps that could be shifted to the JVM and therefore have the potential to scale as needed (assuming the app is designed 1/2 decently), there's no longer a limitation on the underlying runtime.
So in short we think Java will still heavily dominate, but that fast moving teams can and will benefit hugely from going polyglot, we know it has for us :-).