children

Concurrent tasks computation among nodejs child processes

Node Children

Concurrent tasks computation among nodejs child processes

  • Evented API (with EventEmitter2)
  • Auto-respawn dead processes
  • Underscore methods available on child processes

Install module with: npm install children

Documentation

var children = require('children')(path.resolve(__dirname, './worker2.js'), {
  // @see Manager.defaults 
});
 
// Start all childrens 
children.start(function(){
  // specify a callback or listen to the `ready` event 
  children.send("hello world");
});

children is a collection of child process that implements ~28 underscore methods

> children.pluck('pid')
[ 47494, 47495, 47496, 47497 ]

ready(children) message(child) respawning:child(child, children) spawning:child(child, children) spawned:child(child, children) killing:child(child, children) killed:child(child, children, exitCode, signalCode)

  • Update documentation
  • Better examples

v0.2.2 - Updated doxx (19 oct. 2014) v0.1.0 - Initial commit (17 fev. 2012)

Donate Bitcoins

Copyright (c) 2013 Francois-Guillaume Ribreau Licensed under the MIT license.