apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <c...@force-elite.com>
Subject Re: libketama/apr
Date Wed, 06 Feb 2008 08:03:26 GMT
Dirk-Willem van Gulik wrote:
> Paul (pquerna),
> Did I see a commit flash past from you working on that a while ago ? 
> Or is my memory way off ?
> As I am about to do some work here* - and am wondering if this should 
> be done properly or as a one off hack. (libketama has some funny exit 
> codes, etc - so it takes a bit of wrapping),

To use libketama, you should just be able to use this callback function 
in apr_memcache trunk, to do server selection:

* Custom Server Select callback function prototype.
* @param baton user selected baton
* @param mc memcache instance, use mc->live_servers to select a node
* @param hash hash of the selected key.
typedef apr_memcache_server_t* (*apr_memcache_server_func)(void *baton,
                                                 apr_memcache_t *mc,
                                                 const apr_uint32_t hash);

If you need any other callbacks added, just let us know and we can look 
into getting them into trunk.  I would like to make apr_memcache 
behaviors more plugable, rather than people having to patch it.....

On libketama, you need to be aware of issues with flapping nodes and 
cache consistency issues... Its definitely something I wouldn't want 
apr_memcache using by default.



View raw message