process-dispatcher
v1.1.6
Published
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
Downloads
71
Readme
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
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.