Fixed
Details
Assignee
MMReporter
MMOrganization
SB/KBInspector (migrated)
SrSrAccuracy of estimate
RoughOriginal estimate
Time tracking
1d loggedComponents
Fix versions
Priority
Major
Details
Details
Assignee
M
MReporter
M
MOrganization
SB/KB
Inspector (migrated)
Sr
SrAccuracy of estimate
Rough
Original estimate
Time tracking
1d logged
Components
Fix versions
Priority
Checklist
Checklist
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
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 .....