----- Original Message -----
>
> brolley wrote:
>
> > [...] As part of this, I'm seeing some duplicate code in various
> > parts of PCP for extracting port numbers from environment
> > variables. I'm going to take a shot at consolidating this into a new
> > libpcp API.
Go right ahead Dave - I have something similarly small pending, FWIW,
and its the status quo for sharing code until a workable alternative
exists (if ever).
> For what it's worth, I am a little uneasy at the sheer number of
> general utility functions that have collected in the PCP API (in the
> forms of exported symbols in the .so's) that are unrelated to the core
> pcp mission of documented or even exampled PMAPI.
That mission statement is ... where? This is all very subjective of
course. When I suggested things like discovery live off in a separate
library noone was interested - *shrug*. I expect the status quo will
prevail because...
> Perhaps we should take a closer look at the idea in [1], wherein we'd
> gradually build up libpcputil .a (not .so) type utility libraries for
> reuse by in-tree tools, but specifically not documented/available for
> use by out-of-tree PMAPI programs. We could throw the impl.h
> etc. kitchen sink in there, and not worry about ABI or API stability.
I think this lands in the "good idea in theory, unworkable in practice"
category. But, try it out & see how it goes - I'll assert up-front that
its impossible to remove *all* double-underscore symbols from the .so -
what will end up happening is the new .a will become a .so ... and then
there's just no point. Heh, well, we'd have two problems then. :)
If/when the time comes, the more practical approach will be to give up
on our current, noble (and so far successful AFAIK) attempts to keep the
double-underscore-prefixed routines API/ABI compatible. I think most
real-world users of libpcp would accept that the double-underscore means
"internal, do not rely on this" already. Should cases arise (I can't
think of any) where an internal interface is needed by non-server, non-
log-reader/writer (pmlog*, etc), non-internal-only tools, then it should
be promoted to pmapi.h or pmda.h and a pm-prefixed variant added.
cheers.
--
Nathan
|