Basic help required for the JAVA API

Mauro N. Infantino mauroi at digbang.com
Mon Apr 9 17:14:53 UTC 2007


You could also serialize everything in JSON. There's a library for every
major language, I think. You'd have to change your application a little bit
serializing everything before storing it. Also, you'd have to restart all
your memcache instances. Besides that, seems like a nice solution.
 
Regards,
Mauro.


  _____  

From: memcached-bounces at lists.danga.com
[mailto:memcached-bounces at lists.danga.com] On Behalf Of Steven Grimm
Sent: Monday, April 09, 2007 2:05 PM
To: Greg Whalin
Cc: memcached at lists.danga.com
Subject: Re: Basic help required for the JAVA API


If he only has one server, how can it be the hashing? All the keys will
resolve to that one server no matter what the hash algorithm is.

I think it's the serialization. Java's deserializer has no idea what to make
of PHP's serialization format.

As I see it you have two options, if that's indeed the problem: you can
write your own serializer in PHP to serialize to some other format (probably
not Java's native format since that would be a real pain to get right in
PHP) or you can parse the PHP format in Java. PHP's serialization format is
pretty simple so that'd be the route I'd take. You may be able to make some
use of the PHP-in-Java implementation, Quercus:

http://quercus.caucho.com/

It has code to deal with PHP-serialized objects, but I'm not sure what it
ends up building on the Java side.

-Steve



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20070409/c85a9810/attachment-0001.htm


More information about the memcached mailing list