gen leader

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Wed May 5 17:13:11 CEST 2004


I agree that it would be useful to be able to start
gen_leader with only one candidate node, e.g. for 
testing. Currently, there is no provision for adding 
candidates, even though it _can_ be done through a 
code_change (which should then be performed in a stable
system state, and synchronized across all candidate nodes.)

/Uffe

> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Bengt Kleberg
> (AL/EAB)
> Sent: den 5 maj 2004 17:04
> To: erlang-questions@REDACTED
> Subject: Re: gen leader
> 
> 
> Martin J. Logan wrote:
> ...deleted
> 
> >Say I am using
> >the gen_leader:leader_call to achieve something if I cannot elect a
> >leader even in the trivial case of a single node then I have 
> to do have
> >a case statement
> >
> >case nodes() of
> >    []    -> use the standard gen_leader:call
> >    Nodes -> use the gen_leader:leader_call
> >end,
> >
> >I must then also add code to handle these two cases in my gen leader
> >callback module. For me it would be easier just to have the 
> leader say
> >"oh there is no one else around... well then I am the leader"
> >  
> >
> 
> fwiw: gen_leader is supposed to add safety be beeing redundant.  
> currently we know that a successfull selection of a leader assures 
> redundancy. if/when a single leader is also successfull, it 
> will then be 
> neccessary to find out if there is more than one node.
> 
> 
> bengt
> 



More information about the erlang-questions mailing list