Settings

Theme

YapDi - Yet another python Daemon implementation

github.com

23 points by kasunh 14 years ago · 5 comments

Reader

encoderer 14 years ago

Having written a specialized daemon library for PHP, my take is that this seems clean, but unless you need special functionality, I really prefer a while(true) and supervisord.

In my case (https://github.com/shaneharter/PHP-Daemon) a project needed a way to run code on a timer every second. For more basic cases supervisord or similar is the way I'd go.

And no, I wouldn't suggest that anybody write daemons in PHP. It's one of those things that was the best of several bad options. Python is a bit better, but if I had my choice it would be in a language that had real threading.

jemfinch 14 years ago

Daemonization is really something that ought to be done outside the process being daemonized, a la supervisord or (if you prefer Python) something like my own project, finitd[0]. Unless you have something you must do as root before dropping privileges, leave daemonization to a separate, purpose-built program like these. It's the UNIX way.

[0] https://github.com/jemfinch/finitd

  • janzer 14 years ago

    I don't really understand how it would matter to a user, but you do know supervisord is written in python as well right?

    • jemfinch 14 years ago

      Ah, no. I was actually thinking of DJB's daemontools, but had supervisord on the mind because it was mentioned elsewhere in this thread.

lucian1900 14 years ago

Interesting, potentially useful.

It seems a little sad to me that Twisted is so unappreciated; it solved many current problems a long time ago, including very good deamonizing.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection