An attempt to implement the raft consensus algorithm in javascript