Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
SB/KB
-
Rough
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 .....
Attachments
Issue Links
- duplicates
-
NAS-1949 Improve on HarvestControllerServer status messaging
- Resolved
- is depended by
-
NAS-1981 Harvest job dispatching doesn't handle Harvester shutdown
- Resolved
- Trackbacks
-
3.18.0 release test Previous 3.17.0 release test Release test status https://sbforge.org/jira/browse/NAS1909 Code freeze planned for 24.Oct. Release planned for the 11.Nov NAS:NetarchiveSuite 3.18.0 Release Notes System test environment