helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kanak Biscuitwala <kana...@hotmail.com>
Subject RE: Comparison question
Date Sat, 29 Mar 2014 23:08:38 GMT
If you use ZK directly, one way to do it is to have the leader to write a znode when it becomes
leader to basically announce that it has become the leader. This should be an ephemeral node
and it should be removed by the leader before it relinquishes leadership.

If you use Helix, you can use RoutingTableProvider or watch the external view and that will
tell you exactly who the leader is.
________________________________
> Date: Sun, 30 Mar 2014 00:37:15 +0200 
> Subject: RE: Comparison question 
> From: erwin@optinity.com 
> To: user@helix.apache.org 
> 
> 
> Thanks a lot for fast turnaround response. 
> I agree with you but I found out that quorum in ZK can treat leader 
> election mechanism by using ServerService class. But I didn't figure 
> out how to get callback in the client side when leader elected or 
> polling the quorum or one of the members in the quorum who is the 
> leader. 
> 
> On Mar 30, 2014 12:42 AM, "Kanak Biscuitwala" 
> <kanak.b@hotmail.com<mailto:kanak.b@hotmail.com>> wrote: 
> 
> If you do leader election with ZooKeeper, you basically have to try to 
> create have to follow the instructions in this recipe: 
> http://zookeeper.apache.org/doc/trunk/recipes.html#sc_leaderElection -- 
> this involves creating an ephemeral+sequential node, and listening for 
> changes to the nodes that precede yours. 
> 
> If you do leader election in Helix, you configure your resource and 
> participants up front, and then you're told by callback when you're 
> leader, and you're told by callback when you've given up leadership. If 
> you have multiple different logical entities that must have leaders, 
> you can model this by just adding another partition to a resource. It's 
> less error-prone this way, but you do need to spend extra time bringing 
> up Helix controllers. 
> ________________________________ 
>> Date: Sat, 29 Mar 2014 23:05:46 +0200 
>> Subject: Fwd: Re: Comparison question 
>> From: erwin@optinity.com<mailto:erwin@optinity.com> 
>> To: user@helix.apache.org<mailto:user@helix.apache.org> 
>> 
>> 
>>>> Hello Masters, 
>>> 
>>>> We had some internal discussion regarding the comparison among 
>> Helix and Zookeeper in term of leader election mechanism. 
>>>> 
>>>> I'd appreciate if you could elaborate in several points about the 
>> benefit of Helix against the ZooKeeper in term of Leader Election 
>> mechanism. What can I do in Helix that is missing in ZooKeeprt in term 
>> of Leader Election. 
>>>> 
>>>> Thanks in advance, 
>> Erwin 
>>> 
>> 
>> ---------- Forwarded message ---------- 
>> From: "Erwin Karbasi" 
> <erwin@optinity.com<mailto:erwin@optinity.com><mailto:erwin@optinity.com<mailto:erwin@optinity.com>>>

>> Date: Mar 30, 2014 12:02 AM 
>> Subject: Re: Comparison question 
>> To: "kishore g" 
> <g.kishore@gmail.com<mailto:g.kishore@gmail.com><mailto:g.kishore@gmail.com<mailto:g.kishore@gmail.com>>>,

>> 
> <user-subscribe@helix.incubator.apache.org<mailto:user-subscribe@helix.incubator.apache.org><mailto:user-subscribe@helix.incubator.apache.org<mailto:user-subscribe@helix.incubator.apache.org>>>

>> Cc: 
>> 
>> 
>>> Hello Masters, 
>> 
>>> We had some internal discussion regarding the comparison among Helix 
>> and Zookeeper in term of leader election mechanism. 
>>> 
>>> I'd appreciate if you could elaborate in several points about the 
>> benefit of Helix against the ZooKeeper in term of Leader Election 
>> mechanism. What can I do in Helix that is missing in ZooKeeprt in term 
>> of Leader Election. 
>>> 
>>> Thanks in advance, 
>>> Erwin 
> 
 		 	   		  
Mime
View raw message