Change HarvestJobManager to submit jobs based on Harvester ready events

Description

New strategy

We have decided to abandon the current attempt to maintain a Harvester state in the HarvestJobManager, which is very difficult to achieve in a asynchronous system. Instead we are going to try a more event based approach, which should be simpler and more robust. The job dispatching will be as follows:

1. All Harvesters sends a 'Ready for Job' message every 'JOB_STATUS_MESSAGE_SEND_INTERVAL' if it is ready to process a job. The Harvester will not sending any messages if is is running a harvest.
2. Each time the HarvestJobManager receives a 'Ready for Job' message it will check the job database for jobs ready to be run. If a ready job is found it is dispatched.

This means that:

  • We don't have to have a JobMessage Scheduler running in the HarvestDispatcher.

  • We don't have to have to try to maintain a Harvester state in the HarvestDispatcher.

  • Harvesters don't need to send 'Not readys messages

  • Harvester shutdowns don't need to be handled.

Speciel cases are:

  • Shutdown of a harvester: If a Harvester stops it will stop sending 'Ready for jobs' messages, and will therefore not cause new jobs to be dispatched.

  • The HarvestJobManager is restarted: The HarvestJobManager will inside of a 'JOB_STATUS_MESSAGE_SEND_INTERVAL' receive 'Ready for job' messages from all ready harvester, on will therefore quickly have send jobs to idle harvesters.

  • The HarvesterJobDistapacher is slow to send a new Job, which causes the Harvester to send 2 'Ready for job' messages before a Job is received. This might cause jobs to slowly aggregate on the Job queue, so we need a mechanism so Harvesters check the job queue for any outstanding jobs before.
    So we should introduce a extra feature:

3. When a Harvester becomes ready it should wait 'TIME_TO_LISTEN_FOR_NEW_JOB_BEFORE_SENDING_READY_MESSAGE' before .....

Checklist

Activity

Show:

SrNovember 18, 2011 at 4:28 PM

Verified with r2184

SrNovember 18, 2011 at 4:28 PM

Note that the implementation of this issues has made the following issues obsolete:
and

MNovember 4, 2011 at 2:16 PM
Edited

Fixed

Details

Assignee

Reporter

Organization

SB/KB

Inspector (migrated)

Accuracy of estimate

Rough

Original estimate

Time tracking

1d logged

Components

Fix versions

Priority

Checklist

Created November 4, 2011 at 11:42 AM
Updated November 18, 2011 at 4:28 PM
Resolved November 18, 2011 at 4:28 PM