A pure-JavaScript replicated state machine.