[collectd] memcached:// support in curl plugin

Florian Forster octo at verplant.org
Fri Feb 27 13:32:46 CET 2009


Good morning,

On Thu, Feb 26, 2009 at 06:29:56PM -0500, Doug MacEachern wrote:
> Similar idea to plugging a struct Curl_handler into libcurl, but since
> we can't do that have own layer to do something like:
> register_url_handler(const char *scheme, int (*callback) (web_page_t
> *wp));

I always thought of cURL as an abstraction layer over (possibly network
based) file access operations. Putting another abstraction layer over
that is, in my opinion, not the way to go. I'd much rather see libcurl
provide a schema registration function in the future and/or (if they
oppose that for some reason), include `memcached' support there. 

Did you talk to the cURL guys already? I didn't find any (recent) post
in the `curl-library' mailing list at least.. If not, I'd be willing to
write and submit patches for both suggestions..

> What do you think, should I just implement memcachec as its own plugin
> and leave curl.c alone?

I've put your changes into a separate plugin, but unfortunately I
couldn't delete as much code as I had hoped, so I'm not 100% satisfied.
I'll send an email with the patch in a minute..

But I've thought of a third option: Using the libmemcached (or the
libmemcache, which is a different library!) you can get statistics *and*
actual payload. Maybe it'd make sense to put both options, getting
general memcache *daemon* statistics and getting data from the daemon to
*parse* statistics, into one plugin. What do you think?

> >   int oconfig_get_struct (const oconfig_item_t *ci,
> >       const oconfig_struct_description_t *desc,
> >       (void *) &ret_struct, sizeof (ret_struct));

> I like the idea.  Wonder if something similar to Apache httpd's struct
> command_rec would do the trick here.  Have you looked at that before?

It's been a while.. I'll have another look and see if we can adopt their
approach. I just recall admiring their ``merge path config'' functions.
Unfortunately, that schema is not that useful for collectd..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090227/eb7e2b3e/attachment.pgp 


More information about the collectd mailing list