engine known as Rhino. There is also another noteworthy feature: the
ability to run many Node.js and io.js applications in the JVM. These
applications can then call back and forth between optimized Java
libraries and automatically receive monitoring capabilities through JMX.
Java Virtual Machine - More than just Java
Java Platform offers a way to run different types of applications, even
if those applications are not written in the Java programming language.
As a result, developers can take advantage of optimizations and
stability of the JVM, while system administrators can better control and
Examples of other languages on the JVM
Groovy, and many others.
is a project to bring the node programming model, APIs and module
applications can take advantage of the Java platform's scalability,
manageability, tools, and extensive collection of Java libraries and
middleware. After downloading the Avatar.js binaries, developers can
then execute their applications. For example, Tim Caswell’s article "Hello Node!" contains basic examples for hello-console.js and hello-http.js that can be used as a basic way for testing Avatar.
Nashorn, The Hidden Weapon of JDK 8 was presented at the Silicon Valley Java User Group meeting in December 2014. The available slides describe the use of Nashorn and Avatar at Netflix and provide additional Nashorn demos.
Avoid rewrites and re-use libraries
JVM is access to Java libraries. Developers do not have to rewrite major
libraries or functionality like SQL or NoSQL drivers, Hadoop clients,
encoding libraries, etc. Additional examples are available in a previous
post, Nashorn: the rhino in the room, but they are not specific to Node.js.
has a two-part article about Avatar 2.0 and its Model Store API. By
using this model store API, developers can more easily interact with SQL
and No-SQL and benefit from many existing optimizations.
- Part 1 explains the architecture and threading model.
- Part 2 covers the technology behind the Model Store API.
Monitoring Applications on the JVM
Java processes can be monitored through a mechanism called JMX. System
Administrators can enable remote authenticated JMX connections and see
inside these running applications, rather than monitoring from the
outside coming in.
Additional details about JMX monitoring (both local and remote) can be found in a previous post, Deep Monitoring with JMX.
Monitoring applications with Mission Control / Flight Recorder
Flight Recorder is an effective way of monitoring JVM applications in
production. Unlike standard development profilers (like the NetBeans
profiler), Flight Recorder has negligible performance impact.
dashboard view in Mission Control provides basic information about CPU
and memory resources. Developers may use the Threads tab to better
understand system throughput, or if the application is blocking around
any particular resources.
To open Mission Control, run the jmc
command and connect to your Avatar application. The screenshot below
shows Mission Control monitoring a Node.js application identified as
com.oracle.avatar.Server. Read the complete article here.
WebLogic Partner Community
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.
Blog Twitter LinkedIn Forum Wiki
Technorati Tags: Node.js