Wed May 5 17:04:08 CEST 2004
Martin J. Logan wrote:
>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
>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.
More information about the erlang-questions