Java Library + Consistent Hashing

Dustin Sallings dustin at spy.net
Thu Nov 15 23:48:18 UTC 2007


On Nov 15, 2007, at 14:33 , Rakesh Rajan wrote:

>
> If you want to play with it, I can help you get it up and running.
>
> Yups, I would love to take a look at this. Could you point me to any  
> resource to set it up ?

	My latest tree is always here:

	http://hg.west.spy.net/hg/hacks/memcached-binary-full/archive/tip.tar.gz

	It doesn't have the very latest CAS stuff from the last couple of  
days, and it is failing a CAS unit test right now since I've started  
work on updating it with recent changes, so I'd say it's about three  
days behind memcached trunk and with one remaining bug.

>> I think I was not clear in putting my point across. Let me explain  
>> with an example
>
>
> Case 1:
>
>   Set<Integer> idSet  = new HashSet<Integer>() {{add(1); add(2);  
> add(3) } };
>   cache.set("test1",idSet);
>
> In this case the collection's serialized version would be stored  
> ( without any optimization ).
>
> Case 2:
>
> Class A implement Serializable {
>    int a ;
>    float b ;
>    Date now ;
> }
> cache.set("test2",new A());
>
> Again the individual members in this class would not be compressed.  
> Atleast in this case I can think of making this class implement  
> Externalizable and perform the compression of the individual class  
> member, if possible.

	Ah, yes.  I haven't considered doing anything with that, but it  
doesn't sound too hard.  It'd need to recurse on my transcoder,  
though, and I'd have to deal with cycle suppression.  That's  
pluggable, though, so an experimental transcoder could easily co-exist  
with the current one.

> 1.2.4 is imminent, but isn't a particularly exciting release for me.
>
> Hmm.. This is surprising. I was greatly looking forward for features  
> like 64 bit counter, atomic operations, tags :)  The feature that I  
> am really waiting for is atomic operations. Currently the memcache  
> code that I have written are not "thread-safe" ( concurrent read and  
> write ). So hoping that java library would start supporting CAS soon.

	Well, tags aren't there yet, but yeah, some of the other stuff is  
marginally interesting to me, but I'm mostly interested in some of the  
1.3 stuff.  I think we'll be able to do some really nice stuff.

-- 
Dustin Sallings


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071115/66d58f63/attachment.htm


More information about the memcached mailing list