pcp
[Top] [All Lists]

Re: pmReconnextContext

To: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Subject: Re: pmReconnextContext
From: fche@xxxxxxxxxx (Frank Ch. Eigler)
Date: Thu, 02 May 2013 13:55:22 -0400
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5181DD7E.5000805@xxxxxxxxxx> (Mark Goodwin's message of "Thu, 02 May 2013 13:29:02 +1000")
References: <5181D9E2.9040204@xxxxxxxxxx> <5181DD7E.5000805@xxxxxxxxxx>
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
mgoodwin wrote:

> [...]  actually, I think I remember now - tools like pmchart and
> pmie use multiple contexts, not necessarily all to the same host. So
> if one of those host contexts bounces, they don't all have to hang
> whilst it reconnects/retries [...]

Good point.  There is no concept of a timeout for inhdividual PCP
operations, so even a successful but slow connection can tie up
pmchart & pmie.  If these more sophisticated clients became
multi-threaded, those issues would become moot (and be replaced by
others).

Alternately, a hypothetical automatic pmReconnectContext effort could
employ a very short timeout, perhaps using libpcp/src/AF.c code.
(Though now that I look at it, onalarm() appears to do lots of
signal-unsafe things, like printing ...).  So O_NONBLOCK connect() &
select awhile would probably the way to go.

- FChE

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