binary protocol notes from the facebook hackathon
Dustin Sallings
dustin at spy.net
Wed Jul 11 17:38:54 UTC 2007
On Jul 11, 2007, at 10:29 , Brad Fitzpatrick wrote:
> If you don't know a command, and how to parse said unknown command,
> why do
> you care about finding the key?
In the case I ran into, I was processing a lot of the command in
lower-level code. I could hand the command ID, opaque, key, and
extra data to the higher level protocol handler and let it deal with it.
Currently, I register extra header decoders by command ID and do the
same type of split, but unrecognized commands will have to be handled
slightly differently.
The theoretical case is the wireshark protocol plugin. When quiet
set gets added sometime after the memcached binary protocol plugin,
it'd be easy enough to remember that command n is quiet set, and have
it show you the flags section, key, and data.
Of course, in a command that is unfamiliar to the reader doesn't,
the flags and data would be completely meaningless.
--
Dustin Sallings
More information about the memcached
mailing list