Feeds

Oracle de-cloaks JavaScript Nashorn project

JavaScript shall speak unto JVM

Combat fraud and increase customer satisfaction

A project to make JavaScript work better with Java is being kicked off with a boost from Oracle.

Oracle’s multi-language lead Jim Laskey has announced Project Nashorn, which aims to build a lightweight, high-performance runtime in Java using the native Virtual Machine (JVM).

Nashorn will start from scratch, using entirely new code, according to Laskey, with initial source coming from an unnamed Oracle internal project.

The new project will allow Java developers to embed JavaScript in Java apps using JSR-223 and to develop freestanding JavaScript apps using the jrunscript command line too. Nashorn will also use MethodHandlers and InvokeDynamic APIs, described in JSR-292.

“The goal is to provide a lightweight high performance JavaScript on a native JVM,” Laskey said in his project proposal to the OpenJDK here.

Laskey wrote:

The scope of this project will include, but is not limited to, a parser API for scanning JavaScript source code, a compiler to convert ASTs from the parser to JVM byte code, and a runtime to support the execution of said generated byte code. Execution of JavaScript in this environment will be in conformance with ECMA-262 Edition 5.1 and will adapt to newer guidelines as standards evolve.

The project, part of the OpenJDK, will be moved to the OpenJDK repositories.

OpenJDK is the free and open-source implementation of the Java programming language, the project re-invigorated by Oracle once it took ownership of Sun Microsystems and which later attracted support from IBM and Apple after years in the wilderness thanks to industry politics.

Nashorn is the latest effort to diversify the languages supported by the JVM, a push that started under Sun to help ensure Java remained relevant in a world of growing language diversity.

JavaScript runs in a browser but making it execute in a JVM on the client or server has some benefits. It means apps written using JavaScript code can take advantage of a device or a server's CPU or GPU in performance.

JavaScript is finding its way on to the server in particular, thanks to PHP – one of the web’s most popular programming languages.

JavaScript is being mixed with other languages: it might call Java functions on a server and be used to retrieve data from PHP files, while PHP apps are being built that also use tabs written in CSS and JavaScript. Problem is, the transition to the server isn’t seamless, and apps that might work on a test machine won’t run on the main server.

Devs are using JavaScript because it dominates web programming and means a transfer of skills, but its downside includes having to deal with complex server-side issues such as scale and performance, running on multiple cores and keeping lots of long connections open.

You can already run JavaScript on the server using frameworks such as Node.JS, while there’s also Jaxer and Narwhal. Jaxer and Nawhal use a threaded model that suites web server development but which doesn’t scale well in applications running large numbers of processes or long connections. Node.JS has been getting a lot of interest because it uses event loops to run processes, helping JavaScript apps scale on the server. After initial enthusiasm, criticism of Node.JS set in - especially on its inability to scale.

An official project from the OpenJDK at least stands the chance of becoming something people agree on using, and could offer the industry an alternative that attracts critical mass and which isn’t subject to the waxing and waning fads of frameworks and languages. ®

Bootnote

Nashorn is the nickname given to a mechanised, WWII tank-busting gun built by the German army.®

Combat fraud and increase customer satisfaction

More from The Register

next story
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
OpenBSD founder wants to bin buggy OpenSSL library, launches fork
One Heartbleed vuln was too many for Theo de Raadt
Got Windows 8.1 Update yet? Get ready for YET ANOTHER ONE – rumor
Leaker claims big release due this fall as Microsoft herds us into the CLOUD
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
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Apple inaugurates free OS X beta program for world+dog
Prerelease software now open to anyone, not just developers – as long as you keep quiet
prev story

Whitepapers

Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
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.