Mixed Language Environments

Steven Smith ssmith at fiveruns.com
Fri Nov 25 08:32:24 PST 2005


Thanks for the reply Martin.

I was experimenting with simple types (integers, strings) and had no  
problem accessing the values stored by a Java client from a Ruby  
client, but not vice versa.  The Java client could see the keys, but  
not decode the data.  Not sure if the Java client is intended to be  
used in mixed language environments, however.


On Nov 25, 2005, at 2:20 AM, Martin Atkins wrote:

> Steven Smith wrote:
>> Is memcached intended to be used in mixed language environments,   
>> i.e.,
>> where there are Ruby clients, Java clients, etc. sharing the  same
>> caches?  My suspicion is that there would be potential decoding   
>> issues,
>> etc. when getting a value in one language environment which  had been
>> set by another.  Just FYI, I've successfully installed  memcached and
>> have it working from with both Java and Ruby clients,  but have  
>> ran into
>> problems getting values in the Java environment  that were set with a
>> Ruby client.
>>
>
> You would have to write your own serialization code for complex types
> which can then be supported across multiple languages. Most of the
> client libraries out there just use whatever serialization mechanisms
> are provided by the language's stock runtime libraries.
>
> All of the clients I'm aware of store plain integers and strings as
> strings, though. Aside from character encoding issues, these simple
> types should be fine. Caveat: I've never looked at the Java client  
> library.
>



More information about the memcached mailing list