[Twisted-Python] twistctl - start/stop/restart revisited
Clark C. Evans
cce at clarkevans.com
Sun Apr 6 10:37:36 MDT 2003
Howdy Moshe!
On Sun, Apr 06, 2003 at 06:44:41AM -0000, Moshe Zadka 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?
Yes, you convinced me that the implementation sucks. This is
why I'm proposing to check it in to the *sandbox* which has
explicit warnings about broken code. Once it is there it
can be worked on incrementally... perhaps by people other
than me. If it stays private then we will have N people
working on the same thing without a chance of collaboration.
| > 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.
I would hardly call it an extra burden, calling it insane is a
bit over-the-top... in any case, the refactor makes sense even
without users -- runApp is quite large and the code to fetch
the passphrase really belongs more up-stream.
| 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.
I'm not defending twistd, but it does seem to have a wee
bit more functionality than making twisted applications
into daemons. Perhaps you should refactor it by moving
what *you* think twistd should be into its own module
and make it callable from twistd. Something like
twisted.python.daemonize would be clean. No?
Best,
Clark
More information about the Twisted-Python
mailing list