[Twisted-Python] twistctl - start/stop/restart revisited
Moshe Zadka
m at moshez.org
Sat Apr 5 23:44:41 MST 2003
On Sat, 5 Apr 2003, "Clark C. Evans" <cce at clarkevans.com> wrote:
> 1. Moshez objected to the killApp implementation,
> when I get time I'll look at it. But right now
> it works on my platform just wonderfully.
> The beauty of open source projects is that people
> can hack at it till it works for everyone...
No, that's not a beauty.
Let me explain: checking something which "works for me, usually, when
my machine is not heavily loaded" is the worst thing that you can do.
Intermittent failures are *worse* than deterministic failures. Do you
seriously want something that you can't rely on?
It's not that hard to have an algorithm which is correct. Find one,
and code it.
> In particular, Moshez said that he thinks this script
> should *call* the twistd script via OS methods and
> thus the refactor above is not needed. I respectfully
> disagree with his assertion.
Let me explain: the interface to twistd is well defined. It's documented
in the manpage. We are commited to maintaining backwards compatibility with
it. What you're doing with the refactor is forcing parts of the internal
twistd implementation to stay static. This is insane. We should not add
extra interfaces where existing ones will do. If "twistd" is not on your
path, just fix your Twisted installation. I fail to see how catering
for broken installations is in any way a good idea. Also, if you call
twistd via the OS, then on such places where both twistd2.1 and twistd2.2
scripts exist, *your script* only has to be available once, since it can
receive the name of the binary which has to be run. I'm not going to even
start talking about how most of the twistd flexibility is not needed,
since in real daemons which run from init scripts, the tap cannot be
encrypted anyway, since the key would have to be available to the script.
If you write the twistdctl, and it is actually working on more than one
platform, *and* there is a significant advantage in making it directly
Python->Python, then you can start thinking of adding more places where
we have to promise backwards compatibility in order not to break stuff.
Notice that this is an especially sore point for stuff like twistdctl
which is naturally harder to test in unit tests.
--
Moshe Zadka -- http://moshez.org/
Buffy: I don't like you hanging out with someone that... short.
Riley: Yeah, a lot of young people nowadays are experimenting with shortness.
More information about the Twisted-Python
mailing list