Sun's Da Vinci Machine broadens JVM coverage

Sun is working to make it easier to run different languages on the Java Virtual Machine. Under the new project it will make the ‘Da Vinci Machine’, which it calls "a multi-language renaissance for the Java Virtual Machine architecture".

Share

Sun is working to make it easier to run different languages on the Java Virtual Machine. Under the new project it will make the ‘Da Vinci Machine’, which it calls "a multi-language renaissance for the Java Virtual Machine architecture".

The project features prototype JVM extensions to run non-Java languages efficiently as well as architectural support.

Although many languages besides Java have been implemented on the JVM, including Ruby, the intent is to make the JVM more compatible with other languages, said JRuby core developer Charles Nutter. JRuby is a version of Ruby that runs on the JVM. "For the most part, almost every language that's more than five years old has some kind of implementation on the JVM," he said.

The JVM allows programs using it to run on any platform supporting the JVM; it provides hardware and OS independence. Benefits like flexible online code loading and online garbage collection, in which objects are moved out of the way automatically rather than having to be saved manually, are featured.

The Da Vinci Machine is intended to overcome obstacles like mismatches between a source language's design patterns and JVM capabilities. Because the JVM was designed for Java and Java favours some design patterns over others, implementers can find themselves dealing with these mismatches, Sun said.

"Specifically, the JVM was originally for Java, and many other languages have features unlike [Java’s]. We need to find ways to support those features," said Nutter.

Some pain points to running new languages on the JVM include limitations on calling sequences and control stack management, finite inheritance, and scaling problems when generating classes.

Capabilities of Da Vinci Machine are planned for inclusion in the upcoming JDK (Java SE Development Kit) 7, which is based on Java Platform, Standard Edition 7. Sun did not provide a release date for JDK 7. It is not known how many Da Vinci features might actually be in JDK 7, Nutter said.

Java developers we questioned liked the idea of Da Vinci Machine. Daniel Hinojosa, an independent Java developer and a founder of the Albuquerque Java Users Group, said: "[Da Vinci Machine] sounds like something I was thinking was going to happen and should have happened. I think there's going to be a race between Java and the Microsoft [CLR (Common Language Runtime)]."

Developer Alex Miller, tech lead at Java clustering technology vendor Terracotta, also agreed with the Da Vinci Machine effort: "There are lots of people writing and running dynamic languages on the JVM these days, and there are certain things that are complicated or obscure with the use of [dynamic] languages.”

Sun's JRuby project, meanwhile, is getting an upgrade. Version 1.1, due within a month, features a full compiler to greatly improve performance, Nutter said.

Find your next job with computerworld UK jobs