Any good Node.js parallelization libraries?

1 points by thatxliner ↗ HN
Or do I have to use something along the lines of Web Workers or NodeJS Worker Threads? I would prefer it if I had an API similar to Python’s concurrent.futures. What I really want is apply a function to an array in parallel (i.e. some parallel version of .map)

5 comments

[ 3.4 ms ] story [ 20.0 ms ] thread
It is a single threaded runtime so to parallelize a map you will need to serialize the items and ship them to another node process. A bit like dask in Python.
We used piscina at it was quite good: https://github.com/piscinajs/piscina

While it may not provide parallel map out of the box it will help to implement it a little bit easier than using nodes api.