C API?

Anatoly Vorobey mellon@pobox.com
Fri, 22 Aug 2003 04:46:40 +0300


On Thu, Aug 21, 2003 at 06:27:47PM -0700, Evan Martin wrote:
> I was worrying about this, too... are there cases where you'd want to be
> able to integrate the memcache client reads into a centralized event
> loop?  In that case, we need to somehow (either by returning file
> descriptors or requiring a register_fd callback argument) let the user
> do the select().  Same for put().  Yikes.

Hmm. Not sure. I'd guess we can get off the ground with set/retrieve
operations being atomic for the client, and then see if there's any
demand for doing it the other way.

> And then, should we really use select?  Or is this another job for
> libevent?  :\

Dunno about libevent, but epoll is probably an overkill here (at least 
demanding it is). Of course, we could rely on libevent and let it use
select/poll if it doesn't find epoll. Or we could eliminate the 
dependency and just do select/poll ourselves. What's could the maximum 
number of servers per request, in a large installation that uses 
memcache now? 50-60? I don't think the benefits of epoll kick in yet, 
at such small numbers.

-- 
avva@livejournal.com