A better implementation of the Raft API.