Implement scheduleRemoteCommand and related RPC functionality of PinnedConnectionTaskExecutor. This should involve:
- Acquiring a connection from the networkInterface if this is the first RPC run through this PinnedConnectionTaskExecutor, and storing it
- Enqueing the RPC request on a queue
- If no RPC work is currently being done, use the acquired connection to kick off asynchronous networking for the first RPC, using the reactor associated with the connection
Ensuring that the asynchronous networking on the reactor will continue processing each queued RPC request in a FIFO order unitl no requests are queued
Additionally, we'll need to handle cancellation for these RPC operations. This will involve:
-> Producing a CallbackState associated with each RPC operation request, and with a CallbackHandle returned to the user who scheduled the request
-> Allowing that CallbackHandle's "cancel" functionality to prevent that RPC from ever being run, if it has not yet started, or to cancel the ongoing asynchronous operation if it has. This may require mutex acquisition so we need to think carefully about what the concurrency - control should be here, and if and how the underlying connection can be reused after cancellation.
At implementation time, we may find it wortwhile to break the cancellation off into a separate task.