views:

56

answers:

1

Memcached interface is implemented using a textual protocol.

Sometimes it's very useful to be to fetch data stored on your remote server simply by invoking netcat with some shell kung fu, for example: To download the XML result of your nightly data crunching job you might run something like:

echo "get 95ec6c7693ec53771c8a3fb1061562b8" | nc localhost 11211 > console_overview_06_04_2010.xml

The interesting part here is get SOME_UNIQUE_KEY which is part of the memcached protocol.

What other useful usages can you suggest in regard to the ability to interact with memcached using nothing more then command line tools?

Thank you, Maxim.

A: 

If you do a google search for protocol.txt you'll find our entire textual protocol definition as the first hit.

You could create a cheatsheet from there, but in reality, it's a wire protocol more than a commandline.

Dustin
I was aiming more at "best practice" tips that people would share for their daily work with memcache. It's seems that the interest in this topic is low so I'm closing this question with your answer. Thank you.
Maxim Veksler
I think best practice is really just using a client. Clients can do all kinds of smart stuff it's harder to do from a raw protocol connection -- such as do useful stuff with stats (see [damemtop](http://github.com/dormando/damemtop) for example).
Dustin