41.1.3 Multiprocessing Options

The Multiprocessing Options are the settings and parameters that control how individual ALM or FTP Processes are processed by the Cash Flow engine. The seeded data model includes default settings for all of the multiprocessing options, but you can also customize these settings for your use through the process tuning user interface as described above. This section provides more details for the different Multiprocessing options as further background. These options are:

Units of Work

The OFSAA processing engines determine units of work for any job based upon the Process Data Slicing Code (PROCESS_DATA_SLICES_CD)assignment. The Data Slicing Code includes one or more columns by which data in the (processing) table is segmented. The individual segments are the defined Units of Work.

The Process Tuning user interface enables you to specify different unit-of-work definitions for your processes. You can specify one unit-of-work definition for one set of processes and then specify a different unit-of-work definition for another set of processes.

The OFSAA Processing Engines determine the units of work for a job by executing the following statement (with filtering criteria applied) on every table the process is run against:

select distinct<data slice columns> from <table> where <filter condition>;

where <data slice columns>is the comma-separated list of columns used for data slicing, <table>is the name of the instrument table being processed, and <filter condition>is the additional filter (if any) for the process. Any numeric column or columns in a portfolio table can be used for data slicing.

Unit-of-Work Servicing

Unit-of-work servicing identifies how the OFSAA processing engines interact with Oracle Database Table Partitioning.

What is Partitioning?

Partitioning addresses the key problem of supporting large tables and indexes by enabling you to decompose them into smaller and more manageable pieces called partitions. After partitions are defined, SQL statements can access and manipulate the partitions rather than entire tables or indexes. Partitions are especially useful in data warehouse applications, which store and analyze large amounts of historical data.

What Is Unit-of-Work Servicing?

Unit-of-work servicing specifies how individual units of work are processed for a table thatis partitioned.

For a partitioned table, an application Rule Type or Rule Step can create multiple unit-of-work lists by executing the following statement (with filtering criteria applied) on every table partition the processis run against:

select distinct < data slice columns > from < table_partition_n >;

For example,

SELECT DISTINCT REV.COLUMN_NAME, MLS.DISPLAY_NAME from REV_TAB_COLUMNS REV, REV_TAB_COLUMNS_MLS MLS
WHERE REV.TABLE_NAME = MLS.TABLE_NAME AND REV.COLUMN_NAME = MLS.COLUMN_NAME
AND REV.TABLE_NAME = 'PORTFOLIO' AND REV.DATA_TYPE = 'NUMBER'
AND MLS.MLS_CD = 'US' UNION
SELECT 'DATA_SLICE_ID' COLUMN_NAME, 'Data Slice' DISPLAY_NAME
from DUAL UNION
SELECT 'FINANCIAL_ELEM_ID' COLUMN_NAME, 'Financial Element' DISPLAY_NAME
from DUAL
ORDER BY DISPLAY_NAME;

where <data slice columns>is the comma-separated list of columns used for data slicing. Any column or columns in a table can be used for data slicing. <table_partition_n> are the unique table partitions of a table where n is assumed to be greater than 1.

The different Servicing methodologies provided in OFSAA are listed in the following table. You cannot add any customized Servicing methodologies.

Table 41-5 Partition Type Codes

Partition Type Code

Description

0 Do not use partitions (Single Servicing)
1 Use shared partitions (Cooperative Servicing)
2 Use non-shared partitions (Dedicated Servicing)

Single Servicing

Single Servicing indicates that the processing engine fulfills unit-of-work requests regardless of any table partitioning. As each process completes, it requests the next unit-of-work segment, whether that segment belongs in the same Table partition.

Use Single Servicing when you do not have Oracle Table Partitioning in your database.

Cooperative Servicing

Cooperative Servicing indicates that the processing engine fulfills unit-of-work requests so that each process works against a specific partition unless it is idle. Idle processes then work against the next available unit-of-work segment, whether that segment belongs in the same Table partition.

Dedicated Servicing

Dedicated Servicing indicates that the processing engine fulfills unit-of-work requests so that each process works against a specific partition.

Examples of How Worker Processes Service Units of Work

Partition Type code defines how worker processes service the unit-of-work list or lists. Partition Type ‘Single’ results in a single unit-of-work list. All available worker processes service the list until all units of work are complete. When the Partition Type is Cooperative or Dedicated and the table to be processed is partitioned, multiple units of work lists are created. The following scenarios explain how the worker processes service multiple units-of-work lists

Figure 41-12 How the worker processes service multiple unit-of-work lists


How the worker processes service multiple unit-of-work lists

  • The main process makes two lists of all units of work that need to be processed, unit-of-work list A and unit-of-work list B, respectively. The assumption setup is that the Table has two partitions.
  • The main process spawns four worker processes. A dedicated worker process is assigned to ser- vice each units-of-work list, Worker Process A1, and Worker Process B1 respectively. (The setup is that the Number of Processes is4.)
    • If Partition Type is Cooperative, Worker Process 3 and Worker Process 4 assist Worker Process A1. When a unit-of-work list is complete, the available worker processes assistthe dedicated worker process on their unit-of-work list.
    • If Partition Type is Dedicated, Worker Process 3 and Worker Process 4 do not assistthe dedicated worker processes.
  • When all units of work are completed, the worker process exits and the main processfinishes any clean-up aspects of processing
  • During processing the following istrue:
    • Each worker process must form its database connection.
    • A unit of work is processed only by a single worker process.
    • Different units of work are processed at the same time by different worker processes

Figure 41-13 How different units of work are processed at the same time by different worker processes


How different units of work are processed at the same time by different worker processes

  • The main process takes three lists of all units of work that need to be processed: unit-of-work list A, unit-of-work list B, and unit-of-work list C, respectively. (The setup is that the Table has threepartitions.)
  • The main process spawns two worker processes. A dedicated worker process is assigned to ser- vice a units-of-work list, Worker Process A1, and Worker Process B1 respectively. (The setup is that the Number of Processes is 2.)
    • If Partition Type is Cooperative, Worker Process A1, and Worker Process B1 work untilall units of work are complete from all three unit-of-work lists.
    • If Partition Type is Dedicated, the first worker process to complete their unit-of-work list services unit-of-work list C. When the other worker process completes their list, theworker process exits.
  • When all units of work are completed, the worker process exits and the main processfinishes any clean-up aspects of processing.
  • During processing the following istrue:
    • Each worker process must form its databaseconnection.
    • A unit of work is processed only by a single workerprocess.
    • Different units of work are processed at the same time by different workerprocesses.

WorkerProcesses

Worker Processes refer to the number of individual processes working simultaneously to complete the job. The Main OFSAA Process launches individual worker processes. OFSAA enables you to specifythe number of worker processes for your jobs.