Updated Architecture: Cluster Multi Process (markdown)

TJKoury 2016-10-20 18:09:51 -04:00
parent 918ab7742f
commit fd669411ae
1 changed files with 2 additions and 2 deletions

@ -9,12 +9,12 @@ Communication from the Worker processes to the Master is handled via IPC.
|:-----|:------------|
|clusterRED.js| In charge of general process management. Returns a 'clusterRED' object. Has methods to initialize master and Worker processes, spawn and kill new processes, provide status on child processes. |
|red.js| Controls instantiation of admin server, api , core admin UI, and static server.|
|red/runtime/events.js| Modification to the runtime event bus. Sends messages from Worker to Master, which are then broadcast to all other Workers. Messages from master are (marked)(https://github.com/TJKoury/node-red/blob/cluster/clusterRED.js#L134) so as not to cause a rebroadcast cascade.|
|red/runtime/events.js| Modification to the runtime event bus. Sends messages from Worker to Master, which are then broadcast to all other Workers. Messages from master are [marked](https://github.com/TJKoury/node-red/blob/cluster/clusterRED.js#L134) so as not to cause a rebroadcast cascade.|
|red/api/comms.js| Enables websocket comms bus if on Master process.|
|red/api/index.js| Enables api if on Master process.|
|red/red.js| Initializes the runtime and launches the adminApp, nodeApp, and assigns the server property to the adminApp server if the process is Master.|
|red/runtime/index.js|Enables logging for the Master process, sends messages that go across the runtime comm bus to the Master process for distribution.|
|red/runtime/nodes/Node.js| Intercepts messages from nodes that are running on the Master and redirects to a Worker based on a round-robin (https://github.com/TJKoury/node-red/blob/cluster/clusterRED.js#L88)|
|red/runtime/nodes/Node.js| Intercepts messages from nodes that are running on the Master and redirects to a Worker based on a [round-robin](https://github.com/TJKoury/node-red/blob/cluster/clusterRED.js#L88)|
|red/runtime/nodes/flows/index.js| Restart Workers after flow modification. Brute force method ensures no lingering issues with long-running processes, bound ports, etc., but does open up the possibility of broken pipes when writing to files / sending data / etc.|
|red/runtime/storage/localfilesystem.js|Modified to only allow Master to log.|
|settings.js|Modified to expose the cluster module in function nodes, also provides the default setting for number of Workers.|