[Web-SIG] daemon tools
Jim Fulton
jim at zope.com
Sat Mar 3 17:08:24 CET 2007
For some time, Zope has used a daemon-management tool we wrote called
zdaemon:
http://www.python.org/pypi/zdaemon
Until late last year, I found this tool a bit difficult to use
because it was essentially undocumented. I was forced to learn
enough to mostly document it and have gained a new appreciation of
it. (I haven't documented its interactive shell mode, which I don't
use. Maybe someone will document it or maybe I'll just rip it out.)
I considered making some enhancements to it and decided to ask if
some folks knew about alternative tools we might use instead. See
the discussion at:
http://mail.zope.org/pipermail/zope3-dev/2006-December/021353.html
Ironically, this sort of tool isn't Python specific at all, and the
discussion highlighted some non-Python tools, notably daeomontools
and runit, neither of which seemed as appealing as zdaemon for
various reasons. This discussion also noted a Python-based tool
named suoervisor2:
http://www.plope.com/software/supervisor2/
Which seems to be derived from zdaemon and has some interesting
features. I think that both zdaemon and supervisor3 do a better job
of process management than daemontools or runit.
At the recent open-space discussion, another Python-based tool was
mentioned whos name I don't remember.
I ended up deciding to use zdaemon for our projects because it met
our needs very well. I added a couple of enhancements:
- The ability to set environment variables. This is really important
to us as it allows us to set LD_LIBRARY_PATH. This wants to be done
in a supervisor process. A Python program can't set LD_LIBRARY_PATH
for itself because it is too late for it to be used by the library
loaded.
- I finished the transcript log, making it rotatable. The zdaemon
transcript log consumes the standard error and output of the program
zdaemon manages, providing basic logging for applications that have
lacking or lame logging support. (zdaemon has allowed us to make the
spread daemon far more manageable.)
Anyway, I share this for your consideration. There are probably
better tools out there than zdaemon and supervisor2, but I'm not
aware of them. :) I'm curious what other people have found or use.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Web-SIG
mailing list