logo       

Re: Re: Long running modes - how to display "please wait"?: msg#00070

Subject: Re: Re: Long running modes - how to display "please wait"?
On 5/29/06, James.Q.L <shijialeee@xxxxxxxxx> wrote:
--- Mark Stosberg <mark@xxxxxxxxxxxxxxx> wrote:
> One pattern to address this was proposed by Randal Schwartz in 1997:
> http://www.stonehenge.com/merlyn/WebTechniques/col20.html
>
> Simplified:
>
> Fork the long running process into the background. This process
> can report its status to a file as it goes.
>
> The page that the user sees can refresh it periodically, checking the status
> via the file and reporting back to the user.
>
> I've used this kind of pattern successfully myself.
>

haven't used mod_perl much. i am curious if it works well under mod_perl ?

Although forking mod_perl works fine, you are generally discouraged
from forking a mod_perl process, since you are forking a very large
process (the entire apache child process with mod_perl can be quite
large)).  What I usually do in that case is setup a job queue (on the
file system or in a database).  The web process writes some
information about a new job into the queue, and then there is a
separate daemon process (or cronjob) that checks intermittantly for
new work in the job queue, and runs the jobs.

You effectively get the same results, without having to fork your web
app.  You only incure a slight delay for processing to start until the
daemon process checks for new work.  Your result page can refresh for
updates just like in the forking process.

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe