NodeJS batch processing - child processes in the pool.
I know that a child process is a process, not a thread. I used the wrong semantics because most people know what your intentions are when you talk about "multithreading." Therefore, I will save it in the title.
Imagine a scenario in which you constantly use several similar and complex things, using one custom function or module. It makes sense to use all available kernels / threads (e.g. 8/16), for which purpose child_process.fork() intended.
Ideally, you will need several simultaneous workers and send / return messages to / from one controller.
node-cpool , fork-pool , child-pool are some of the modules that do just that, but they seem old / unsupported / impulative.
There are a ton of such modules, but they seem to be the most relevant. What all of them have is a couple of moments that almost played a major role, barely forked and abandoned.
What usually happens when I cannot find something for a task that seems to be something that makes sense in all respects is that there is an even better way that I am missing. Hence my question.
How do I create a parallel pool for a managed, multi-readed parallel fork() for my custom module that works with some processors?
Multi-threaded modules, such as TAGG and webworker-threads , are not the same because they do not support full modules (with binary compiled components).
PS
Now I am using a fork-pool , which seems to do exactly what I want with some quirks, but I cannot believe that such an unknown and weak module will be the only viable option here.