Introduction
The code for this talk was inspired from many sources, which are listed in the references of my slides. While the initial examples come straight from Tony Hoare's book, Communicating Sequential Processes, I chose to extend the vending machine motif for pedagogical purposes; to provide minimal working examples that gradually incorporate each fundamental primitive.
Note: Running these examples currently require viewing in Chrome Canary, Firefox Aurora, Safari Nightly or some other browser with experimental ES6 features enabled. Running these examples with your browser's console open allows you to monitor the verbose process log messages.
Example #1
A simple vending machine that accepts a single coin from a customer and then breaks.
Example #2
A simple vending machine that serves two customers and then breaks.
Example #3
A simple vending machine that serves an infinite number of customers.
Example #4
A simple vending machine that offers customers choice between two different candies.
Example #5
A dashboard monitor for a single vending machine and 100 simulated customers.
Example #6
A dashboard monitor for a cluster of vending machines and 2500 simulated customers each.
Example #7
A dashboard monitor demonstrating tuning for back pressure by utilizing buffers.
Example #8
A demonstration of maintaining UI-responsiveness on the same page as the previous dashboard examples.