binary protocol incr/decr proof-of-concept

Dustin Sallings dustin at spy.net
Mon Jul 30 19:18:16 UTC 2007


On Jul 30, 2007, at 11:27 , Brad Fitzpatrick wrote:

> We're supposed to be adding a binary protocol to the existing  
> semantics
> and not getting side-tracked on tweaking unrelated things.
>
> If we really need some default value for incr/decr, let's do it  
> later.  I
> see no reason to do it now.

	The problem is that incr/decr are specified as both using and  
returning an ascii representation of the numeric value.  If you're  
just changing the protocol, there is no facility for forward  
compatibility.

	There are at least the following options:

1)  Require the binary protocol to continue to use the ascii  
representation.
2)  Use a binary representation and perform the current auto-conversion.
3)  Use a binary representation and type flags so sets can initialize  
correctly.
4)  Have incr and decr maintain their own data.

	#4 seemed the cleanest to me and fit the goals of protocol and  
server efficiency (although at an obvious cost).

-- 
Dustin Sallings




More information about the memcached mailing list