You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <fm...@gmail.com> on 2008/07/04 13:55:14 UTC
Re: [jira] Created: (SLING-550) nohup-like service for long-running
scripts or servlets
Hi,
Isn't this the scheduler and jobs stuff, that is already existing in Sling ?
Regards
Felix
Bertrand Delacretaz (JIRA) schrieb:
> nohup-like service for long-running scripts or servlets
> -------------------------------------------------------
>
> Key: SLING-550
> URL: https://issues.apache.org/jira/browse/SLING-550
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Bertrand Delacretaz
> Priority: Minor
>
>
> In some cases (like the webloader example), long-running processes need to be started, monitored and stopped.
>
> The webloader implements this in a naive way, it might be useful to have a more generic facility for this: a service that would:
>
> 1) Start a script or servlet, probably passing it a fake request object that gives access to parameters and output but is not a real HTTP request
>
> 2) Display a status page where currently running jobs can be monitored, and stopped if desired
>
> 3) Collect the output of such jobs in the repository and give access to it via a simple monitoring interface
>
> The output of long-running jobs could be structured using html conventions (like <div class="status">running step 3 of 12</div>) to create overview displays of all currently running jobs.
>
> This is just an idea for now, I'm not going to work on this right away, but it's probably good to keep in our wishlist.
>
Re: [jira] Created: (SLING-550) nohup-like service for long-running
scripts or servlets
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Carsten Ziegeler schrieb:
> Felix Meschberger wrote:
>> Hi,
>>
>> Isn't this the scheduler and jobs stuff, that is already existing in
>> Sling ?
>>
> Hmm, yes - except that there is atm no possibility to stop a job.
Stopping a job is problematic anyway ....
I think there are multiple options:
Fully cooperativity: Setting a flag on the Job will cause the job to
terminate early.
Partial cooperativity: The Job's thread is interrupted and the
InterruptedException is handled in a cooperative manner.
No cooperativity: The job's thread is stopped. This of course also makes
the thread unusable for any forther job processing. In addtion
Thread.stop() is deprecated (for along time but still implemented ;-) ).
Regards
Felix
Re: [jira] Created: (SLING-550) nohup-like service for long-running
scripts or servlets
Posted by Carsten Ziegeler <cz...@apache.org>.
Felix Meschberger wrote:
> Hi,
>
> Isn't this the scheduler and jobs stuff, that is already existing in
> Sling ?
>
Hmm, yes - except that there is atm no possibility to stop a job.
Carsten
--
Carsten Ziegeler
cziegeler@apache.org