Esteemed monks,

I am designing a client/server application that is responsible for assigning timed jobs, modifying job schedules, and executing the jobs on time. Each job will be assigned one schedule. Multiple jobs can be assigned to the same schedule. Because of design constraints, all DB access for the jobs must be done on the server side. The client(s) just connects to the server and get/update the schedule information or assign a schedule to a job. Schedule updates are fairly infrequent (only a couple of times per day max). Assigning schedules to jobs will be fairly frequent (20 – 30 times daily). Each job will likely have up to 48 irregularly spaced processes to execute each day (determined by the schedule). At any time, there may be up to 200 jobs assigned to processes.

I have pretty much decided on POE for the schedule access server framework. The client might not even be written in Perl, but will likely be something using Gtk. My question is whether I should separate the server into two processes, one to manage updates/assignments and the other to spawn the processes for each job on time. I need to make sure that the processes are spawned as near to the scheduled time as possible (within seconds). Since several jobs will likely need to spawn processes at the same time, I will most likely need to fork (the processes may not return on a regular schedule and I don’t want one bad apple screwing the whole lot of them). I don’t see in POE a good way to guarantee that a schedule update won’t interfere with processes being kicked off at the right time (other than POE::Component::Cron, which is in beta and the API might change). I’d like to keep one server process if at all possible rather than two, but don’t want to complicate it too much in the process. Any good input / ideas?

I’m not necessarily looking for code here (unless you have more free time than I do), just sanity checking my design ideas.


In reply to POE server task scheduling by former33t

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.