Re: Handling of lengthy server operation in php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

on 02/19/2006 02:00 AM Adrian said the following:
> I tried various ideas, using header( ... ) to start other scripts etc, but
> so far nothing worked - things always happen synchronously (start
> processing, wait for it to finish, show result) which is not what a user
> would expect. Also, I would prefer to do everything on the server instead of
> using js for example in the browser.

What you can do is something usually known as job queuing. It consists
of having a queue, which can be a file on the disk or a database table.
To queue a job, you just add a new record to that job table. Then have a
background process handle it ASAP, and update its status as it
progresses. When the job is marked as done, the requester can delete its
record, while the background task proceeds to the next enqueued job.

Here you may read more about this concept of queueing:

http://www.meta-language.net/metabase-faq.html#performance

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux