Node-RED is a visual tool for wiring the Internet of Things. The Distributed Node-RED (DNR) project extends Node-RED to support flows that can be distributed between devices. DNR works with a cluster of vanilla Node-RED instances and a coordinator called DNR Editor is used to coordinate the participating Node-RED instances.
DNR Editor is a Node-RED flows editor modified to support the design of distributed flows. Once new flows are deployed, they are not started but distributed to participating Node RED instances in the cluster and deployed there.
A Node RED instance can be connected to a DNR cluster by installing node-red-contrib-dnr, a special Node RED node designed for DNR.
Node-red-contrib-dnr module consists of a special node called DNR Daemon node, which acts as a local agent that connects the local Node-RED instance to the DNR cluster. This node gets the DNR flows from DNR Editor, transforms it to a compatible Node-RED flow and deploys the "dnr-ized" flow to the local Node-RED instance.
A sample DNR flow that runs on several Raspberry Pis and a Cloud server:
The idea of DNR:
Requirements: several Raspberry Pi (participating Node-RED, just for fun, could be multiple instances of Node-RED in a single machine); a computer to run DNR Editor (the coordinator)
Similar to Node-RED: git clone, npm install, grunt build, and start by "node red"
Or just: npm install -g dnr-editor, dnr-editor -s <setting file>
DNR Editor will run by default at :1818 port.
After this, these connected devices can be seen on the Device Monitor on DNR Editor: GUI->Menu->DNR->Show devices
A minimal sample DNR flow:
Documentation on vanilla Node-RED can be found here.
More tutorials on wiki page.
An initial version of DNR is also available at https://github.com/mblackstock/node-red-contrib/ and at https://github.com/namgk/distributed-node-red where a single installation of modified Node-RED run on participating devices. In order to reduce the effort required to augment the vanilla Node-RED as well as to allow users to use vanilla Node-RED instead of an augmented one, a special node is created called DNR-Daemon (node-red-contrib-dnr) which downloads, converts DNR flows into flows that vanilla Node-RED can understand, and install them to the local vanilla Node RED where it run.
Node-RED is a project of the JS Foundation.
It was created by IBM Emerging Technology.
This is a research project funded by NSERC that aims at designing a distributed application platform for the Internet of Things and Fog Computing.