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