Network Singleton Process Manager
Install the module with: npm install ChappySinclair
var ChappySinclair = require('ChappySinclair');
ChappySinclair.awesome(); // "awesome"
(Coming soon)
(Coming soon)
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
(Nothing yet)
Copyright (c) 2013 James Meldrum
Licensed under the MIT license.
- Write grunt-contrib-coach: singleton process manager
- Launch several processess (from a directory cwd)
- node _lib/
- Keep track of their PID's
- Report them centrally
- Implement common commands for them - start, stop, restart, std-out
redirection
- Have all coach members implement an interface
- Should just be able to send SIGINT / SIGTERM, wait and then restart
- Have all coach members implement an interface
- Report them over http?!
- Options to redirect std_out, std_err (std_out/std_err combined), redirect std_in over http
- Security concern: Anyone outside of the VPC will be able to communicate with this process.
- Launch several processess (from a directory cwd)
Client: * CS object created by client * CS specs read from hidden JSON file called .ChappySinclair.json- eventually, just using Obj notation throughout for now * Each 'command' to be run is an Object:
{
id : "",
exec : "",
success : function(){
// Return value determines what to do on success
// Return "RESTART" to restart
// Return another id like "#_id" to launch that process
},
error : function(){}
}
SuperClass: * CS server launched * Internal processes read from Objects * Local log caches prepared, synced to disk, should function like Object store * Waits on port * When polled, reads from GET/POST - eventually, just GET now * Returns data as JSON * Routes * / - Default * /run *
- Model out Chappy
- Boot app that issues terminal commands and stores their std-in