mecached - text protocol?

Brad Fitzpatrick
Thu, 15 Jul 2004 09:17:28 -0700 (PDT)


A binary protocol would be a nice addition.  In particular, the whitespace
problem in keys bugs me as well.  I want that fixed.

And while we're happy with the current performance, I'm sure it could

Let's discuss both the format of the binary protocol and its
implementation on this list.  It should be very easy to add.

- Brad

On Thu, 15 Jul 2004, Michal Suszycki wrote:

> Hello Brad,
> I'm trying to use memcached and I really can't understand why you used
> text procotol in such "high performance" software.
> process_command() function is horrorible, all these "if(strncmp...)" takes
> some CPU and these are unnecessary.
> Putting some limits (no white characters) on keys is IMHO unacceptable.
> Binary protocol would be much more easier, faster and elegant.
> No need to look at some 'control character', no need to look inside key
> to process command.
> Memcached would be as fast as possible - now it isn't.
> Your program works at low level; just a simple idea to store something
> in memory, and text protocol IMO doesn't fit. Key length limitation in
> obvious but not white characters etc.
> Key should be set of _any_ bytes.
> Having ability to using telnet and talk to the daemon isn't not enough to
> degrade it's performance and putting some garbage into the code.
> Anyway, thanks for great idea and nice software. Unfortunately if I'm
> going use it in my company probably I'll have to rewrite all protocol
> stuff. Also some 'statistics module'. Knowing ie. 'top 100 keys with
> highest number of request" would be very valuable.
> Sincerely,
> Michal