global:registered_names delay
Laurent Ostiz
3 posts
|
Hi! Thanks for the screencasts! Following them, I noticed that, after starting two nodes (on the same machine), when we call chat_client:start_router/0 on one node, and then calling global:registered_names/0 on the other node, the global “registry” is not up to date (blank list), until I make a net_admin:ping/1 on one or the other node. Have you noticed that ? I suppose there is a kind of flush to force update of the global registry, or something else I am missing? Cheers |
Kevin Smith
20 posts
|
net_adm:ping/1 does more than just pinging. Or rather, pinging one node from another does more than just verify that node’s existence. A successful, as in the case of two nodes which share the same Erlang cookie, causes the parts of the Erlang runtime which handle clustering to set up a networked connection between the two nodes. Part of the connection setup is to synchronize the state of the global names registry on each node. That’s the behavior you’re observing. |
2 posts, 2 voices
