Intermediate Page w/ CGI Script

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Intermediate Page w/ CGI Script

    I'm working on a CGI application using Perl. My client would like the
    user to get some sort of "processing request" page immediately upon
    clicking "Submit", because right now, he occasionally sees a delay
    between clicking "Submit" and getting the results page. Is there a
    good way to do this with CGI?

    The options I've been able to think of all have serious problems.
    Giving the user an immediate "thank you" page then processing the data
    behind the scenes (as a seperate thread? as a scheduled task?) sucks
    because the page the user gets is dependant upon the information
    passed in. (Certain data gets a "sorry, not interested" page.)

    I thought of making a CGI script that makes a quick-n-dirty "Thank
    you!" page that has all the data submitted by the user in hidden form
    elements which then submits itself, but that depends on the user
    having Javascript enabled, AND would require at least a moderately
    sophisticated script to power it, since the data set coming back from
    the user will be dynamic based on a few configurable items.

    And, of course, both options above require me to fire off a CGI script
    in the first place. Since I suspect that the performance issues
    driving my client's request are caused by starting CGI scripts when
    the server is under load, I suspect we'd go from this scenario:

    -Press Submit
    -Wait wait wait
    -See results page

    To this one:

    -Press Submit
    -Wait wait wait
    -See "please wait" page
    -Wait wait wait
    -See results page

    Is there a solution here I'm overlooking? (Short of using mod_perl or
    fastcgi to improve performance, which aren't available to me. Or
    switching to PHP; it's too late in the game for me to re-write
    everything from the ground up.)

    Or am I going to have to stick to my guns and insist that it's just a
    part of the whole CGI experience, and that the client needs to live
    with it?

    (And for those of you who like a little garnish of irony, I've been
    unable to replicate the performance problems my client is complaining
    about in the first place.)

    Thanks for your help,
    -- Pete Butler
    Pete Butler Guest

  2. Similar Questions and Discussions

    1. Problem generating intermediate ActionScript
      Does anyone know why '-keep-generated-actionscript' isn't a recognized option for my mxmlc.exe? I'm using Flex 1.5 on Windows XP Media Edition. I...
    2. Net::SSLeay: How to transmit an intermediate CA-Certificate?
      Hello usenet, I have a little server program written in perl under linux. It is invoked via the inetd super-daemon. I basically use the code from...
    3. include_path issues, newbie trying to become intermediate
      I've built several basic dB driven things in php, but I'm getting frustrated lately when I try to use more complicated apps downloaded from sf.net ...
    4. Action script problem, (level : intermediate or so)
      // I can't seem to pass the right instance to the function Move Make_bg() //initiate function Move(obj){ obj._x =obj._x +200 } function...
    5. Passing value from one script on one page to another script on another page.
      Hi All, I have what is an easy question for you all, but I have not idea (this is in vbscript). I have this script below that works great. It...
  3. #2

    Default Re: Intermediate Page w/ CGI Script

    [email]pmbutler@attbi.com[/email] (Pete Butler) wrote in
    news:9b766f0.0309180706.3bf607b@posting.google.com :
    > I'm working on a CGI application using Perl. My client would like the
    > user to get some sort of "processing request" page immediately upon
    > clicking "Submit", because right now, he occasionally sees a delay
    > between clicking "Submit" and getting the results page. Is there a
    > good way to do this with CGI?
    [url]http://www.stonehenge.com/merlyn/WebTechniques/col20.html[/url]
    > Or am I going to have to stick to my guns and insist that it's just a
    > part of the whole CGI experience, and that the client needs to live
    > with it?
    Personally, I would then never do business with you again.
    > (And for those of you who like a little garnish of irony, I've been
    > unable to replicate the performance problems my client is complaining
    > about in the first place.)
    That does not mean anything.

    Sinan.

    --
    A. Sinan Unur
    [email]asu1@c-o-r-n-e-l-l.edu[/email]
    Remove dashes for address
    Spam bait: mailto:uce@ftc.gov
    A. Sinan Unur Guest

  4. #3

    Default Re: Intermediate Page w/ CGI Script

    Pete Butler <pmbutler@attbi.com> wrote:
    > I'm working on a CGI application using Perl. My client would like the
    > user to get some sort of "processing request" page immediately upon
    > clicking "Submit", because right now, he occasionally sees a delay
    > between clicking "Submit" and getting the results page. Is there a
    > good way to do this with CGI?
    If your web server supports it, use a non-parsed headers script
    [url]http://www.linux.psu.ru/pub/texts/ebooks/OreillyCD/web/cgi/ch03_08.htm[/url]
    Then, html will be displayed as the server serves it.

    --
    Glenn Jackman
    NCF Sysadmin
    [email]glennj@ncf.ca[/email]
    Glenn Jackman Guest

  5. #4

    Default Re: Intermediate Page w/ CGI Script

    In article <Xns93FA77767D91Basu1cornelledu@132.236.56.8>, A. Sinan Unur
    <asu1@c-o-r-n-e-l-l.edu> wrote:
    > [email]pmbutler@attbi.com[/email] (Pete Butler) wrote in
    > news:9b766f0.0309180706.3bf607b@posting.google.com :
    >
    > > I'm working on a CGI application using Perl. My client would like the
    > > user to get some sort of "processing request" page immediately upon
    > > clicking "Submit", because right now, he occasionally sees a delay
    > > between clicking "Submit" and getting the results page. Is there a
    > > good way to do this with CGI?
    >
    > [url]http://www.stonehenge.com/merlyn/WebTechniques/col20.html[/url]
    Randal provided another version in the Aug 2002 issue of Linux
    Magazine, available here:

    [url]http://www.stonehenge.com/merlyn/LinuxMag/col39.html[/url]
    Jim Gibson Guest

  6. #5

    Default Re: Intermediate Page w/ CGI Script

    Jim Gibson <jgibson@mail.arc.nasa.gov> wrote in
    news:180920031129560958%jgibson@mail.arc.nasa.gov:
    > In article <Xns93FA77767D91Basu1cornelledu@132.236.56.8>, A. Sinan
    > Unur <asu1@c-o-r-n-e-l-l.edu> wrote:
    >
    >> [email]pmbutler@attbi.com[/email] (Pete Butler) wrote in
    >> news:9b766f0.0309180706.3bf607b@posting.google.com :
    >>
    >> > I'm working on a CGI application using Perl. My client would like
    >> > the user to get some sort of "processing request" page immediately
    >> > upon clicking "Submit", because right now, he occasionally sees a
    >> > delay between clicking "Submit" and getting the results page. Is
    >> > there a good way to do this with CGI?
    >>
    >> [url]http://www.stonehenge.com/merlyn/WebTechniques/col20.html[/url]
    >
    > Randal provided another version in the Aug 2002 issue of Linux
    > Magazine, available here:
    >
    > [url]http://www.stonehenge.com/merlyn/LinuxMag/col39.html[/url]
    I had the other one bookmarked. Thank you for pointing that out.

    Sinan.

    --
    A. Sinan Unur
    [email]asu1@c-o-r-n-e-l-l.edu[/email]
    Remove dashes for address
    Spam bait: mailto:uce@ftc.gov
    A. Sinan Unur Guest

  7. #6

    Default Re: Intermediate Page w/ CGI Script

    On Thu, 18 Sep 2003, Glenn Jackman wrote:
    > If your web server supports it, use a non-parsed headers script
    If this was a web servers configuration or CGI group, I would tell you
    that Apache doesn't demand the complication of using NPH scripts in
    order to support incremental output.

    But as it isn't, I suppose I'd better not :-}

    --

    (apologies if yesterday's attempt to post this does finally show up)
    Alan J. Flavell Guest

  8. #7

    Default Re: Intermediate Page w/ CGI Script

    On Thu, 18 Sep 2003, Pete Butler wrote:
    > I'm working on a CGI application using Perl. My client would like the
    > user to get some sort of "processing request" page immediately upon
    > clicking "Submit", because right now, he occasionally sees a delay
    > between clicking "Submit" and getting the results page. Is there a
    > good way to do this with CGI?
    No different in Perl than in any other CGI programming language, and
    a requirement typically addressed in CGI FAQs and discussed on CGI
    programming group(s). What did you think of the previously-discussed
    solutions that you found while researching the topic prior to deciding
    to post a question? [hint!]
    > And, of course, both options above require me to fire off a CGI script
    > in the first place. Since I suspect that the performance issues
    > driving my client's request are caused by starting CGI scripts when
    > the server is under load,
    You haven't told us whether the wait is typically 5 seconds or 5
    minutes or what. Different solutions might be applicable.
    > I suspect we'd go from this scenario:
    >
    > -Press Submit
    > -Wait wait wait
    > -See results page
    >
    > To this one:
    >
    > -Press Submit
    > -Wait wait wait
    > -See "please wait" page
    > -Wait wait wait
    > -See results page
    Yup, that's very perceptive. The startup overhead might be a
    significant part of the whole processing (you haven't told us enough
    to be sure).
    > Is there a solution here I'm overlooking?
    Researching FAQs and previous discussions? :-{
    > (Short of using mod_perl or fastcgi to improve performance, which
    > aren't available to me. Or switching to PHP; it's too late in the
    > game for me to re-write everything from the ground up.)
    Sometimes, when you rule out all the applicable technical solutions,
    you are left with the original problem - as we can see.

    <announcement mode=public-service>
    In case you hadn't noticed, CGI questions aren't generally welcomed
    here (c.l.p.misc) unless they have some specifically Perl content -
    and that's irrespective of whether you're programming them _in_ Perl.
    perlfaq9 has further pointers.
    </>

    cheers
    Alan J. Flavell Guest

  9. #8

    Default Re: Intermediate Page w/ CGI Script

    "Alan J. Flavell" <flavell@ph.gla.ac.uk> wrote in message news:>
    > <announcement mode=public-service>
    > In case you hadn't noticed, CGI questions aren't generally welcomed
    > here (c.l.p.misc) unless they have some specifically Perl content -
    > and that's irrespective of whether you're programming them _in_ Perl.
    > perlfaq9 has further pointers.
    > </>
    Sorry about that. It occurred to me that my question was probably
    only tangentially Perl-related, but that moment of realization came
    about an hour or two after I'd posted . . .

    If I annoyed anybody else with the question, please accept my
    apologies. I know better now; it won't happen again.

    -- Pete Butler
    Pete Butler Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139