Cross-client memcached compatibility
aaron at serendipity.cx
Thu Jan 31 03:12:29 UTC 2008
On Wed, 2008-01-30 at 13:34 +0300, Tomash Brechko wrote:
> On Wed, Jan 30, 2008 at 10:04:28 +0000, Ciaran wrote:
> > Even this (string, integer and floating point [byte-array also?] ), would be
> > a better state-of-affairs for people who are working with the cache in a
> > mixed platform (as I currently am!)
> No doubt. Actually my post where I gone into serialization details is
> a bit off. The whole matter is simply not relevant to this list.
> The only thing the client author should provide is serialization
> hooks. When user asks to serialize the data, the client calls
> serialize hook, and rises SERIALIZED flag. When some other client
> sees SERIALIZED flag set, it calls deserialize hook before returning
> the data to the user. And it's up to the user to use consistent
> serialization methods.
Or identify the method used in the data itself. It's quite a reasonable
> It works exactly this way for current (not all?) clients, the only
> addition is that by default they set these hooks to serialization
> library that comes with the language. But this doesn't mean that they
> are fixed on a particular serialization method that we have to
> Thus, if one knows a library (or wrote one himself) that may serialize
> across different platforms, and has bindings (APIs) to languages in
> question, the user would simply hook it into his clients, that's all.
> So the question is whether there's such a library that binds to
> sufficient number of languages? But that has nothing to do with the
> clients themselves...
We do not need to define our own serialization system, nor do we need to
Choose The One True Serialization Encoding To Rule Them All (TM)-- we
just need to allow for enough information to identify what the data is.
More information about the memcached