<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi,</div><div><br></div><div><span id="zwchr" data-marker="__DIVIDER__">----- On Apr 24, 2017, at 5:43 PM, Frank Muller <frank.muller.erl@gmail.com> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div>Hi guys,</div><br><div>I've two connected nodes: N1, N2.</div><br><div>N1 is mine and I've a gen_server running on it.</div><div>N2 is external and doesn't belong to me.</div><br><div>A process on N2 is calling my gen_server (on N1) via an rpc:call.</div></blockquote><div><br></div><div>You do know that the rpc server is exactly one process per Erlang</div><div>node. Pushing to many calls through it will degrade performance.</div><div><br data-mce-bogus="1"></div><div>If you have any influence on the design of node N2, change it to call</div><div>your N1 gen_server directly without the intermediate rpc process.</div><div><br data-mce-bogus="1"></div><div>You could either register your server with a global name, use another</div><div>global registry (e.g. gproc), or a myriad of other ways to reach your</div><div>gen_server without the rpc module.</div><div><br data-mce-bogus="1"></div><div>That way, `From` in the handle_call method will contain the PID of</div><div>the caller.</div><div><br data-mce-bogus="1"></div><div>Andreas</div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><br><div>Is there a way to know the Pid of that process?</div><div>Or, can I log all rpc_call(s) calling my gen_server?</div><br><div>/Frank</div><br>_______________________________________________<br>erlang-questions mailing list<br>erlang-questions@erlang.org<br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div></div></body></html>