asynchronous calls
True asynchronous calls.
To achieve true asynchronous calls one have to implement it in the RMI protocol. This is how it is done in asyncrmi. First it is important that all the communications is done using Java NIO in non blocking mode, thus sending a message is no more then putting the message on the selector queue and then the thread is free.
Each Request contains a unique request id sent to the server, the server copy this request id to its reply. This make it possible to match the response to its request. After the Request was put on the selector queue the proxy return Future to the caller this future is saved in an internal data structure inside the proxy and when the reply comes from the server the proxy resolve this future with the right value from the response.