Skip to content
This repository has been archived by the owner on Aug 7, 2020. It is now read-only.
/ node-workers Public archive

manage bunch of processes. include create, close, restart, send message

License

Notifications You must be signed in to change notification settings

chideat/node-workers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-workers

Worker process manager.

Functions

  • create/close/auto_restart bunch of processes.
  • send/broadcast/sendTo messages to child processes.
  • multiprocess logging support.

Usage

Install

npm install node-workers

master

var Workers = require('node-workers')('Workers');

worker

var logger = require('node-workers')('logger');

worker send message to master

process.send(['data', 'i need to be inited']);

More Examples

Protocols

There are too protocols between master and workers

  • logger Used to do log job. internal use.
  • data Used to communicate with master. Used by worker.

Principles

  • Use child_process to manage bunch of processes.
  • The communication between master and worker is by IPC.
  • Logging function is also supported by IPC.

LICENSE

MIT

About

manage bunch of processes. include create, close, restart, send message

Resources

License

Stars

Watchers

Forks

Packages

No packages published