Ted,
Your reply attributes claims to me that I did not make, and makes
personal assumptions about my competence, experience, and equipment that
you have no basis for making. I found that tone offensive. Please
address the technical argument without speculating about who I am or
what I understand.
The distinction at the centre of this discussion is between a successful
reading that returns an unchanged value and a failed reading that leaves
an older value in the cache. Those are not equivalent. A battery voltage
that remains unchanged for fifteen minutes may be perfectly valid if
communication is working and the device continues to report it. The same
number retained after communication has failed is not confirmation of
the present state.
At no point did I ask to poll a UPS every microsecond, demand
instantaneous sensor responses, or disregard the device's processing
limits. My previous message explicitly acknowledged differences between
devices, protocols, and update schedules. Explaining battery discharge
curves, thermal inertia, or sensor lag does not answer the question I
raised: how should software represent information whose validity it can
no longer confirm?
In the NHS driver I developed, I handle data reception dynamically,
based on the interval at which the microcontroller sends information. I
do not attempt to read updates faster than it can provide them.
Respecting the hardware's communication behaviour is a basic design
requirement, not something I am disputing.
I agree that excessive polling can overload a device and that software
must tolerate transient failures gracefully. However, whether a missed
response results from overload, device scheduling, or a disconnected
cable, that response has not supplied a fresh reading. Its cause matters
for recovery and diagnosis; it does not make the previous value newly
confirmed. Suitable timeouts and validity thresholds should reflect the
hardware, rather than treating every delayed response as a catastrophic
failure.
Likewise, applications should handle unavailable data without crashing.
That is an argument for explicit error handling and a clear validity
contract, not for making an old value indistinguishable from a current
reading. Keeping the last known value can be useful. Presenting it with
its age and validity is different from silently treating it as current.
The example of a slowly changing battery temperature also does not
resolve the operational risk of an old "online" status persisting after
mains power has failed and communication has been lost. Different
variables have different tolerances. I am not asking for perfect
knowledge of the physical world; I am asking for the most accurate
information the equipment can provide, including an honest indication
when its current state is unknown.
Your assumptions about a $50 CyberPower UPS, and your contrast between
office programmers and people who work on real equipment, are misplaced.
I have worked with Internet service providers for more than twenty
years. I climb towers over sixty metres high and maintain my own
equipment. I am not describing a purely theoretical requirement from
behind a desk. More importantly, nobody should have to provide a
professional biography to have a technical argument addressed
respectfully. Neither of us is entitled to talk down to the other.
What a consumer application hides behind a green icon does not establish
what is appropriate for a critical remote installation. Nor does saying
"this is how real software is written" establish that a particular
design is correct. Different operational requirements deserve
configurable policies, not assumptions about what all users should accept.
That is why I proposed an explicit option, with behaviour appropriate to
each driver, rather than imposing my requirements on everyone. If other
users want to retain stale values, they should be able to do so, with
their status made clear. My environment requires that stale values not
be relied upon as current telemetry.
When the NHS driver I needed did not exist, I developed it. I am willing
to implement and test improvements, and I welcome concrete technical
criticism and contributions. You are equally welcome to propose or
implement an alternative. Let us compare the actual behaviour and allow
users to choose what fits their needs. Neither your preferences nor mine
should be treated as universally superior.
I am happy to continue the technical discussion. Personal caricatures of
my experience or competence have no place in it.
Best regards,
Lucas Willian Bocchi
_______________________________________________
Nut-upsdev mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev