CPSC 416: leader election for distributed system