Skip to content

lisp-ceo/ChappySinclair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChappySinclair Build Status

Network Singleton Process Manager

Getting Started

Install the module with: npm install ChappySinclair

var ChappySinclair = require('ChappySinclair');
ChappySinclair.awesome(); // "awesome"

Documentation

(Coming soon)

Examples

(Coming soon)

Contributing

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.

Release History

(Nothing yet)

License

Copyright (c) 2013 James Meldrum
Licensed under the MIT license.

Spec

  • 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
    • 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.

Model:

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 *

TODO:

  • Model out Chappy
  • Boot app that issues terminal commands and stores their std-in

About

A distributed, networked singleton process manager

Resources

License

Stars

Watchers

Forks

Packages

No packages published