title: Handle long-running processes in NodeJS?
body: <p>I've seen some older posts touching on this topic but I wanted to know what the current, modern approach is.</p>
  
  <p>The use case is: (1) assume you want to do a long running task <strike>on a video file, say 60 seconds long</strike>, say <code>jspm install</code> that can take up to 60 seconds. (2) you can NOT subdivide the task. </p>
  
  <p>Other requirements include:</p>
  
  <ul>
  <li>need to know when a task finishes</li>
  <li>nice to be able to stop a running task</li>
  <li>stability: if one task dies, it doesn't bring down the server</li>
  <li>needs to be able to handle 100s of simultaneous requests</li>
  </ul>
  
  <p>I've seen these solutions mentioned:</p>
  
  <ul>
  <li>nodejs child process</li>
  <li>webworkers</li>
  <li><strike>fibers</strike> - not used for CPU-bound tasks</li>
  <li><strike>generators</strike> - not used for CPU-bound tasks</li>
  <li><a href="https://adambom.github.io/parallel.js/" rel="noreferrer">https://adambom.github.io/parallel.js/</a></li>
  <li><a href="https://github.com/xk/node-threads-a-gogo" rel="noreferrer">https://github.com/xk/node-threads-a-gogo</a></li>
  <li>any others?</li>
  </ul>
  
  <p>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.</p>