Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would use a kind of master / slave design. The slave would be your perl / bash script, just doing a job (packaging, compiling, exporting code or so), and feed a log entry.</p> <p>The master would be your php process. So the principle is the following: the master and the slave share a communication channel, and communicate asynchronously from that channel.</p> <p>You could imagine a database like:</p> <pre><code>create table tasks ( id INT primary key, status INT, argument VARCHAR(100)); </code></pre> <p>You php page should switch user choice, and <strong>filter</strong> input:</p> <pre><code>switch ($_GET['action']) { case 'export': $argument = sanitize($_GET['arg']); add_task('export', $argument); break; case '...': // ... } </code></pre> <p>and the add_task function could be something like:</p> <pre><code>function add_task($action, $arg) { return $db-&gt;add('tasks', array($action, NEW_TASK, $arg); } </code></pre> <p>The slaves could be run via a <a href="http://en.wikipedia.org/wiki/Cron" rel="nofollow">cron job</a>, and query the database, feeding the progression of the task.</p> <p>The pro are:</p> <ul> <li>independant systems, ease the evolution.</li> <li>if a client gets disconnected, the job is never lost</li> <li>easier to secure</li> </ul> <p>The cons are:</p> <ul> <li>a little more complicated at the beginning.</li> <li>less reactive, because of the polling time of the slaves running (for instance if they run every 5 minutes)</li> <li>less output than the direct output of the command</li> </ul> <p>Notice that you can then implement xml-rpc like triggers to run the slaves, rather than using a message passing system.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload