Wednesday, April 22, 2015

#395 Oracle ESS -> Scheduling concepts - Work Assignment, Workshift etc.

First, a simple example -

I have a job set that includes 2 jobs -

MoscowPayrollRun and

Then are combined in the following JobSet -

As you can see, the two jobs are defined so to run in parallel, not a good idea, if you
want your salary increase reflected in your pay.

So I define an Incompatibility -

Why Moscow? Because that's where I current am!

Scheduling with ESS

Now to some ESS concepts -

Request Processor - is mapped to a server and, as the name suggests, allocates threads for
job requests.

Work Assignment / Workshift / Schedules -

The following is copy and paste from the ESS docs -

With work allocation, you can define constraints on where and when jobs run, as well
as the amount of resources that can be used to process the jobs. This process includes
creating a work assignment and binding the work assignment to a request processor.
A work assignment consists of a specialization rule and one or more workshifts. The
specialization rule defines restrictions on which jobs can be processed. A workshift
defines the temporal windows when the jobs can be processed and what resources can
be used during those periods. The resources defined in a workshift include threads,
which are a local resource of the request processor, and asynchronous workers, a
global resource.  

How these components work with each other

Here we are talking about the items available under the menu item
Work Allocation -

The Schedule -

This can custom (e.g. one time as shown below) -

or re-occuring -

They can be also open ended i.e. no End date specified.

The Workshift -

The workshift leverages a schedule -

Note: You specify the Duration. e.g. Start every Friday at 6 pm and
run for 30 minutes.

The Work Assignment -

As you can see, A work assignment is comprised of one or more
workshifts. Specialization can be defined at this level.
i.e. what type of jobs should be executed during these assigned workshifts.

Again, from the ORCL docs -

Specialization rules: Define restrictions for job request processing on a request processor.

This combination of work assignment controls, including specialization rules and
workshifts gives you the ability to select the kinds of job requests to be processed and
decide how to allocate the request processor resources. For example, you can define
two workshifts: a day shift and a night shift to allocate processing for these periods.
The day shift could have more resources allocated for a peak usage period while the
night shift could provide a different mix for its resource allocation.
By default, no work assignments are bound to a request processor and the request
processor processes any ready job request. The default behavior is similar to using a
request processor with no specialization rules and a workshift of 24/7 duration, all
configured threads are used and there are no limits on the number of asynchronous

You can add such specialisations, based on the following -

Afterwards, I could assign the work assignment to the Request Processor -

So that's how these things hang together!
Simple, once you know.


Here is my simple example -

My Schedule is once off - starting at -


This schedule is leveraged by the following workshift -

The workshift is assigned to the following work assignment -

I add the Specialization -


I now submit a job with  SYS.PRODUCT set to PAYROLL

The job is in ready state -

Re-check, after 6:59

No comments: