Queue rescheduling naming convention (Command pattern)

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.

Scheduled

  • Technically a scheduled job implies a job scheduler. You talk about writing your own scheduler but normally this would be handled at quite a low level and takes into account things like available resources and job priority, not just when the job wants to be run.
  • In English, I would say that scheduled implies a timetable.

Deferred

  • Technically implies that the job is waiting for something, an external service to become available or resources to be freed up.
  • But again, in English I might be expecting the opposite to be true, deferred referring to the fact that the job is put off until some defined time.

Personally I’d go with the first: scheduled job. You plan on writing something you are going to call a job scheduler and not a deferred job handler, so that makes sense.

PS. I don’t know if this would fit with the rest of your system, but have you considered creating threads that wait for the deferral period to pass before checking the queue. Java for example has a Thread.sleep(timePeriod) method otherwise you would still have the computational over head of the thread having to wake up every so often to check what time it was but at least it wouldn’t be accessing your data structure each time.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật