[erlang-questions] Memcached client implementation
Fri Sep 21 18:56:04 CEST 2007
This is particular interesting to me, because of the three mailing
lists I'm on, erlang and memcached are two.
On Sep 21, 2007, at 1:15 , David Welton wrote:
> 1) I'm using gen_server so that I can start it up and have a socket
> that remains open with the memcached server. Does that seem like a
> good approach? It's been several years since I've worked with Erlang
> and I'm a bit rusty.
I wrote a java client that looks a lot like I would imagine this
looking. It's got one thread that performs all of the communication,
and what is in effect a message queue to push requests in to it.
Responses work in a similar way (using Futures in java).
I get *really* good performance off of my one connection and one IO
Note that there is a new protocol in development (actually, I've
pretty much stopped developing it since it's as done as I'm able to
get it). I'd expect you'd get much better performance out of the new
protocol than the old if you're planning on using this a lot.
I've written two client implementations and two server
implementations using the new protocol (and one in the old). If
you're interested in the new protocol, my test client and server
would be very handy for you, I'd think. Depends on your goals.
> 2) We would like to open source this code - what might be the best
> place for it? I still have commit access to jungerl (isn't it time to
> switch to subversion, though?), so that's one possibility - anything
The third list is mercurial, so I may be biased in my response. :)
Personally, I think CVS and subversion are both barriers to
contributions in open source projects. If you start writing a
memcached client as part of jungerl, only jungerl contributors are
first-class citizens. Everyone else can get a copy of the source and
make patches against it, but I rarely do that unless there's a really
compelling reason for me because I don't like leaving work not
checked in, and I work on at least two or three machines on any given
The high-level concept of jungerl is good, but I don't think a giant
monolithic package manager that contains both all of the meta
information and source code under the same group even scales that well.
So, in my (obviously biased) opinion, you're better off starting out
in mercurial and stick it up on a web server there for people to play
More information about the erlang-questions