Inspired by Twitch Plays Pokemon, Ostracon was a library for real-time voting over the internet. It used Erlang’s lightweight actor model so that each connection could be represented with a single actor. After a certain time period, a reduce function would take all the values and compute some arbitrary aggregated value that can be used in application logic.
We built a couple of examples to demonstrate the library, starting with a pie chart that could resize in a live demo where each participant could join a vote every second.
We decided to also use the library to build a simple distributed game where players vote to control a professor in a quest to get grant money.