On Nov 20, 2008, at 7:38 PM, Dustin wrote:
On Nov 20, 9:26 am, "Toru Maesaka" <[EMAIL PROTECTED]> wrote:
I'm not sure if we could call it a waste since CAS is a important
feature but sure, it would consume a lot of memory in usecases with
lots and lots of small objects as you mentioned. I guess the ideal
thing is to only consume that 8 bytes when CAS is actually required
(e.g. when we have req_cas_id) but this has the drawback of possibly
complicating the codebase...
This is a tough one ;)
I'm not sure if this is really possible with the binary protocol,
because we create the cas when we store the item and the cas is
returned in the response. We also return cas in every get, so there is
basically no way we can delay the creation of a cas until the user
actually wants it.
Sean was talking about having multiple formats in a union or
something and allowing for both to coexist peacefully. That would
allow for such upgrades. I agree it'd be a bit complicated and would
be at least a slight time/space tradeoff.
This must be a compile-time setting and could be done by extending
some of the macros, so I'm not sure it would be that messy.. (but the
binary protocol would always send a fixed value as cas....) I could
take a look at it tonight if I find any time :S
Trond