node package manager


Node RaLF Server

This is an experimental implementation of a node.js server for the Energistics RLF protocol, for streaming real-time data from oil field facilities. It uses websockets for transport and Apache Avro for serialization.


  • Install Node from - v0.10 min required.
  • Clone the node folder from mercurial. Say, into c:\sf\rlfprototype-code-0\src\Node


c:\>mkdir ralfdemo

c:\>cd ralfdemo

c:\ralfdemo>npm install d:\sf\rlfprototype-code-0\src\Node

Various junk like this will show up as Node trys to install dependencies

npm http GET
npm http GET
npm http GET
npm http 304
npm http 304
npm http 304
npm WARN engine simple-http-server@0.1.8: wanted: {"node":"0.6.x","npm":"1.1.x"} (current: {"node":"v0.10.2","npm":"1.2.15"})
npm http GET
npm http GET
npm http GET

> websocket@1.0.8 install D:\ralfdemo\node_modules\node-ralf\node_modules\websocket
> node install.js

This step may fail, if you do not have a compiler configured and on your path. Not to worry, the code still runs, just not quite as efficiently.

[websocket v1.0.8] Attempting to compile native extensions.
npm http 304
npm http 304
npm http 304
npm http GET
npm http 304
[websocket v1.0.8] Native extension compilation successful!
node-ralf@0.0.1 node_modules\node-ralf
├── node-uuid@1.4.0
├── simple-http-server@0.1.8 (openurl@1.1.0, colors@0.6.0-1, optimist@0.3.7)
└── websocket@1.0.8


D:\ralfdemo>node bin/server	
Unzipped sample data

simple-http-server Now Serving: ./ at http://localhost:8080/

Wed May 08 2013 08:05:21 GMT-0500 (Central Daylight Time) RaLF Server is listening on port 8081


The following can be passed as command line options when starting the server.

Option Default Description
--httpServer true Run the web server, set false if you just want the RaLF Websocket server
--httpPort=port 8080 Webserver Port
--wsPort=port 8081 Websocket Port
--schemas lastest Name of the RaLF schema file to use. Look in the schema folder for .avpr files, any can be used
--autoSubscribe false Start pushing data without a subscription
--defaultSubscription Name of a Uri to use when auto-publishing, must correspond to a .json file in the data directory.