[erlang-questions] slave:pseudo/1,2 question

litao cheng litaocheng@REDACTED
Mon Nov 10 03:54:51 CET 2008

hi, buddy.
I have some questions about the slave:pseudo/1,2 function.
the doc says:
"A pseudo server is a server with a registered name which does absolutely
nothing but pass on all message to the real server which executes at a
master node. A pseudo server is an intermediary which only has the same
registered name as the real server. "
In my opinion, the pseudo server looks like a proxy, it transfers all the
message to the process on the master, the process registered with the same
name as the slave.

but in the slave.erl line 79, the code is :
relay1(Pid) ->
        X ->
            Pid ! X

the Pid is returned by rpc:call, so i think the message can't send to the
the correct way is:
relay1(Name, Master) ->
        X ->
            {Name, Master} ! X
    relay1(Name, Master).

Is it right?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081110/d1c07738/attachment.htm>

More information about the erlang-questions mailing list