<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>If you are using the Abecciu fork of gen_leader (<a href="http://github.com/abecciu/gen_leader_revival.git">http://github.com/abecciu/gen_leader_revival.git</a>), you can start gproc with an explicit list of nodes. </div><div><br></div><div>When adding a new candidate, you need to add it to the 'candidates' option via gproc, and also name one of the existing (and running) candidates as "seed node", using {seed, SeedNode}. This is undocumented, but the algorithm is sketched here:</div><div><br></div><div><a href="https://gist.github.com/499825">https://gist.github.com/499825</a></div><div><br></div><div>The gen_leader leader instance will trigger a candidate list update for all candidates, and the gproc dictionary will be automatically synched.</div><div><br></div><div>This could all be baked into the 'all' option somehow. I'll think about that.</div><div><br></div><div>BR,</div><div>Ulf W</div><br><div><div>On 1 Aug 2011, at 13:47, Mihai Balea wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>That is correct, however, I was wondering if there's a way to make gproc aware of nodes that are added at a later time.<br><br>On Jul 31, 2011, at 4:51 PM, Tino Breddin wrote:<br><br><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When using 'all' gproc_dist passes the list of nodes in the current cluster to gen_leader. Therefor in both cases you are only starting gproc_dist with 1 candidate node since you only connect them later.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">T<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Jul 29, 2011, at 11:19 PM, Mihai Balea wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi all,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Here's a scenario:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- start Node1<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- start gproc in global mode on node 1 (via {gproc, [{gproc_dist, all}]} in app.config)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- start Node2<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- start gproc in global mode on node 2 (same way)<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- connect the two nodes in a cluster, via net_adm:ping/1<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The two nodes see each other, as expected, but the two instances of gproc don't seem to be aware of each other's presence - global registrations done on one node are not visible on the other side.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Am I missing something? Is there a way to make gproc aware of new nodes in a cluster, either automatically or manually?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thanks in advance,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Mihai<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">erlang-questions mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></div></blockquote></div><br><div>
<div>Ulf Wiger, CTO, Erlang Solutions, Ltd.</div><div><a href="http://erlang-solutions.com">http://erlang-solutions.com</a></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></body></html>