You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Quartz: What is it?

Quartz is a neat embeddable schedular that we can use to trigger events.

Why do we need it?

ApacheDS needs to schedule certain jobs for execution periodically. Mitosis needs it to purge the replication log and to delete old tomestoned entries. Furthermore mitosis needs a schedular to manage sophisticated replication schedules for replication groups.

Besides these needs, administrators will want to schedule certain tasks within the server as well. For example the server can be backed up using a trigger to offline then backup the server.

Quartz Integration

A single Quartz Scheduler would be started on ApacheDS core system startup with some configurable number of threads. This way the scheduler based capabilities are available even when networking is not enabled. Once started the schedular would need to be shutdown on system shutdown.

Access to the Schedular for the DirectoryService can be made through the DirectoryServiceConfiguration. All interceptor would have access to the Scheduler. A custom Quartz JobStore or a Quartz Plugin can be implemented to store jobs on disk as LDAP entries.

Scheduler Schema

With LDAP entries for storing jobs and triggers we're going to need a custom schema for scheduling information. The rest of this section defines the attributes and objectClasses that will be needed.

Adding New Job Entries to Scheduler

There are 3 challenges we face with LDAP based jobs and triggers:

  1. how to initially load all LDAP jobs into the schedular
  2. how to load and unload jobs as new ones are added and old ones are deleted
  3. how to respond to changes in old jobs that have already been loaded

A custom interceptor can be used to detect writes involving trigger/job entries. However this is perhaps overkill. We do not need to do anything before these write operations. All actions to load and unload jobs from the Schedular can occur after the write has occured. In this case, the Scheduler can depend on the event service for notifications.

Schedular Configuration

The Schedular needs to take various parameters which control it's behavoir. These parameters should be added to a configuration entry for the schedular in the ou=system area. Changes to this entry should automatically reconfigure the Scheduler.

Schedular Status

The currently running jobs should also be displayed under the configuration entry for the scheduler within the ou=system area of the server.

  • No labels