[erlang-questions] How access the gen_server across the network

Oscar ro4tub@REDACTED
Fri Aug 7 17:12:08 CEST 2009


Now it works.
But  I still have two questions.

1. Must it connect the two nodes before trying the gen_server call?
2. Shall we make users decide to register it locally or globally while
designing the gen_server behavior?

Is there any good examples in ERLANG source package?

On Fri, Aug 7, 2009 at 8:46 PM, Oscar<ro4tub@REDACTED> wrote:
> yes. net_kernel:connect_node(server@REDACTED). returns true, but
> erlang:nodes(). returns an empty list.
>
>
> On Fri, Aug 7, 2009 at 8:34 PM, Kevin A. Smith<kevin@REDACTED> wrote:
>> Do you connect the two nodes, either via net_adm:ping/1 or
>> net_kernel:connect_node/1, before trying the gen_server call? If so, you
>> might try running the sasl application on both nodes and recreating the
>> error. SASL will provide a ton of crash information which can be really
>> handy when debugging these types of failures.
>>
>> --Kevin
>> On Aug 7, 2009, at 8:28 AM, Oscar wrote:
>>
>>> I've start the gen_server via gen_server:start_link({global,
>>> game_time_service}, ...) and access the service via
>>> gen_server:call({global, game_time_service}, get_time).
>>>
>>> It throws the nprpoc exception when I access it.
>>>
>>> Any suggestions?
>>>
>>> Thanks.
>>>
>>> ________________________________________________________________
>>> erlang-questions mailing list. See http://www.erlang.org/faq.html
>>> erlang-questions (at) erlang.org
>>>
>>
>>
>


More information about the erlang-questions mailing list