On Wed, Mar 12, 2008 at 7:36 PM, Jason Rennie <[EMAIL PROTECTED]> wrote:

> Is LastFM's libketama integrated into any of the memcached clients?  If
> not, how hard is it to integrate into one of the Java clients?  Any other
> consistent hashing libraries/modules that I should look at?


Sorry for hijacking this a bit, but it would be nice if someone could clean
up the terminology on various webpages describing it. Hashing is always
consistent, that's a fundamental property of a hashing algorithm, you get
the same hash for the same input every time. :-) Consistent server selection
on the other hand, that's a much better description of the thing we are
interested in. Also, implementing it is very easy, in our C# client,
BeITMemcached, it's about 10 lines of code to set it up once given your list
of servers, and a bit less to do the actual consistent selection. You can
check it out at
http://code.google.com/p/beitmemcached/source/browse/trunk/ClientLibrary/ServerPool.cs,
it's the ServerPool constructor and the GetSocketPool method.

And to answer at least one of your questions, I'm pretty sure the
SpyMemcached client by Dustin Sallings has consistent server selection:
http://code.google.com/p/spymemcached/


/Henrik Schröder

Reply via email to