raft used by etcd available as a library ?

266 views
Skip to first unread message

sankar.c...@gmail.com

unread,
Feb 10, 2015, 3:14:14 AM2/10/15
to etcd...@googlegroups.com
Hi

I am trying to write an application (in golang) whose instances will run in multiple machines and will need some kind of co-ordination among them (mainly a distributed locking). Is the raft implementation used by etcd available as a library that my application could use ?

Or, alternatively are there any videos/tutorials etc. that explain how to use etcd as a locking service ?

Thanks

Sankar

Yicheng Qin

unread,
Feb 10, 2015, 7:31:07 PM2/10/15
to sankar.c...@gmail.com, etcd...@googlegroups.com
yes. our raft implementation is pluggable. You can use https://github.com/coreos/etcd/blob/master/raft/doc.go as the start point. We have future plan to separate it into a independent repo when it is stable enough.

For locking service, it is under development now. You can build one by yourself from v2 API using wait, etcd-index and ttl if you understand it.

sankar.c...@gmail.com

unread,
Feb 12, 2015, 5:47:49 AM2/12/15
to etcd...@googlegroups.com, sankar.c...@gmail.com
On Wednesday, February 11, 2015 at 6:01:07 AM UTC+5:30, yicheng.qin wrote:
yes. our raft implementation is pluggable. You can use https://github.com/coreos/etcd/blob/master/raft/doc.go as the start point. We have future plan to separate it into a independent repo when it is stable enough.

For locking service, it is under development now.

You have a url for this ?
 
You can build one by yourself from v2 API using wait, etcd-index and ttl if you understand it.

I have heard what ttl means (time to live ?) but no idea about the others. I will try to read through the docs and the related literature. I need a locking service and I believe that working with etcd (and potentially contributing patches) will be better than rolling out my own half baked implementation for now.

Thanks.

Sankar

Yicheng Qin

unread,
Feb 17, 2015, 2:46:22 AM2/17/15
to sankar.c...@gmail.com, etcd...@googlegroups.com
Yep.
There is a zookeeper recipe about leader/lock that may be helpful.

--
You received this message because you are subscribed to the Google Groups "etcd-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sankar P

unread,
Feb 17, 2015, 2:59:17 AM2/17/15
to Yicheng Qin, etcd...@googlegroups.com
2015-02-17 13:16 GMT+05:30 Yicheng Qin <yiche...@coreos.com>:
> Yep.
> There is a zookeeper recipe about leader/lock that may be helpful.

Are you referring to this https://zookeeper.apache.org/doc/r3.4.5/recipes.html ?

Also, can you share the url for the sources/docs of the distributed
lock implementation using etcd that you mentioned is in development ?

Thanks.

Sankar
--
Sankar P
http://psankar.blogspot.com

Yicheng Qin

unread,
Feb 17, 2015, 1:07:52 PM2/17/15
to Sankar P, etcd...@googlegroups.com
https://github.com/coreos/etcd/blob/master/Documentation/libraries-and-tools.md
There are a few listed in this doc. I don't read through them, so i cannot tell that which one is good.
Reply all
Reply to author
Forward
0 new messages