الثلاثاء، 7 أبريل 2020

Oracle ADF AM Pooling

The following document explains different terminologies related to ADF AM Pooling and pooling parameters.
What is AM: Application Module is the most important component in the model layer of the MVC architecture, which is responsible for:
  1. Holding the transaction against a data source.
  2. Holding the state.
  3. Give access of View Objects to the UI(View Layer) .
  4. Expose client interface methods.
What is transaction: It’s a set of activities with a start, a bunch of operations (select, insert, update, delete, etc..) with the database and an end(commit/rollback).The AM does the transaction management by integrating the database with the application server.
What is state: The current state of the user (user login, the data entered or fetched by the user, etc..). The AM does the state management by EO cache, View Objects, etc.
VO access to View Layer: The View layer can access only those view objects which are associated with the AM of the current application.
Client Interface methods: The AM exposes the client interface methods written in different implementation files.
What is AM Instance: An AM object created to address the user request for the current session.
What is AM Pool: A collection of AM instances to meet various user requests in the application server.
What is AM Pooling: Optimum usage of AM Pool so that a number of AM instances can server a larger number of client requests.
Root AM: The AM which is uniquely created for each user session and handles state and transaction. It is the Root AM which is stored in the pool. Nested AM on the other hand is created only for logical grouping of VOs. They refer to the root Am for all transaction and state management related responsibilities.
Initial Pool Size: It is the number of AM instances initialized or instantiated in the AM pool. This helps reducing the startup cost when new sessions are requested. It’s default 0.
Max Pool Sixe: Maximum number of AM instanced that can be created in the AM pool, default 4096.
Recycle Threshold: One session preserves the state of the AM to be reused later by the same session. Recycle Threshold is the maximum number of such AM instances whose states are preserved in the AM pool.
States of an Am Instance: Available, Unavailable, Referenced
  1. Available: It can be picked up by the next session request immediately.
  2. Unavailable: It is being used by a session.
  3. Referenced: It was recently used by a session, but currently not being used.
Passivation, Activation: When an AM instance is being referenced and it needs to be used by a session request, the state of the old AM instance is stored in the database. This is called passivation. Next time, when the same session makes a request, the old state is retrieved from the database and loaded in the AM pool. This process is called avtivation.
Light Load: Number of AM Instanced being used/unavailable < Recycle Threshold
In Light Load circumstance, a new session request is assigned an available AM in the threshold pool or a referenced AM instance is passivated and assigned to the request.
Heavy Load: Number of AM Instanced being used/unavailable >= Recycle Threshold
In Heavy Load circumstance, a new AM above the threshold is instantiated and assigned to the new session request.
Pool Pooling Interval: It defines how often the clean up process sweeps the AM pool to reclaim AMs. It helps in reclaiming the memory which were occupied by the idle session instances.
Minimum Available Size: This is the maximum number of instances allowed in the AM pool under light load. Instances beyond the minimum available size will be claimed by the next clean up process.
Maximum Available Size: This is the maximum number of instances allowed in the AM pool under heavy load. Instances above the maximum available size will be claimed by the next clean up process.
Idle Instance Timeout: It defines the time after which an idle AM Instance is considered to be claimed by the next resource clean up. It takes Maximum Available Size, Minimum Available Size for heavy load and light load respectively.
Maximum Instance Time to Live: It is the maximum allowed time for an idle instance to be claimed by the clean up. It doesn’t consider whether is pool is under heavy load or light load. This is generally used to recover the memory from an errored process instance.

ليست هناك تعليقات:

إرسال تعليق

ADF: Programmatic View Object Using Ref Cursor.

ADF: Programmatic View Object Using Ref Cursor. Posted by:  Manish Pandey   April 25, 2013   in  ADF   Leave a comment   3758 Views Sometime...