Skip to content

bringr/node-children

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Children Build Status

Concurrent tasks computation among nodejs child processes

Features

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

NPM

Install the module with: npm install children

Usage

var children = require('children')(path.resolve(__dirname, './worker2.js'), {
  // @see Manager.defaults
});

children.start(function(){
  // 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 ]

Available events

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

Todo

  • Update documentation
  • Better examples

Release History

v0.1.0 - Initial commit (17 fev. 2012)

License

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

About

Concurrent tasks computation among NodeJS child processes (vertical scaling)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published