Introducing the NodeJs plugin for Openfire

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.

Image3.jpg

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.

Image4.jpg

Why run native nodejs processes instead of using Project Avatar with the new Nashorn JavaScript engine for Java 8?

Answer: Please see this

http://strongloop.com/strongblog/how-to-run-node-js-on-the-jvm-with-avatar-js-an d-loopback/

I actually stated work on this new plugin with nashorn and avatar, but decided to go with using nodejs directly for three reasons.

  1. Performance. Google’s V8 engine outperforms Nashorn

  2. Nashorn with Avatar only runs in Java8 64bit platforms for now

  3. Compatibility. I want to use realtime node projects like Meteor, ShareJs, TogetherJs, Etherpad, etc

The plugin will become available in Openfire 3.10.0.

Hi Dele -

This looks really cool. I have been using Node.JS side by side with Openfire for over a year now along with the Strophe.JS libraries on the client side. I am intrigued by the idea of having Node.JS within the openfire server to simplify server deployment. This would allow me to create an appliance that I can roll out quickly and minimize the configuration of servers. Are you still actively developing it? Have you done some load tests? Is there any limitation on the number of node apps you can run?

Jake