[erlang-questions] Who called my gen_server?
Thu Apr 27 09:49:28 CEST 2017
No I didn't know that issue with "rpc".
But is switching to a different solution as you mentioned (gproc, etc.)
will help me solve "the who's calling me"?
Schultz<> wrote :
> ----- On Apr 24, 2017, at 5:43 PM, Frank Muller <
> > wrote:
> Hi guys,
> I've two connected nodes: N1, N2.
> N1 is mine and I've a gen_server running on it.
> N2 is external and doesn't belong to me.
> A process on N2 is calling my gen_server (on N1) via an rpc:call.
> You do know that the rpc server is exactly one process per Erlang
> node. Pushing to many calls through it will degrade performance.
> If you have any influence on the design of node N2, change it to call
> your N1 gen_server directly without the intermediate rpc process.
> You could either register your server with a global name, use another
> global registry (e.g. gproc), or a myriad of other ways to reach your
> gen_server without the rpc module.
> That way, `From` in the handle_call method will contain the PID of
> the caller.
> Is there a way to know the Pid of that process?
> Or, can I log all rpc_call(s) calling my gen_server?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions