JRuby Roundup: Google App Engine Support, BiteScript, New Compiler
JRuby 1.2 was released a few weeks ago (InfoQ's coverage of JRuby 1.2RC1 contains an overview of the changes). With this release out of the way, the JRuby team now started exploring some new projects.
Ola Bini has been busy testing JRuby and Ioke on Google's newly announced Java support for Google App Engine (InfoQ's coverage of Java on GAE). Ola's explains the requirements JRuby and Rails on GAE and how to set up a JRuby on Rails app:
You need a fairly new copy of JRuby. Most of the changes needed to JRuby was added to JRuby trunk right after the JRuby 1.2 release, so check out and build something after that. The newest Rails version works fine too.
Since GAE doesn't support an RDBMS, there is no JDBC. Ola provides Bumble, a wrapper around Google's DataStore.
JRuby is just one of the JVM languages supported on GAE, others being Clojure or Rhino (Google maintains a list of language support). Ola also lists some of the GAE restrictions that cause problems for JVM languages; examples are changes in reflection, threading, bytecode verification and others.
Meanwhile, Tom Enebo created JRuby-Parser, which extracts JRuby's parser from JRuby and allows IDEs or other tools to use it without shipping the complete JRuby.
Charles Nutter started work on a new Ruby compiler, which aims to compile Ruby types to Java classes:
* It will use my bytecode DSL "BiteScript", just like Duby does
* It will use the *runtime* definition of a class to generate the Java version
The second point is an important one. Instead of having an offline compiler that inspects a file and generates code from it, the compiler will actually used the runtime class to create a Java version. This means you'll be able to use all the usual metaprogramming facilities, and at whatever point the compiler picks up your class it will see all those methods.
Charles also released a useful tool for generating bytecode with JRuby: BiteScript, an internal DSL for creating bytecode. JVM bytecode mnemonics are mapped onto Ruby methods which generate the bytecodes; methods for creating classes or methods complete the API and provide a compact way to generate class files.
For more information, see Charles' post on the BiteScript release.
what kind of Java developer, doesn't know about Groovy, or is not even interested? what kind of Java developer doesn't know that the current most talked about Java company SpringSource is invested into Groovy and pushed for its support on GAE?
So please Ali and all groovy-enthusiats, keep your comments when they are more appropriated and stop your childish daily propaganda. Actually I thought (J)Groovy didn't need such poor propagadvertising anymore but it seems it still does...
Ali: So, what was the missing Groovy content? What essential information relating to Groovy was missing? (BTW, now that the JRuby team has gone to Engine Yard, I think EY is the current most talked about Java company. :) )
Delivering Performance Under Schedule and Resource Pressure: Lessons Learned at Google and Microsoft
Ivan Filho Mar 06, 2014