[erlang-questions] How to call a locally Pid cross node on Distributed Application!

Peter Lemenkov <>
Wed Apr 16 10:56:45 CEST 2008


2008/4/16, wenew zhang <>:
> On gen_server:call descriptions,we can call a process like :
> ServerRef = Name | {Name,Node} | {global,GlobalName} | pid()
> i have some questions:
> 1.if my application have many local register,how to use {name,node} call a
> Pid?

Using Pid would be enough. But first you need a valid one. Assume you
want to start application at some other node and you want to send
message to it. You need to start application using rpc:call(SomeNode,
yourapp, startfun, [Params]). It returns {ok, Pid} in case of success.
This Pid you may use as any other local pids.

With best regards!

More information about the erlang-questions mailing list