partisan
partisan copied to clipboard
Add call emulation for `forward_message`.
currently PeerServiceManager:forward_message(Node, Target, Message) uses gen_server:cast to send its message on the recipient node. It would be nice to support the semantics of gen_server:call as well. This presents two issues:
callsets up a monitor on the remote server that it is sending to (I'll address this in another issue).callblocks until there is a reply. The current code neither blocks nor conveys any reply.
I have some basic code that implements remote sends, casts, and calls. However, it doesn't really work well for calls, since the gen_server:call at the remote end (in partisan_peer_service_server) doesn't do any multiplexing and could be blocked for a long time, interfering with unrelated calls and casts on the same node to node edge. So that needs to be fixed, and replies need to be added.