Feeds

Phobos – not just Java scripting for servers

The script may be getting better

3 Big data security analytics techniques

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.

"The third one was Phobos," Bray said. "This is a framework, running on the JVM, that allows you to program in scripting languages. The one that has been done first is JavaScript, running on the JVM on the server side. The demo was of an AJAX applications running a mashup of Reddit and deli.cio.us. The broader message behind this is that it starting to become interesting to run non-Java languages on the Java platform. If you look at the Java platform it is three different things. There is the Java language, secondary the API library, and the third is the JVM. Of those three one, the language, is replaceable."

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.

"For example, you can do lightweight scripting, such as opening up a JavaScript page that is doing something in a text editor, edit it and pop it into the application," he suggested. "Some people might think we're mad, but when you consider that the server side language and client side language are the same, it is a good thing."

Information on it can be found here and I look forward to seeing what the community thinks of it.

Bray claimed that JavaScript has started to grow up into a robust and decent language, and there is now the Rhino JavaScript engine which is being included in Mustang, the next Java Standard Edition. He said Sun's objective is to create an ecosystem where it is perfectly OK to utilise non-Java languages and from this "good things" will happen.

"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. ®

Top three mobile application threats

More from The Register

next story
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Inside the Hekaton: SQL Server 2014's database engine deconstructed
Nadella's database sqares the circle of cheap memory vs speed
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Oh no, Joe: WinPhone users already griping over 8.1 mega-update
Hang on. Which bit of Developer Preview don't you understand?
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
IRS boss on XP migration: 'Classic fix the airplane while you're flying it attempt'
Plus: Condoleezza Rice at Dropbox 'maybe she can find ... weapons of mass destruction'
prev story

Whitepapers

Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
SANS - Survey on application security programs
In this whitepaper learn about the state of application security programs and practices of 488 surveyed respondents, and discover how mature and effective these programs are.