Using memcached to cache subversion meta-data

John McCaskey johnm at klir.com
Fri Feb 4 10:00:33 PST 2005


If there is an interest I'll throw together a python wrapper around
libmemcache along the same lines as my php client...  Please reply if
you'd like to see this done!

On Thu, 2005-02-03 at 21:27 -0800, christopher at baus.net wrote:
> > It's great to have a Python developer using Memcached... your next
> project could be fixing up the Memcached python client.  :) Or at least
> > sanity-checking the code for us.
> 
> I have to admit Python is a tertiary language for me.  I'm mainly a C++ hack.
> 
> >
> > If I recall, the performance of it is pretty horrid... it does tons of
> 1-byte reads when reading responses from the server?  Evan was always
> concerned about this:
> >
> >     def readline(self):
> >         newlines = 0
> >         buf = ''
> >         while newlines < 2:
> >             char = self.socket.recv(1) # XXX does this buffer or is this
> 
> 
> I'd guess that wouldn't make much of a performance difference because the
> OS will buffer the response packets.  There might be a minimal amount of
> overhead from going in and out of kernel mode so frequently, but I doubt
> it matters.  If it was a single byte write, then I'd finger it for a
> performance problem.
> 
> I am working on another project where I intend to use both the python
> client and the C client.  I will probably make some custom hacks to the
> server as well.  I really need to be able to compare to sets of keys and
> drop keys from the server that aren't in the second set.  There currently
> isn't any way to do this as far as I can see.
> 
> Once I understand the protocol more, I might take a look at improving the
> python client.
> 
> Christopher Baus
> 
> ========
> Implementing an HTTP proxy?
> Consider a fast, secure alternative
> http://www.baus.net/ads/license
> 
> 
-- 
John A. McCaskey
Software Development Engineer
Klir Technologies, Inc.
johnm at klir.com
206.902.2027


More information about the memcached mailing list