Server Job Execution

Server Job States

Diagram shows the different states of the server jobs

images/download/attachments/124127944/Job_Execution_state.png

Load Balancing

In a multi server environment it is essential to balance the load within all available servers so that they have an equally workload. Since version 8.0.05 there is a server job distributor which calls a selection logic (JobServerSelector) to find the next available server to schedule a job. The default implementation RoundRobinSelector determines the next available server with the round robin principle. If a server is fully occupied with the maximum of running jobs, the server will be skipped. If all JOB_SERVER are fully occupied or only a CLIENT_SERVER is available, then the jobs will be queued and executed as soon as the next server is available.

Customizing

Implement custom job

Custom jobs can be contributed by using the extension points com.heiler.ppm.job.server.ServerJobType (for the server) and com.heiler.ppm.job.ui.ServerJobType (for the desktop client). For details see the documentation of the extension point.

Custom jobs are not allowed to have the job group SystemJob.

Implement custom JobServerSelector

The default implementation RoundRobinSelector of the server selector can be customized by the extension point: com.heiler.ppm.job.server.JobServerSelector. Therefore the interface JobServerSelector has to be implemented. The method of the JobServerSelector is called right before the job is going to be executed, so the implementation can decide on which server the job should run.

Special handling for Non Scheduled jobs

Jobs like FindReplace and SetValue use temporary reports which are truncated on server restart. If these jobs are queued and the server is restarted, these jobs are canceled without being rescheduled.

Preferences

plugin_customiziation.ini

com.heiler.ppm.job.server/maxRunningServerJobs: Defines the maximum of jobs that can run at the same time on a JOB_SERVER (excluding s ystem jobs) . Default is set to 40 Jobs.

NetworkConfig.xml

Server jobs like imports and exports can only be scheduled to run on servers with the role JOB_SERVER. This role is defined in the NetworkConfig.xml

<default-role>CLIENTS_SERVER</default-role>

<default-role>JOB_SERVER</default-role>