Java Reference
In-Depth Information
While it is not suitable for developing complex enterprise applications (due to limi‐
tations of the callback model in larger codebases), Node.js (often referred to simply
as Node) has nonetheless become an interesting option for developing prototypes,
simple “glue” servers, and single-purpose HTTP and TCP server applications of low
to moderate complexity.
The Node ecosystem has also prospered by promoting reusable units of code,
known as Node packages. Similar to the Maven archives (and to earlier systems,
such as the Perl CPAN), Node packages allow the easy creation and redistribution of
code, although they suffer from the relative immaturity of JavaScript, which is miss‐
ing many modularity and deployment features.
The original implementation of Node is composed of several basic components—a
JavaScript execution engine (the V8 engine developed by Google for their Chrome
browser), a thin abstraction layer, and a standard library (of mostly JavaScript
code).
In September 2013, Oracle announced Project Avatar. This is an effort by Oracle to
produce a future-state architecture for web applications and to marry JavaScript
(and Node) to the mature ecosystem that already exists for Java web apps.
As part of Project Avatar, Oracle open sourced their implementation of the Node
API, which runs on top of Nashorn and the JVM. This implementation, known as
Avatar.js, is a faithful implementation of most of the Node API. It is currently (April
2014) capable of running a large number of Node modules—essentially anything
that does not depend on native code.
The future is, of course, unknown, but Avatar points the way towards a possible
world where the JVM is the foundation of a new generation of web applications that
combine JavaScript with Java and hopefully provide the best of both worlds.
Search WWH ::




Custom Search