You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by Ameya Yerpude <ay...@snaplogic.com> on 2020/10/30 04:29:05 UTC
Regarding Multiple State Machine
Hello Developers,
I am a master's student of University Of San Francisco working on a
project which uses distributed census and found the ratis library
really useful. But after going through the source code, i wanted to know if
a certain raft group can have more than 1 state machine or not because i
could not find more about it.
Let me know if anything can be done and also let me know if anything is
required from my side.
Thank you!
Have a nice day!
Best,
Ameya
Re: Regarding Multiple State Machine
Posted by Rui Wang <am...@apache.org>.
Hi Ameya,
Are you looking to have multiple state machines for one raft group? If so,
what is the scenario for such a case?
I have seen an example in Ozone. In which a state machine is implemented in
a way that passes log entry to different state managers. In this example,
logically there is only one state machine for Ratis, but then you can have
multiple places to manage different states.
-Rui
On Fri, Oct 30, 2020 at 3:30 AM Mukul Kumar Singh <mk...@gmail.com>
wrote:
> Hi Ameya,
>
> It is possible to only have one state machine per raft group.
>
> Thanks,
>
> Mukul
>
> On 30/10/20 9:59 am, Ameya Yerpude wrote:
> > Hello Developers,
> >
> > I am a master's student of University Of San Francisco working on a
> > project which uses distributed census and found the ratis library
> > really useful. But after going through the source code, i wanted to know
> if
> > a certain raft group can have more than 1 state machine or not because i
> > could not find more about it.
> >
> > Let me know if anything can be done and also let me know if anything is
> > required from my side.
> >
> > Thank you!
> >
> > Have a nice day!
> >
> > Best,
> > Ameya
> >
>
Re: Regarding Multiple State Machine
Posted by Mukul Kumar Singh <mk...@gmail.com>.
Hi Ameya,
It is possible to only have one state machine per raft group.
Thanks,
Mukul
On 30/10/20 9:59 am, Ameya Yerpude wrote:
> Hello Developers,
>
> I am a master's student of University Of San Francisco working on a
> project which uses distributed census and found the ratis library
> really useful. But after going through the source code, i wanted to know if
> a certain raft group can have more than 1 state machine or not because i
> could not find more about it.
>
> Let me know if anything can be done and also let me know if anything is
> required from my side.
>
> Thank you!
>
> Have a nice day!
>
> Best,
> Ameya
>
Re: Regarding Multiple State Machine
Posted by Tsz Wo Sze <sz...@gmail.com>.
Ratis supports multiple groups in a server. Each group could be
initialized with a different state machine using StateMachine.Registry.
See TestStateMachine.testStateMachineRegistry as an example.
Tsz-Wo
On Fri, Oct 30, 2020 at 1:15 PM Ameya Yerpude <ay...@snaplogic.com>
wrote:
> Hello Developers,
>
> I am a master's student of University Of San Francisco working on a
> project which uses distributed census and found the ratis library
> really useful. But after going through the source code, i wanted to know if
> a certain raft group can have more than 1 state machine or not because i
> could not find more about it.
>
> Let me know if anything can be done and also let me know if anything is
> required from my side.
>
> Thank you!
>
> Have a nice day!
>
> Best,
> Ameya
>