A framework for writing server processes