Re:YapDi - Yet another python Daemon implementation
by encoderer on Sunday December 04, 2011 @01:30AM
(#3310033)
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.
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.