Well working on the assumption that you have some kind of database backing your PHP front-end and pipeline, you don't specifically need something compatible with PHP, but rather something that could interface with your database.
Without having any further details on what you've set up/tried, etc. I can only offer an overview of the workflow I would use in this situation.
- Front-end script is submitted and pushes the request into a processing queue.
- User is shown a "processing, please wait" type page. This page makes a long-polling AJAX request or a Websocket connection to the front-end site to a script which polls the database for updates on the pipeline processing.
- The pipeline scripts chain off each other and push into the database the details of their completion which are read off by the Websocket/long-polling front-end script and returned to the user via Javascript to display on the page.
Using the database as a go-between would be the easiest and most flexible approach. You could also use other languages if you're more comfortable with them so long as they're compatible with your database used on the PHP/pipeline side.
EDIT
While I don't have any links to a tutorial on exactly what you want to do, there are some basics behind it that you can use to piece together your solution:
I would start by getting your pipeline (processing) script to run in the background at interval using cron. Alternatively you could daemonize that pipeline using something like this PHP-Daemon framework so that it runs in the background. Perhaps having a cron task to check if it's running and restart it if needed.
From there you can build a table in your database that contains status updates on the processing tasks at hand and build a PHP script that checks the status of a given task and outputs JSON data about it. This JSON data could easily be read using AJAX requests, the simplest of which would probably be jQuery's .ajax() method. This could be called at interval on the client side "status" page using a setTimeout
call at the end of each "loop" to poll for status changes every X seconds. This would be the easiest implementation of what you're after, although not the best performing or optimal way to do it.
So the general workflow here would change to this:
- Front-end script is submitted and pushes the request into processing queue with status set to pending.
- User is shown the processing page which pings
status.php?task=12345
every X seconds.
- Back-end daemon/cron script picks up the request and begins processing, pushing status updates into the database at interval.
-
status.php
script begins to return different status information in the JSON code and it is displayed to the user.