[erlang-questions] Erlang suitability

Ulf Wiger ulf@REDACTED
Fri May 18 18:39:28 CEST 2012


On 18 May 2012, at 18:24, Garrett Smith wrote:

>> Could you use a scheme where each node holds a token and uses
>> gproc:give_away/2 to pass it to the next node?
> 
> Hah! I forgot about gproc's leader election features.
> 
> I know that was "in process" for a while -- can anyone share recent
> experience with it?

Well, it is about as good as the latest and greatest gen_leader. ;-)

Gproc relies on gen_leader, and simply passes on the start options
to it. Some versions of gen_leader (I believe you have the fork that's
currently 'leading the pack' in the github network graph ;-)

However, gproc uses full replication, so gproc:give_away/2 will involve
all 75 nodes - not just the two.

BR,
Ulf W

PS Since gen_leader hasn't had a strategy for resolving netsplits
(i.e. merging data and resolving inconsistencies), gproc has no support
for this either. Does any of the latest gen_leader versions have something
that gproc can use?

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com






More information about the erlang-questions mailing list