views:

175

answers:

1

We would like to some processing in a Java application, store the results in our pool of memcache servers, and read it back using memcache in PHP.

This is easy enough to try, but I though I would ask and see if anyone else has done this.

As long as both the Java and PHP clients connect to the same pool of memcache servers, will both clients hash to the same server location making retrieval from PHP possible?

+3  A: 

No. Not all clients hash the same way. As evidence of this, you'll see that some clients offer "consistent hashing", while others don't.

In short, memcached clients are allowed to use any hashing algo they please. There is no official standard.

The PHP client supports a variety of hashing algorithms -- so it may be possible to configure it to use the same algo your Java library uses (it looks like there are several out there -- which are you using?). But you'll want to test heavily, obviously.

Frank Farmer
Hmmm interesting - what about Java and PHP in particular?
Peter Sankauskas