Infrastructure for Distributed Algorithms