I've seen some older posts touching on this topic but I wanted to know what the current, modern approach is.
The use case is: (1) assume you want to do a long running task on a video file, say 60 seconds long, say jspm install that can take up to 60 seconds. (2) you can NOT subdivide the task.
Other requirements include:
- need to know when a task finishes
- nice to be able to stop a running task
- stability: if one task dies, it doesn't bring down the server
- needs to be able to handle 100s of simultaneous requests
I've seen these solutions mentioned:
- nodejs child process
- webworkers
fibers- not used for CPU-bound tasksgenerators- not used for CPU-bound tasks- https://adambom.github.io/parallel.js/
- https://github.com/xk/node-threads-a-gogo
- any others?
Which is the modern, standard-based approach? Also, if nodejs isn't suited for this type of task, then that's also a valid answer.