Cross-client memcached compatibility

Tim Bunce Tim.Bunce at pobox.com
Mon Feb 11 20:17:19 UTC 2008


On Mon, Feb 11, 2008 at 07:59:31PM +0000, Tim Bunce wrote:
> On Mon, Feb 11, 2008 at 09:31:56AM +0000, Ciaran wrote:
> >      >
> >      > Reading the current utf-8-in-perl discussion however it seems that this
> >      > is a directly competing requirement to mine *sigh*, in this approach it
> >      > seems that people are happy to use the flags to encode serialisation
> >      > specific information ?
> > 
> >      No, I mean code, regardless of the patched state. "This is how I solved
> >      the problem" - not just the list of flags. Include the path to enyim in
> >      the page too. Mark across the top that this is experimental and for
> >      discussion.
> > 
> >      and yes, I'm asking this because there're some conflicting discussions
> >      about flag usage.
> > 
> >    Sure, ok.  I'll try to put some code up there tonight, but like I said its not very exciting at the
> >    moment, its just a mechanism for how cross-platform serialisation might be sensibly achieved rather than
> >    a real-world example (its real-world enough for me as my primary need is to share UTF8 encoded strings
> >    stored as byte-arrays between the platforms ;) )
> 
> JSON can serialize single values and has a well defined ASCII encoding
> for unicode values (\uXXXX). http://json.org/

Uh. Ignore ascii. I meant to say "JSON can serialize single values and
has a well defined utf8 byte-array encoding".

> So couldn't adopting JSON (ascii encoded byte-arrays) as a serialization
> format (with it's own flag) provide *both* a portable serialization
> format for structures *and* provide a way to store single utf8 values?

That's the key point.

Tim.

> Tim.
> 
> p.s. For perl, JSON::XS is faster that Storable in many cases:
> http://search.cpan.org/~mlehmann/JSON-XS/XS.pm#SPEED


More information about the memcached mailing list