Rpc module completely written, not tested. Client side also
has a thread to listen for responses
Utils.with_mutex helper