You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ratis.apache.org by Kishor Autade <au...@gmail.com> on 2019/05/30 15:03:28 UTC

Role change notification in State Machine

Hi Team,

We found Apache ratis library very much user friendly and good in terms of
implementation. It's best among all available libraries available for raft
protocol.
We are considering to use it for our use case to create cluster with raft
protocol.

Specific to our use case, we need information about leader. We couldn't
find if there is any such handle given outside which can tell us what is
the role of current node.
If state machine gets notification of role change then that would be great.
Could you please help us with this.

Thanks in advance.

Thanks,
Kishor.

Re: Role change notification in State Machine

Posted by Kishor Autade <au...@gmail.com>.
Thanks a lot Mukul. I was able to get role of server like you mentioned.
In StateMachine, we get call back in method notifyNotLeader() when node
loses leadership. Do we have such a callback for leader election also ? Or
we will have to implement by ourselves with the help of role matching in
separate thread.

Thanks,
Kishor.

On Thu, May 30, 2019, 10:21 PM Mukul Kumar Singh <mk...@gmail.com>
wrote:

> Thanks Kishor for trying out Ratis. The role of a Ratis node can be
> fetched using the getGroupInfo call.
>
> This will return the information about the current role of the Raft Server.
>
> Thanks,
>
> Mukul
>
>
> On 5/30/19 8:33 PM, Kishor Autade wrote:
>
> Hi Team,
>
> We found Apache ratis library very much user friendly and good in terms of
> implementation. It's best among all available libraries available for raft
> protocol.
> We are considering to use it for our use case to create cluster with raft
> protocol.
>
> Specific to our use case, we need information about leader. We couldn't
> find if there is any such handle given outside which can tell us what is
> the role of current node.
> If state machine gets notification of role change then that would be great.
> Could you please help us with this.
>
> Thanks in advance.
>
> Thanks,
> Kishor.
>
>

Re: Role change notification in State Machine

Posted by Mukul Kumar Singh <mk...@gmail.com>.
Thanks Kishor for trying out Ratis. The role of a Ratis node can be 
fetched using the getGroupInfo call.

This will return the information about the current role of the Raft Server.

Thanks,

Mukul


On 5/30/19 8:33 PM, Kishor Autade wrote:
> Hi Team,
>
> We found Apache ratis library very much user friendly and good in 
> terms of implementation. It's best among all available libraries 
> available for raft protocol.
> We are considering to use it for our use case to create cluster with 
> raft protocol.
>
> Specific to our use case, we need information about leader. We 
> couldn't find if there is any such handle given outside which can tell 
> us what is the role of current node.
> If state machine gets notification of role change then that would be 
> great.
> Could you please help us with this.
>
> Thanks in advance.
>
> Thanks,
> Kishor.