Code for the async rmi