process-dispatcher

JavaScript process dispatcher backed by NodeJS Child Processes functionality. Intended to wrap any native NodeJS module to make it executable in subprocess. Interprocess messaging works via IPC


Keywords
child-process, cluster, ipc, nodejs
License
MIT
Install
npm install process-dispatcher@1.1.4

Documentation

process-dispatcher

Build Status

JavaScript process dispatcher backed by NodeJS Child Processes functionality. Intended to wrap any native NodeJS module to make it executable in subprocess. Interprocess messaging works via IPC

The Intention

A single instance of NodeJS runs in a single thread. The whole idea standing behind the library is to take advantage of multi-core systems and give user a way to run an existing code in a not only non-blocking way (which NodeJS certainly is) but also engaging the whole power of a machine spreading the processing among processes (both execution and hardware).

Isn't that what NodeJS cluster module is all about?

Exactly. That's what it is about. The process-dispatcher library in it turn is a rich wrapper around the child_process giving you the functionality which cluster claims to be implemented by end point developer. Among others are: easy to kick start with (all API are ready to use), master <-> worker IPC messaging.

Along side with the fact that the implementation is similar to the cluster module the important thing is that the process-dispatcher original intent is not load balancing or a kind of, but making microservices out of modules. Another words you wrap any module with process-dispatcher functionality to make it work as microservice isolated within its own space with all consequences.

Documentation

Latest API Documentation is auto-generated by JSDoc.