InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

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

Posted by Werner Schuster on Apr 08, 2009

Sections
Development,
Architecture & Design
Topics
Ruby ,
Java ,
Ruby on Rails ,
Performance & Scalability ,
JRuby
Tags
Ruby on Rails ,
JRuby ,
Google AppEngine

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
Re: Groovy by Sebastien Auvray Posted
Re: Groovy by J B Posted
  1. Back to top

    Groovy

    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

    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

    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

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?