[erlang-questions] Gproc in a dynamic cluster

Ulf Wiger ulf.wiger@REDACTED
Wed Aug 3 16:41:26 CEST 2011


On 3 Aug 2011, at 15:16, Mihai Balea wrote:

> 
> On Aug 2, 2011, at 3:11 PM, Ulf Wiger wrote:
> 
>> 
>> On 2 Aug 2011, at 17:00, Mihai Balea wrote:
>> 
>>> Still, generally speaking, what would it take to add netsplit handling to gproc? It would be nice to be able to use some of gproc advanced features. Besides, I believe the initial intention for gproc was to be a replacement for global, and it cannot fill that role until it handles netsplits.
>> 
>> The first step is to make gen_leader detect netsplits.
> 
> I suspect netsplit detection is not the main issue here, but rather what happens after the split is resolved and the dictionaries must be reconciled.

Well, sure, but if gen_leader (as is currently the case) doesn't even detect netsplits and does something sane at the leader election layer, there really isn't much gproc can do (at least not much that could be called "elegant"). But naturally, once gen_leader has detected a netsplit and ordered all candidates into some safe mode, it needs to give the callback module a chance to reconcile the state.

The approach would be similar to my old 'locker' contribution (http://forum.trapexit.org/viewtopic.php?p=30186#30186), but perhaps gproc could do with some vector clocks as well? I usually borrow that stuff from the riak codebase. :)

BR,
Ulf W

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110803/414c2dcc/attachment.htm>


More information about the erlang-questions mailing list