protocol auto-discovery
Dustin Sallings
dustin at spy.net
Sat Mar 1 04:33:02 UTC 2008
It's been pointed out to me that some people would like to read the
diffs. I found a trac install at danga that might help:
This is the (most) relevant change:
http://code.sixapart.com/trac/memcached/changeset/732
Specifically, setup_bin_protocol and setup_ascii_protocol feel a
little fragile as both need to reuse the byte that was read to detect
stuff.
On Feb 29, 2008, at 18:51, Dustin Sallings wrote:
>
> I just committed the protocol autodiscovery stuff into the binary
> tree. The -B option is gone, so just connect to the thing and say
> what you've got to say.
>
> I considered having it negotiate per-command. If someone else
> really wants to be able to send multiple commands in different
> protocols on the same connection, it's possible, but pipelining will
> make you a bit unhappy.
>
> The negotiation isn't free, and is slightly ugly (I read 1 byte and
> then shove it into the appropriate protocol-specific location). The
> nread and command read buffer handling is a bit too different at the
> moment to do anything much better. I figured it doesn't matter too
> much at the moment.
>
> Note that it's theoretically possible to pin the server to one
> protocol or the other and avoid negotiation.
>
> I tested this by running my java client test through it. That test
> both protocols over ipv4 and ipv6 with lots of pipelining and other
> such nonsense. You would be a fool to not deploy this to production
> immediately.
>
> --
> Dustin Sallings
>
>
>
>
--
Dustin Sallings
More information about the memcached
mailing list