[erlang-questions] Global names initialisation
Kirill Zaborski
qrilka@REDACTED
Mon Jun 18 09:12:33 CEST 2007
I thought that could solve this problem by running
net_kernel:connect_node in erl init. I've tried -eval, -run, -s with
no success.
It seems that net_kernel starts later than this initialisation steps.
Am I right?
Regards,
Kirill.
On 6/18/07, Jan Henry Nystrom <jan@REDACTED> wrote:
Kirill Zaborski wrote:
> > For my application I need to register "central" service with a global
> > name. I do this using {gobal, server_name} in gen_server:start_link/4
> > Registration goes OK but when I start other node on the same host using
> > different -sname parameter I get an empty list from
> > global:registered_names/0. If I connect to the "main" node with
> > net_adm/ping then I see the desired global name.
> > I there any way to get this right from the start?
> Yes, connect from the start. The global library is implemented in
> Erlang and uses nodup and nodedown messages from net_kernel to
> keep track of nodes coming and going. BTW, to connect explicitly
> net_kernel provides the function connect_node/1.
>
> /Cheers Henry
>
>
> >
> > Regards,
> > Kirill.
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
> --
> Jan Henry Nystrom
> Training Manager
>
> Erlang Training and Consulting Ltd
> 401 Fruit and Wool Exchange,
> Brushfield Street, London,
> E1 6EL, United Kingdom
> Company Registration 3893360 VAT Number GB 752 1091 57
> Tel +44 207 456 1020
> Fax +44 870 1390 779
> jan@REDACTED
>
More information about the erlang-questions
mailing list