libmemcached C client library
brian at tangent.org
Thu Sep 27 11:30:59 UTC 2007
So why implement another C client library? (since that is the first
question I expect some one to ask)
1) The libmemache library I was using for a while for the MySQL
memcached storage engine leaks memory and after toying with it I
decided I didn't want to fix it.
2) The APR one has the drawback that its the APR. I don't need/want
the entire APR and I don't really want to deal with the Apache
License either (great license, I use it myself, but not what I want)
So I wrote one for myself :)
It is BSD and implements the (I believe) full text protocol as
documented, including the multi get bit.
According to Valgrind it does not leak memory (I am sure there are
other bugs though).
As soon as I can get my hands on the binary protocol I will implement
that as well. If I am feeling bored I might write the UDP one (at the
moment I don't see a need for it in what I am doing).
I have also created a few utilities while I was at it:
memcat - Copy the value of a key to standard output
memflush - Flush the contents of your servers.
memrm - Remove a key(s) from the serrver.
memstat - Dump the stats of your servers to standard output
(And some thanks should go to Mark Atwood who worked on some of the
client tools and has been giving me feedback on the API).
What I would love:
1) Feedback on the API (especially on the leaving it up to a user to
free each value coming back from multiget).
2) Patches on bugs.
3) Well... email on bugs would be nice...
I'm very open to supporting the additional protocol bits other
memcached like servers have implemented. The library is more tested
then the tools at this point. Mark has mentioned wanting a benchmark
tool and I will probably write one of those in the next few days.
Brian "Krow" Aker, brian at tangent.org
http://krow.net/ <-- Me
http://tangent.org/ <-- Software
http://exploitseattle.com/ <-- Fun
You can't grep a dead tree.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the memcached