Distribute tasks to a pool of workers on node.js and in the browser