Java Library + Consistent Hashing

Rakesh Rajan rakeshxp at gmail.com
Thu Nov 15 22:33:16 UTC 2007


> 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 ?



> - I really like the fact that the library tries to perform some
> optimization on storing some native objects. Have you also looked at these
> optimizations ?
>             -> Collection of native object
>             -> Class containing native objects
>
>
> I'm not sure what you mean by that.  Do you mean a single object under a
> single key, or referencing multiple keys from the server(s)?
>
> For the former, the default transcoder should be fine.  For the latter,
> it'd be tough because some of the collection can disappear and it'd be
> spread across multiple servers.
>

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.


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.

- Rakesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071116/b9fcb670/attachment-0001.html


More information about the memcached mailing list