Sounds to me like you know your stuff. And that your stuff is indeed not web stuff :-)

Separate the part where you take the input, generate the output, and present it to the end user.

What is the longest that this can take to process?

Limit the input, that is, check it. Test out what happens when you are feed bogus info.

If your program is cpu intensive (likely, with graphics, possibly multiple users) what happens if each run takes 60 seconds, and 4 users keep hitting refresh on their browsers? Will it crash your server?

If the operation is intensive, and could take up to a minute, consider using sessions, and storing something like 'has user queued a call to genereate output yet?' and 'how old is that call to generate output?'

Maybe if the user refreshes, the session should be checked to see if a call no older then x is present from this user.

I would personally separate all this into something that works without any web interface- first. Once you test that out to see that it doesn't grind the server to a halt- you can worry about the interface.

I would use CGI::Application. But this *may* be overkill. If you all you are doing is

Then again maybe it's not overkill. If you do use CGI::Application, make *sure* you look over the plugins, for example, CGI::Session has a CGI::Application::Plugin::Session counterpart which is candy to use.

Maybe you could even email the results to them instead. So your system would have a queue whith entries are identified by email address.

I think you should really see this as two problems- a) what your program does (generate a graph)- b) and balancing load and requests from blowing up everything.


In reply to Re: Building a Dynamic GUI by leocharre
in thread Building a Dynamic GUI by jonficke

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.