For my project I'm creating a queueing mechanism based on the Command Pattern, which can execute one of a number of jobs. Jobs can add other jobs to the queue or can be added by a human. Most of the jobs are done after executing once, but certain jobs will need to be rescheduled at a later time.
I decided I want to create a seperate dataset about jobs that need to be rescheduled and create a seperate process that loops over these at a set interval to add new jobs to the queue.
I'm stuck at what's the right naming convention for my dataset and (looping) process for rescheduling jobs. My thinking is that it's going to look something like this:
My datasets:
- Job (in the queue) - Information about which job to execute.
- Incident Report - Any result that needs to more attention gets logged here.
- Result (multiple) - All data that resulted from the executed jobs.
- Scheduled Job (What to call?) - Information about a job that needs to be executed in the future and the timestamp my process needs to add the job to the queue.
My objects:
- Client - A object that gets a job from the queue and maps to a specific command class and passes it to the command invoker.
- Command (multiple) - Contains logic to of the job and job data to pass around dependencies.
- Command Invoker - Gives the final call to execute the command and removes it from the queue afterwards. This class will probably also be responsible for updating data about scheduled jobs.
- Job Scheduler - A independent object that can add jobs at any time from a job that's being executed.
I'm not sure if I need to add the process of rescheduling jobs as a a seperate job or as a different application altogether. I hope somebody can give me some advice of how to go forward.