Sun's DaVinci: A Renaissance for JVM?

With new "Da Vinci Machine" project, Sun is trying to make it easier to run different languages on the Java Virtual Machine. Will project's prototype JVM extensions make developers smile?

By Paul Krill
Fri, February 01, 2008

InfoWorld — Sun is working on technology to make it easier to run different languages on the Java Virtual Machine. Called the Da Vinci Machine, the project is being described by Sun as "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 Charles Nutter, core developer of JRuby, which is a version of Ruby to run 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.

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 favors 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 what Java provides. 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.

Nutter pointed out that Java, in being a statically typed language, differs from scripting languages like Ruby, which are dynamically typed. Thus, Java gives the JVM more clues about what code is going to be executed. Ways need to be found to let the JVM make the correct call for these languages, he said. In JRuby, this obstacle is addressed via a piece of code to inspect target operations.

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 could not provide a release date for JDK 7. It is not known how many Da Vinci features might actually get into JDK 7, Nutter said.

Da Vinci represents an experimental branch, or even a fork, of the JVM, said Nutter. He cautioned that fork in this case is not meant to carry the same negative connotations associated with forking of a platform.

Continue Reading

Our Commenting Policies