This is my first hack at doing any system-level programming (mostly a LAMPhp, specifically Drupal, web dev up to this point).
Because of availability of a library with a very specific feature, I am using Python for an upcoming project. I need to run, restart as needed, monitor and respond to the output of multiple Python script processes, controlled ideally via a HTTP API from another master program which keeps a database of processes that need to be running, and some metadata about those processes (parameters, pid, etc). I'm planning on building this master program in PHP as I have far more experience in it, hence the want for a nice HTTP API.
Is there some best practice for this type of system? Some initial research lead me to supervisord (which has XML-RPC built in, apparently), but I thought I'd check the wisdom of the masses who've actually been down this road before moving forward with testing.
I can't say I have been down this road, but I am working to go down this road.  I would look into the multiprocessing libraries for Python.  There are network transparent libraries.  A couple of routes you could take with those:
1. Create a process that controls all of the other processes.  Make this process a server you can control with your PHP.
2. Determine how to get PHP to communicate to these networked Python processes.  They may still need to be launched from a central Python process however.
Best practice for Python process control