[rrd-developers] [PATCH] rrd_open and rrdcached

kevin brintnall kbrint at rufus.net
Wed Oct 22 18:08:42 CEST 2008


On Wed, Oct 22, 2008 at 11:37:25AM +0100, Daniel.Pocock at barclayscapital.com wrote:
> rrdcached makes some calls to access and stat, which don't work for my
> virtual filesystem abstraction.
> 
> This patch:

Daniel,

I am OK with this idea, but there are a few implementation details that
need fixing.

Should the functions really be marked as RRD_DEPRECATED in "rrd.h"?  The
same question applies to other functions you introduced in that section of
the header (i.e. rrd_notify_row).

rrd_daemon.c must #include "rrd_tool.h" instead of "rrd.h"..  Otherwise,
it won't get the rrd_{access,stat} prototypes from the internal-only
section of rrd.h.

In bindings/perl-shared, need to add "-std=c99" to the build args in order
to use "restrict" keyword in the rrd_{access,stat} prototypes...  Or, we
can remove "restrict" from the prototypes (I'm not sure how portable
"restrict" is).

Can you share how you plan to extend rrd_access and rrd_stat for the
striped case?

> I'm not sure whether rrdcached is meant to link with rrd_open.  The
> alternative: update the rrdtool C API to include some higher level
> functions that can be called from rrdcached and other RRD-based apps.
> This may even mean that some of the logic from rrdcached has to be moved
> into such functions.

Currently, rrdcached only needs "rrd_update_r" and the "rrd_*error"
functions.  However, future developments (notably UPDATEV support) may
require rrd_open.

> I'm also coming up against similar issues with Ganglia - gmetad wants to
> know if the RRD files already exist on disk, even though they only exist
> in my virtual back-end.  To deal with that, I'm thinking of adding some
> methods to the RRD API so that applications can do things like browsing
> the directory of RRDs.

We'll have to find a way of doing it without pushing any changes into the
application (i.e. Ganglia) ...  There are zillions of custom RRD
applications out there that expect a file to exist.  We can't expect them
to adapt.

A place-holder file makes sense... possibly empty, or possibly with enough
information to locate it in the striped file.

-- 
 kevin brintnall =~ /kbrint at rufus.net/



More information about the rrd-developers mailing list