On 1/14/11 6:01 AM, Andrea Messina wrote:
Since PHP has not thread support, how does Status.Net handle background tasks?? Does it create a sort of job-queue which is in turn processes by some daemon??
Yes; this page on the wiki describes the background queue daemon model, with emphasis on the changes we made in the 0.8 -> 0.9 transition: http://status.net/wiki/Daemon_redesign
On a default install the queues are initially disabled, so the background queue items get executed immediately instead of being stored for later.
With queues enabled, items are stored either in the queue_item table in the database (always works, but is inefficient to poll) or a separate queuing server such as ActiveMQ using the 'stomp' connection protocol (can handle many more sites and immediate notification of events, but requires a separate service, usually Java-based). The queue items get read in and executed by queuedaemon.php running in the background on one or more computers (which themselves can spawn child processes to use multiple CPUs).
You can create new queue item handlers by extending the QueueHandler class and registering them with the QueueManager; see plugins like OStatus for examples.
-- brion _______________________________________________ StatusNet-dev mailing list StatusNet-dev@lists.status.net http://lists.status.net/mailman/listinfo/statusnet-dev