I thought I'd give an update on what I've been working on.  I had given
myself the task of abstracting out all the protocol specific stuff from
memcached/binary.   I had a bit of a family emergency over the weekend
though, so my plans of working on it then were shot.   So instead I've been
working on it during my daily train ride.

At first I thought it would be fairly simple, using a separate event_handler
for each protocol.  But then I discovered the support for UDP which is
riddled throughout the code (just do  a search for IS_UDP).  My goal is to
have everything for each individual protocol in a seperate file, so that it
will be possible to exclude certain protocols from being built at compile
time (for example, if you want a binary-only server without ascii/udp
support).

So now I'm making some quite extensive infrastructure changes, while
minimizing actual code changes where possible.

Its gonna make for a messy patch set though.  Not sure how to handle putting
all this back into the binary branch.   I might see if I can separate all my
changes into different groups of patch-files to make these changes a bit at
a time.

I haven't yet completed the work though.  Given that I can only spare a
little time here and there to work on it, I'd say it will be a few days
before I have anything I can send back for others to try out.

I am also adding a simple benchmarking tool to make sure that I haven't made
things worse.

Thats about it for now.

On Fri, Feb 22, 2008 at 11:16 AM, Dustin Sallings <[EMAIL PROTECTED]> wrote:

>
> On Feb 21, 2008, at 16:56, Clint Webb wrote:
>
> > I do have working code of a very similar protocol used for a
> > different purpose and was curious how easy it would be to integrate
> > it into memcached since Dustin mentioned that the protocol handling
> > was abstracted.
>
>         I may not have sufficiently communicated just how slightly it was
> started.  I did the minimum required to wedge in the protocol I was
> implementing with a goal of not massively disrupting the codebase.
>
> > So when I looked at the memcached code (binary branch) I realized
> > that the protocol abstraction could be improved a bit, so thats what
> > I've been looking at.  I wouldn't say that the performance
> > improvements would be massive, but I do think that it would be
> > something measurable at least.
>
>
>         It certainly can.  My goal was to make it work.  I think it's
> mostly
> solidifying and a branch *from* there for experimenting would be good.
>
>        Of course, we can't do too much without some kind of benchmarking
> tool in place to get a feel for whether we're making things better or
> worse, though.  That can, of course, happen later, but we've been
> guessing a lot in this tree already.
>
> --
> Dustin Sallings
>
>


-- 
"Be excellent to each other"

Reply via email to