From: Avinash L. <avi...@gm...> - 2008-06-17 16:28:32
|
Hi All I am trying to write a simple leader election module and I have 5 nodes A, B, C, D and E amongst which I need to elect a leader. Now I am following the example using SEQUENCE flags and trying to use the technique where the herd effect can be done away with. So I have A create a znode L-1, B create znode L-2 .... and E create znode L-5. After this I have L-2 watch L-1, L-3 watch L-2 etc. Let us assume A was elected leader. When A dies B should automatically become the leader and this seems to be working. What I need to know is how to C, D and E know about this? Do I need another mechanism to disseminate this information? I ask because not all znodes are being watched i.e C, D and E are not watching for L-1 which is the znode created by A. So how will they learn as to who the new leader is since no watch event will be triggered at their end. Thanks in advance Avinash |