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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |