InfoQ

News

JRuby Roundup: Google App Engine Support, BiteScript, New Compiler

Posted by Werner Schuster on Apr 08, 2009

Community
Java,
Ruby
Topics
JRuby ,
Ruby on Rails ,
Performance & Scalability
Tags
Google AppEngine ,
Ruby on Rails ,
JRuby

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.

Groovy by Ali Motaz Posted Apr 12, 2009 5:28 PM
Re: Groovy by Sebastien Auvray Posted Apr 13, 2009 5:18 PM
Re: Groovy by J B Posted Sep 3, 2009 4:32 PM
  1. Back to top

    Groovy

    Apr 12, 2009 5:28 PM by Ali Motaz

    when I see articles mentioning JVM languages which don't even hint at Groovy, it just makes me wonder.

    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?

  2. Back to top

    Re: Groovy

    Apr 13, 2009 5:18 PM by Sebastien Auvray

    Do people have to talk about (J)Groovy each time they mention "JRuby" or scripting languages? The answer is simple: NO.
    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...

  3. Back to top

    Re: Groovy

    Sep 3, 2009 4:32 PM by J B

    Sebastien, you are dead on. There seems to be some weird fear that increased interest in JRuby means the end of Groovy. And article about JRuby is just that, and need not mention Scala, Clojure, or whatever unless there is some specific pertinent reason.

    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. :) )

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.