On Jan 29, 2008, at 11:25, Ciaran wrote:
I'm interested in sharing certain key/values, [purely utf8 strings
in my case fortunately] between .Net + Java, but it appears that
very few clients use the same 'flags' as each other :(. So my nice
strings that get saved in .Net (flag value of 3), gets treated as
'compressed' [flag bitwise value of 2] by the Java client (The .Net
client is Enyim, and I've tried both Java clients on the memcached
site so far).
Obviously I can tweak the Enyim client to not use '3' for storing
strings [or anything that triggers the 1^2 bit) so that no other
client treats it as 'compressed', but is there a 'default' type I
could use and handle this all myself (it appears not to byte-array
as far as I can tell ? ) , alternativelyis there some kind of
convergence plan in place to try and allow for cross-platform
support (where sensible clearly!)
It's been discussed, but not a lot of effort has gone into coming up
with storage compatibility.
It's pretty easy in my client to write a transcoder object to meet
your exact requirements (basically assert the value to be a string,
get the UTF-8 bytes from it and set the flags to whatever you want),
but I wouldn't consider that a general long-term solution.
--
Dustin Sallings