etcd-io / raft

Raft library for maintaining a replicated state machine
Apache License 2.0
630 stars 160 forks source link

Implement a self-contained raft example #2

Open ahrtr opened 1 year ago

ahrtr commented 1 year ago

Refer to raftexample . But this example should NOT depend on etcd at all.

cc @Elbehery

Elbehery commented 1 year ago

Thanks a lot @ahrtr

assigning myself :)

Elbehery commented 1 year ago

i can't assign myself, can you please assign me ?

nic-chen commented 1 year ago

I would also like to participate if don't mind : )

aroradaman commented 1 year ago

Hi @ahrtr @Elbehery @nic-chen Can I pick this up? I'm new to distributed systems, so this would be a good learning exercise for me.

halegreen commented 1 year ago

interested in this and tend to try one if you guys has not done it

Elbehery commented 1 year ago

I am already working on it, thanks for your help :)

XiongKezhi commented 1 year ago

Not sure if this applies to other beginners, but I spend some time looking at the etcd server's code to understand how to wait for a proposal's commit. Thus, it would be great if we can somehow support it (probably by integrating with wait if my understanding is right.)

CaojiamingAlan commented 1 year ago

Can I take this over?

Elbehery commented 1 year ago

sorry, i am working on it :)

ahrtr commented 1 year ago

I expect the self-contained example should be a simple & independent example. But the PR https://github.com/etcd-io/raft/pull/67 contains lots of etcd related context. Although the PR doesn't directly depend on etcd, it copies lots of etcd's source code, which may not be good.

The overall idea (using interfaces to better separate concerns) in https://github.com/etcd-io/etcd/pull/15471 looks good to me, but we also need to completely remove the etcd context on top of it. @mhagger

aierui commented 11 months ago

@ahrtr If we need to implement a Raft self-contained example based on the current library, then do we only need to focus on the in-memory state, and we can without thinking about data persistence and data recovery in case of failure, such as wal and data storage ?

peacedog123 commented 7 months ago

What's the progress of this issue?

Elbehery commented 7 months ago

i have a pending PR .. will continue it this week 👍🏽

thanks @peacedog123

sumitya commented 5 months ago

Hi @Elbehery - is it still happening at your end ?. would be helpful to have this example for newbies in the repo.

Elbehery commented 5 months ago

Hello .. it is still WIP