bsm / redis-lock

[DEPRECATED] Please see https://github.com/bsm/redislock instead

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updates and Redlock?

KayoticSully opened this issue · comments

Sorry if this is not the correct venue for this kind of question, but I couldn't find another means for contact.

Is this project still on your radar to maintain like redis.v3 is? And if so, is this an implementation of Redlock? After looking at the code it seems like this does implement the simple single Master Redlock type locking... but I can't tell if this would work properly with a Redis cluster. Could you offer any clarification on that?

Thanks! I've been happily using your redis.v3 library and hope this one can solve my dlm need!

So yes, it's just a simple distributed lock implementation, base on http://redis.io/topics/distlock, on top of redis.v3. There is not direct support for redis cluster as distributed locks are maintained through a shared key which can only ever exist on one node.

That said, you can now pass a ClusterClient instance to NewLock, as I have abstracted the API in 5fd6dd3#diff-8e0a04a8bff74b300db5882b4be50589.

Hope that helps