[Dancer-users] Web-front end for long-running processes
Oliver Gorwits
oliver at cpan.org
Fri Sep 21 11:29:08 CEST 2012
On 2012-09-20 16:46, Assaf Gordon wrote:
> I'm planning a web site (w/ Dancer, of course :) ) that will execute
> shell scripts (to compute some results) and eventually return the
> results to the user.
>
> The web-side is simple enough, but the shell scripts might take
> anywhere between 10 seconds to 10 minutes to execute.
>
> Is there a recommended way to manage external jobs for this type of
> scenario ?
Just another idea to add to the other more concrete suggestions...
If you're happy with javascript being involved, there's a browser
notification system similar to Growl, you could try, called jsGrowl.
I've seen it used in the Cobbler web UI where you start a job, then
later on the notification pops up in the corner of the browser, with a
link to an 'events log' page. This is independent of the
queue/job-control. It simply makes a background AJAX request to the
server every two seconds asking for new 'events', and pops up if there
is one.
https://github.com/cobbler/cobbler/blob/master/web/content/cobbler.js
https://github.com/cobbler/cobbler/tree/master/web/content
regards,
oliver.
More information about the Dancer-users
mailing list