Writing a Distributed Systems Library