on 1/10/00 12:08 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> Brett suggested that I propose my idea for the scheduler before
> actually committing any work and I agree.
> 
> So here is a first hack -
> 
> In general, the Turbine scheduler should be a "cron-tab" like
> utility that wakes-up ocassionally and performs some pre-defined
> task either locally or on some remote Turbine application.
> 
> Here's kind of an abstract model:
> 
> The scheduler is a singleton class that contains a sorted queue.
> The queue is maintained by a thread that wakes-up ocassionally ( as
> defined by the next JobEntry) and starts the process of executing the
> task.
> 
> Each queue contains 0-many JobEntries.  A JobEntry is a wrapper
> class the contains a Task to run and information about the Task. Information
> about the task should include such things as: when to run the job and is the
> job a one time thing or reoccuring.
> Jobs can be run by a specific date or time.
> 
> Besides scheduling information, a JobEnty also contains the Task to perform.
> A Task is an interface that looks something like this:
> 
> public interface Task{
> public abstract Object execute(JobEntry entry);
> }

Great!!!

> 1. IMO, the scheduler needs to start automatically on Turbine
> start up.  I'm thinking that it should be started in the Turbine.init().  The
> init() could check a property value and determine whether
> you want to run the scheduler or not. (i.e. scheduler.start=false)

+1
 
> 2. Add a small DB table and scheduler UI so that tasks are persistent
> in the event of a crash.  The scheduler UI can allow an authorized user to
> load, unload, or reschedule a task.

+1
 
> 3. Remote scheduling using XML-RPC (as suggested by Brett).
> The scheduled Task could be an XML-RPC client that invokes
> an XML-RPC server aware Action on a remote machine.  Add security
> checks to the Action to prevent any unauthorized stuff.

+1
 
> I hope I'm not getting to carried away on this, but I think this could be an
> important addition.
> 
> Please give me your feedback.

Sounds great. I would just take it out of the "Action" role. I +1 a
"schedule" module for this stuff to live in.

-- 
Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>




------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to