Hackathon / Multidimensional keys / Wildcard deletes

Steven Grimm sgrimm at facebook.com
Mon Jul 9 12:28:16 UTC 2007


Jan Miczaika wrote:
> Regarding the protocol: implementing tags as additional tokens would  
> break the existing protocol and thus involves protocol versioning.

I don't think that's true. You could support it like

set <key> <flags> <exptime> <bytes>[ <num_tags> <tag> ...]\r\ndata\r\n

without breaking any existing clients, since they send \r\n after the 
byte count.

I might be more inclined, in the interest of extensibility (and assuming 
we don't ditch the current protocol completely anyway) to do something like

set foobar 0 0 1020 tag=blah tag=fnord tag=blurfl

so you could easily add other metadata in the future. Of course, that's 
even slower to parse, but given the ratio of "get" to "set" requests, 
I'm not nearly as worried about introducing parsing slowdowns on the 
"set" side as I am on the "get" side.

But I'd still rather have this built into a fast, extensible binary 
protocol.

-Steve



More information about the memcached mailing list