[erlang-questions] Global names initialisation

Jan Henry Nystrom <>
Mon Jun 18 07:51:35 CEST 2007


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
> 
> 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




More information about the erlang-questions mailing list