System_Daemon is a PHP class that allows developers to easily create daemons with simple syntax like:
A Daemon on Linux is like a service on Windows. It runs silently in the background and is not dependent on user interaction. In the background it can perform all kinds of tasks. Receiving mail, restructuring or denormalizing databases, process statistics for your site and save results as flat HTML to relieve resources and keep user interaction snappy, etc.
Daemons are usually written in deeper languages like C (Apache is a daemon, so is Postfix for example), but it can in some occasions be beneficial to write one in PHP.
For instance, if your website requires some heavy processing, you can just make use of existing PHP code & includes, and move this heavy processing from the user interface, to the background.
Some people use crontabs for this. Crontab is fine but it only allows you to run a PHP file every minute or so.
Crontabs are a bit rude for this. Creating a daemon would offer a little more elegance & possibilities.
Current status ¶
The class is currently still under development. There is a working prototype in the Trunk, but it can potentially still be dangerous so please use at own risk.