[rrd-developers] Re: rrdtool 1.1.x RFC

Matt Zimmerman mdz at csh.rit.edu
Sun Mar 4 04:29:27 MET 2001


On Sat, Mar 03, 2001 at 11:56:14AM +0100, Tobias Oetiker wrote:

> An other question I am thinking about is the interface for passing data to
> the modules ... at the moment this is done with ARGC/ARGV which is ideal for
> command line interfaces. But with perl and other language bindings in the
> picture, it might make sense to allow typed information to be passed directly
> to the modules ... any ideas on this ?

The argc/argv style seems to confuse people who are expecting a more
traditional library API, especially when using the C library directly.  The
programmer is required to build up a list of command-line-style strings, where
multiple typed arguments and/or arrays would be more natural, and would
probably require the programmer to do less conversion from their internal data
types.  For example, an update would more naturally be done as

rrd_update(timestamp, datasources...)
rrd_update(timestamp, array_of_datasources)

or even multiple calls to:

rrd_update(timestamp, datasource, value)

Building up the strings required by the current interface is easy and natural
in Perl, but generates a lot of excess code in C.

-- 
 - mdz

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list