Mixed Language Environments
mart at degeneration.co.uk
Fri Nov 25 00:20:56 PST 2005
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