An example employing Communicating Sequential Processes for scheduling asynchronous workloads in Node.JS. It implements a pool of workers digesting and asynchronously processing lines from stdin.
./generate_words.sh > words.txt
cat words.txt | node index.js