gen leader

Ulf Wiger ulf.wiger@REDACTED
Tue May 4 23:48:23 CEST 2004


On 04 May 2004 11:31:54 -0500, Martin J. Logan <mlogan@REDACTED> 
wrote:

> This message is directed at the authors of gen_leader. I have been
> playing with the gen_leader code of jungerl fame. This code is just what
> is needed obviate all of our "global" problems.

Nice to hear it. I too think that gen_leader is a very nice behaviour.
I would like to see Thomas Arts & co work out a solution to the
bug they found in the leader election algorithm, before I start
pushing for it, though.  (:


> I do have one question
> about the gen_leader code. If I start a gen_leader in a node cluster
> consisting of a single node() the single gen_leader process will not
> elect itself leader. I have to fake it by saying
> gen_leader:start_link(leader, [node(), fake_node], [],
> gen_leader_callback, Args, Options).
>
> What is the reason that gen_leader wants another gen_leader to dominate
> and is not content to be his own boss:-)

I guess performing a leader election among a set of one seemed...
a bit superfluous, but it could surely be added as a special case. (:

/Uffe
-- 
Ulf Wiger




More information about the erlang-questions mailing list