Original URL: http://www.theregister.co.uk/2006/05/31/java_phobos/
Phobos – not just Java scripting for servers
The script may be getting better
There is now a gentle but distinct undercurrent of real world acknowledgement going on in the Java camp, where the posturing about purity is being softened by the fact that other programming languages and applications environments not only exist but are probably good at some functions.
Part of that trend can be seen in the hint that Rich Green gave about server-side scripting, just before JavaOne.
And server-side scripting there will probably be, though what the specific applications sweet-spot will be is still an unknown, according to Sun director of web technologies Tim Bray. It is still only a the project stage - Project Phobos - but it looks set to become one more bridge that is being built between Java and other environments. In real terms, this means Microsoft's .NET.
The underlying beauty of such developments for developers is that the specifics of any skill-set they have no longer ties them as individuals to a particular platform, environment, or marketplace. The ways of exploiting it in the "rival camp" are growing - and that can only be thought of as a good thing.
Project Phobos was one of three examples of non-Java languages demonstrated running on the Java Virtual Machine (JVM) at the recent JavaOne conference in San Francisco. One of the others was Project Quercus, from a company called Caucho, well-known for its Resin application server. This is a version of PHP that runs on the JVM and is sufficiently advanced that it can run Wikimedia, the infrastructure for Wikipedia. According to Bray, it actually runs substantially faster than the native version. The other was jRuby, an implementation of Ruby running on the JVM. The actual demo showed Ruby on Rails running on the JVM.
He readily acknowledged that Sun has, historically, tried to get people to use the Java language for everything, but said over the last couple of years it had been opening up to using non-Java languages on the JVM, matched by a huge upsurge of interest in scripting languages such as PHP and Rails.
"So there are three reasons we can see why non-Java languages are a good idea on the JVM," he said. "One is that there are millions and millions of Java developers and it would be good if they could use the other languages, because the rules and the ways of thinking are good. I think the notion that one programming language is appropriate for the whole universe of problems is just silly.
"The second is that the universe of Java APIs is large, rich and very high quality. Third is, if you look at all the dynamic languages, they typically have pretty lousy implementations of threading and concurrency, it is a weak spot. This is a problem because the servers we and our competitors are shipping are getting wider rather than faster, so something needs to be done if these dynamic languages are to be run well on the new servers. And one thing that can be done is to run them on the JVM, which has excellent implementation of concurrency."
Phobos is part of the Glassfish project and Bray personally sees it as an extremely interesting thought experiment that currently exists to show Java platform capabilities that people did not realise it could perform.
Information on it can be found here and I look forward to seeing what the community thinks of it.
"If we can improve the developer experience we will expand the scope for selling computers. It is a new direction. People used to think that if you used the Java platform you had to write in Java. Well, perhaps maybe not," he observed.
And how far towards the "old enemy" does this pragmatism now go? Bray pointed to another Java Project called Semplice. "This is Visual Basic on the JVM."
There a good few "ifs" to be overcome yet, but if it works out, and if it can be extended to encompass Visual Studio, then this should offer some interesting potential, not least because of the vast army of VB developers that exist out there. ®