[erlang-questions] gen_leader usage/pointers

Piotr Kaleta piotrek.kaleta@REDACTED
Thu Sep 23 00:52:43 CEST 2010

 First of all, few (if not all) versions of gen_leader implementations
has been gathered on github here:
As README says, you should use the 'combined_version'.

A good starting point with tutorial is located at:

However you should remember that current versions of gen_leader works in
a way that you have to statically define the list of nodes that can
become master in case of other nodes failure. Current implementations
however, are incapable of adding nodes that might claim master role in
future, at runtime. This makes gen_leader incapable of working in
unstable environments when all of master nodes might go down for some

On 09/23/2010 12:15 AM, Juan Jose Comellas wrote:
> Can anyone who's ever used or (even better!) written one of the many
> gen_leader incarnations point me to some documentation/examples on how to
> use it? I have a scenario where I have to keep a master process (to be
> chosen randomly or according to load) with slaves that takeover when the
> master goes down. I'm not sure if gen_leader is the correct solution, as the
> master communicates to an external service and there will be more than one.
> Both the master and the slave have open sockets to the external service and
> the slave socket is "activated" as soon as the master goes down.
> I'd appreciate any pointers anybody might give me.
> Thanks,
> Juanjo

More information about the erlang-questions mailing list