[UPHPU] Question: Has anyone used forks before in a web app?

David Boucha boucha at gmail.com
Thu Jun 2 10:28:45 MDT 2005


Good morning everyone,

I have to do a lot of archiving of data and statistic gathering in an
app I'm working on. This data needs to be updated in near real time
and there are times I'd like to fork another process to take care of
this database number crunching so the user doesn't have to wait for it
to finish. I need to add a bunch of calculations, and I know it's
going to make certain pages unbearably slow if the user has to wait
for the number crunching.

Has anyone used forking in a web app before? The php manual talks
about pcntl_fork(), but in the notes it seems that you have to use it
with php as a cgi. Is there another route I could take with this? A
cron job running an update script isn't going to do it.

I'd really appreciate any ideas.

David Boucha




More information about the UPHPU mailing list