node.js module to elect a master peer in a distributed system