Implementing Consensus In Distributed Systems