Overview of Concurrent Processing

In Oracle Applications, concurrent processing simultaneously executes programs running in the background with online operations to fully utilize your hardware capacity. You can write a program (called a "concurrent program") that runs as a concurrent process. Typically, you create concurrent programs for long-running, data-intensive tasks, such as posting a journal or generating a report.

For more information on concurrent processing from a user's viewpoint, see the Oracle Applications User's Guide and the Oracle Applications System Administrator's Guide.

You can use PL/SQL to create a stored procedure concurrent program. In addition, any PL/SQL procedure you develop-whether it runs on the client, or on the server as a stored procedure or a database trigger-can submit a concurrent request to run a concurrent program.

See: PL/SQL APIs for Concurrent Processing.

Basic Application Development Needs

Oracle Application Object Library Concurrent Processing provides you with all the features you need to satisfy the following application development needs:

Major Features

Online Requests

You and your end users can submit requests from forms to start any concurrent program. Once your request has been submitted, the concurrent managers immediately take over and complete the task with no further online involvement.

Automatic Scheduling

Oracle Application Object Library automatically schedules requests based on when they were submitted, their priority, and their compatibility with programs that are already running. As a developer, you can define which programs in your application should not run simultaneously. A request for a program that is incompatible with a currently running program does not start until the incompatible program completes.

Concurrent Processing Options

You and your end users can control certain runtime options for each of your concurrent requests. Profile options allow you to determine printing decisions such as which printer to use and how many copies to print.

Online Request Review

Your end users can review the progress of their concurrent requests online. Once the request completes, they can view the report output and log files from their concurrent requests. They can see the status of a concurrent request without printing out the entire report by selecting Requests from the default help menu.

Concurrent Managers

Concurrent managers are components of Concurrent Processing that monitor and run time-consuming, non-interactive tasks without tying up your terminal. Whenever you or your users submit a request to run a task, a concurrent manager processes that request and does the work in the background, giving you the ability to run multiple tasks simultaneously.

Oracle Application Object Library predefines the Internal Concurrent manager, which functions as the "boss" of all other managers. The Internal Concurrent Manager starts up, verifies the status of, resets, and shuts down the individual managers. It also enforces program incompatibility rules by comparing program definitions for requested programs with those programs already running in an Oracle username designated as a logical database.

After installation, the system administrator can create and tailor the concurrent managers as needed. The system administrator chooses the number of requests that each concurrent manager can process simultaneously and what types of requests it can process. Concurrent managers provide total control over the job mix and throughput in your application.

Simultaneous Queuing

Simultaneous Queuing lets requests wait in many queues at once to ensure that the first available concurrent manager starts your request. Use Oracle System Administration to set up Concurrent Processing so that requests can be run by more than one concurrent manager. When the first available concurrent manager starts a request, it automatically removes the request from all the other queues.

Multiple Concurrent Programs For Each Executable

Concurrent program executables allow you to use the same execution file for multiple concurrent programs. To create specialized versions of a concurrent program, either define a new concurrent program using the same executable, or copy the concurrent program. You can specialize a concurrent program by required printers, specialization rules, or application name so that the concurrent programs run using the same execution file but with different parameters.

Integration with the Business Event System

Concurrent programs can be integrated with the Business Event System in Oracle Workflow. Business events can be raised at key points of the life cycle of a request to run a concurrent program. Users can subscribe to the business events and create their own business processes interacting with the concurrent programs.

For more information on the Business Event System, see the Oracle Workflow documentation.

Unified C API

The Unified C API afprcp() function allows you to write C or Pro*C programs using a standard format and use your programs with either the spawned or immediate execution method. The same execution file can run both as a spawned process or as a subroutine of the concurrent manager.

Definitions

Concurrent Program

A concurrent program is an instance of an execution file, along with parameter definitions and incompatibilities. Concurrent programs use concurrent program executables to locate the correct execution file. Several concurrent programs may use the same execution file to perform their specific tasks, each having different parameter defaults and incompatibilities.

Concurrent Program Executable

A concurrent program executable links an execution file or and the method used to execute it with a defined concurrent program. Under Concurrent Processing, an execution method may be a program written in a standard language, a reporting tool, or an operating system language.

An execution method can be a PL/SQL Stored Procedure, an Oracle Tool such as Oracle Reports or SQL*Plus, a spawned process, or an operating system host language.

Concurrent Program Execution File

A concurrent program execution file is an operating system file or database stored procedure which contains your application logic and can be executed by either invoking it directly on the command line or by invoking a program which acts upon it. For example, you run a Pro*C program by invoking it on the command line. You run a SQL script by running SQL*Plus and passing the name of the SQL script without the .sql extension.

Concurrent Program Subroutine

A concurrent program subroutine is a Pro*C routine which contains your application logic and is linked in with the Concurrent Manager code.

Execution Method

The execution method identifies the concurrent program executable type and the method Oracle Application Object Library uses to execute it.

An execution method can be a PL/SQL Stored Procedure, an Oracle Tool such as Oracle Reports or SQL*Plus, a spawned process, or an operating system host language.

Oracle Tool Concurrent Program

A concurrent program written in Oracle Reports, PL/SQL, SQL*Loader, or SQL*Plus.

Spawned Concurrent Program

A concurrent program that runs in a separate process (on most operating systems) than that of the concurrent manager that starts it. You write spawned concurrent programs as C or Pro*C stand-alone executable files. On some operating systems, you can also write spawned concurrent programs in your operating system language.

Spawned concurrent programs are the recommended execution method for new C or Pro*C execution files.

Immediate Concurrent Program

A concurrent program that runs in the same process as the concurrent manager that starts it. You write immediate concurrent programs as C or Pro*C subroutines and link them in with a concurrent manager.

Attention: The immediate concurrent program functionality is provided for backward compatibility only. You should not be creating new immediate concurrent programs.

Program Library

A program library is a set of linked immediate concurrent programs that are assigned to concurrent managers. A concurrent manager can run any spawned or Oracle Tool concurrent programs, but only immediate concurrent programs in its own program library. Use Oracle System Administration to further restrict what concurrent programs a concurrent manager can run when defining a concurrent manager with specialization rules.

You register your program library with Oracle Application Object Library. List the short names of the immediate concurrent programs in your program library. Then, use Oracle System Administration to assign program libraries to concurrent managers.

You can include an immediate concurrent program in different libraries. Each concurrent manager that runs immediate concurrent programs must have a program library, although several managers can share the same library.

Request Type

A request type groups similar concurrent programs to save time in defining and maintaining concurrent managers.

Parent Request

A parent request is a concurrent request that submits another concurrent request. In the case of Standard Request Submission, a report set is a parent. When you submit a report set, the report set submits the reports or programs that you have included in the report set. A parent request may be sequential or parallel which determines whether the requests it submits run one at a time or all at once.

Child Request (Sub-request)

A child request is a concurrent request submitted by another concurrent request. When you submit a concurrent request to run a report set, the report set submits the reports in the set for concurrent processing. The requests submitted by the report set are child requests.

Logical Database

A logical database is a set of logically related data stored in one or more ORACLE IDs. Concurrent managers use logical databases to determine the scope of concurrent program compatibilities.

When you define a concurrent program, you specify what programs are incompatible with this program and cannot run together with this program in the same logical database. A user in a logical database submits a concurrent request to run a concurrent program. If a concurrent manager that can process your request finds that there are no incompatible programs currently running in the user's logical database, then the concurrent manager processes the concurrent request. Concurrent managers use logical databases to ensure that incompatible programs do not run together.