Updated Architecture: Cluster Multi Process (markdown)

TJKoury 2016-10-20 17:10:31 -04:00
parent 4cf3028106
commit 5da7296ddd
1 changed files with 11 additions and 2 deletions

@ -1,6 +1,15 @@
##Multi-Process Model
##Files
| File | Description |
|:-----|:------------|
|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. |
##General Notes
- Using the Cluster module, instantiate the master process within which runs the main server instance with the admin interface. The settings file defines how many processes to spawn, with a 'max' argument spinning up one process per logical core. The master process listens for child death and respawns a set number of times as configured in the settings file.
- Communication between the cluster master and child processes is handled by passing serialized JSON messages. All messages are defined by originating node id designation, and multi-process enabled nodes listen to the message event from the cluster master on the local cluster and call the 'send' method on the enabled node, activating the flow at that point.
- Individual nodes that are multi-process enabled have a drop-down to define multi-process behavior