<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi Frank,</div><div><br></div><div><span id="zwchr" data-marker="__DIVIDER__">----- On Apr 27, 2017, at 9:49 AM, 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;"><div>Hi Andreas,</div><br><div>No I didn't know that issue with "rpc".</div><br><div>But is switching to a different solution as you mentioned (gproc, etc.) will help me solve "the who's calling me"?</div></blockquote><div><br></div><div>Only for handle_call case. handle_cast and handle_info won't get that information. You have to include</div><div>the source in the actual message you are sending.</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;"><br><div>/Frank</div><div><br><div class="gmail_quote"><div>Schultz<<a href="mailto:aschultz@tpip.net" target="_blank">aschultz@tpip.net</a>> wrote :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><div>Hi,</div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><br><div><span id="m_4776000941581423829zwchr">----- On Apr 24, 2017, at 5:43 PM, Frank Muller <<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>> wrote:<br></span></div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><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"><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><br></div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><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><br><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><br><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><br><div>That way, `From` in the handle_call method will contain the PID of</div><div>the caller.</div><br><div>Andreas</div></div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><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"><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><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></blockquote></div></div></div></blockquote></div></div><br></blockquote></div></div></body></html>