clojang.rpc

The clojang.rpc namespace has no analong in the JInterface package. This namepsace intends to provide a similar interface as that provided by the clojang.conn namespace: a set of functions for sending and receiving messages to and from remote processes. In this case, however, there is a very specfic client we expect to be receiving requests from and replying to: an RPC client, and one that expects this namespace to provide functions compatible with the RPC capabilities of an Erlang/OTP gen_server.

!

call

(call peer-node-name & args)

Send a blocking RPC message to a remote node. The function unblocks when the response message is received. Named after the function of the same name in the LFE/Erlang rpc module, this function is intended to be used with remote functions that return a result.

cast

(cast peer-node-name & args)

Send a blocking RPC message to a remote node. The function unblocks when the response message is received. Named after the function of the same name in the LFE/Erlang rpc module, this function is not intended to be used with remote functions that return a result. It will not return a value other than :ok, even if the remote function does return a value.

close

(close peer-node-name)(close self-node-name peer-node-name)

Close the connection to a remote node. Optionally, a local node name may be provided; otherwise, default node name is assumed for the local node.

open

(open peer-node-name)(open self-node-name peer-node-name)

Open an RPC connection to a remote node. Optionally, a local node name may be provided; otherwise, default node name is assumed for the local node.

Though this is required for RPC connections, the connection object is a general one. Once opened, the connection may be used for anything.

receive

(receive peer-node-name)

Receive an RPC message from a remote node.

send

(send peer-node-name & args)

Send an RPC message to the remote node.