pcp
[Top] [All Lists]

Re: PCP Updates: Active Probing for __pmDiscoverServices() / pmfind

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>, Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: PCP Updates: Active Probing for __pmDiscoverServices() / pmfind
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Thu, 22 May 2014 19:44:28 -0400 (EDT)
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <y0mvbsxmsoj.fsf@xxxxxxxx>
References: <5373D0D2.5090902@xxxxxxxxxx> <537CC777.3040900@xxxxxxxxxx> <399575684.12526040.1400750511921.JavaMail.zimbra@xxxxxxxxxx> <537E59F3.7070308@xxxxxxxxxx> <y0mvbsxmsoj.fsf@xxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: 8v2AAdhJu6mHmCJOmT+OhjJY6TYL5Q==
Thread-topic: PCP Updates: Active Probing for __pmDiscoverServices() / pmfind

----- 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

<Prev in Thread] Current Thread [Next in Thread>