On Tue, Feb 12, 2013 at 9:21 AM, Marcin Gozdalik <gozdal@gmail.com> wrote:
2013/2/11 Eliot Gable <egable+freeswitch@gmail.com>:
> On Mon, Feb 11, 2013 at 7:36 AM, Marcin Gozdalik <gozdal@gmail.com> wrote:I also think I understand what you are saying. It means we have
>>
>> +1
>>
>> I do not doubt mod_ha is necessary inside of FS and it may be
>> better/simpler than writing Pacemaker resource agent, but writing
>> yet-another-cluster-communication-engine is IMHO the wrong way to go
>> and using Corosync for communication will give a lot of value from
>> mature codebase.
>>
>
> I understand what you are saying, but what I am trying to get across is that
> I am not writing yet-another-cluster-communication-engine. All I am really
> doing is combining a multicast messaging API written by Tony and the event
> API in FS to broadcast existing state information between multiple FS nodes,
> as well as adding a tiny amount of logic on top of that to coordinate call
> fail over and recovery. That's probably a little over-simplified, but it
> gets the point across. The network communication code is already in FS and
> well tested. The event system is already in FS and well tested.
trouble putting thought into writing ;)
>From what I understand what you are trying to achieve is that every
node in FS "cluster" knows what are the nodes and whether they are
down or up.
What I am saying is that this simple task is fundamentally hard.
Sending and receiving multicast is easy, but keeping distributed state
consistent between nodes in cluster is hard (like in really hard,
harder than writing VoIP softswitch all over again), especially in
case of Byzantine failures (i.e. nodes lying that they are down when
they are up or other way round). I am no big expert in the area but
seen at least 2 cases (MMM -
http://www.xaprb.com/blog/2011/05/04/whats-wrong-with-mmm/ and Chubby
in Google - http://www.read.seas.harvard.edu/~kohler/class/08w-dsi/chandra07paxos.pdf)
where people were trying to write (MMM) or use (Chubby) some kind of
distributed code and failed.
That's why whenever I see anything related to distributed state I say
that it's way beyond my understanding and best is to use something
that works.