Recommended way to manage persistent PHP script processes?

Posted by BigglesZX on Stack Overflow See other posts from Stack Overflow or by BigglesZX
Published on 2010-04-09T09:15:32Z Indexed on 2010/04/09 9:23 UTC
Read the original article Hit count: 273

Filed under:
|
|

First off - hello, this is my first Stack Overflow question so I'll try my best to communicate properly.

The title of my question may be a bit ambiguous so let me expand upon it immediately:

I'm planning a project which involves taking data inputs from several "streaming" APIs, Twitter being one example. I've got a basic script coded up in PHP which runs indefinitely from the command line, taking input from the Twitter streaming API and doing very basic things with it.

My eventual objective is to have several such processes running (perhaps daemonized using the System Daemon PEAR class), and I would like to be able to manage them from some governing process (also a PHP script). By manage I mean basic operations such as stop/start and (most crucially) automatically restarting a process that crashes.

I would appreciate any pointers on how best to approach this process management angle. Again, apologies if this question is too expansive - tips on more tightly focused lines of enquiry would be appreciated if necessary. Thanks for reading and I look forward to your answers.

© Stack Overflow or respective owner

Related posts about php

Related posts about process