As a follow-up to my original OpenfireJs plugin for Openfire, I have created a new plugin that embeds the NodeJs binary and runs it as a java Proces. It includes the binaries for Windows, Linux and OSX (64bit and 32bit) and selects which one to use. There is a long story behind my need to get JavasScript embedded in Openfire and I will blog about it some time soon.
For example, it can be used with the excellent node-xmpp library to quickly implement xmpp components or even XEPs. Each Node process is under Openfire control and can benefit from being part of the Openfire infrastructure, clustering, database access, user/group management.
Answer: Please see this
I actually stated work on this new plugin with nashorn and avatar, but decided to go with using nodejs directly for three reasons.
Performance. Google’s V8 engine outperforms Nashorn
Nashorn with Avatar only runs in Java8 64bit platforms for now
Compatibility. I want to use realtime node projects like Meteor, ShareJs, TogetherJs, Etherpad, etc
The plugin will become available in Openfire 3.10.0.