Understanding the Analytic Server Framework
This topic provides an overview of Analytic Server Framework present in PeopleSoft.
When a program doesn't “maintain state” or when the infrastructure of a system prevents a program from maintaining state, it's known as a stateless program or system. It can't take information about the last session into the next session, such as settings the user makes or conditions that arise during processing.
For example, the HTTP protocol is stateless. Additional schemes, such as cookies, are necessary to maintain state in the HTTP (web) environment.
PeopleTools is architected primarily around a stateless model of client/server connectivity. This model enables users' application sessions to be preserved even if servers are shut down or rebooted. All session state is maintained by the client and is transferred to the server with each request. As long as an application server is up and running, a user’s session remains active and functional, and any application server can perform requested transactions.
However, with some products, such as Analytic Calculation Engine or PeopleSoft Optimization Framework, running a calculation on a multi-dimensional model is likely to produce far more data than is reasonable to shuttle between a client and server to maintain a stateless connection. For performance reasons, the calculations are performed completely in memory. If these calculations were to be synchronized and stored in the database so that a stateless connection could be maintained, performance would suffer significantly.
The analytic server framework provided by PeopleSoft is a general server infrastructure designed to meet the needs of PeopleSoft products that process large amounts of data in memory. It provides a stateful model of client/server connectivity that these products require to be part of the PeopleTools system, by keeping track of configuration settings, transaction information, and other data for a session.
For example, client software could request that an analytic model or optimization model be recalculated in one transaction, then retrieve the results of the calculation on that model at a later time. A server process handles these requests, and maintains the model state and calculated data in memory between the requests. Additional transactions can then modify the model and perform recalculations on it without shuffling all of the data between the client and the server or dumping all the data to a database, thus preserving in-memory performance.
A large model might take a long time to load. In the event that a user’s session times out and is terminated, the loading and calculation of the model continues, and enables the user to return to the model at a later time in a new session.
The elements of the analytic server framework are:
PSANALYTICSRV server.
PSANALYTICSRV is a Tuxedo managed PeopleSoft application server process, like PSAPPSRV. It contains both the analytic calculation engine and the optimization engine. Multiple instances of PSANALYTICSRV can run in an application server domain. The current condition of each PSANALYTICSRV instance is tracked in system tables.
Analytic server administration pages.
The Analytic Domain Summary page provides current information about the application server domains with PSANALYTICSRV running that are attached to the current database.
The Analytic Servers page enables you to inspect the individual analytic server instances within the running domains, with information about their analytic types and analytic instances, operations, and timeout intervals. You can also halt processes individually on this page.
Analytic table administration pages.
The Purge Delete Tables page displays the names of delete tables relevant to an analytic type or analytic instance, and enables you to clear the data from the tables.
The Synchronize Table Versions page enables you to resynchronize versions of analytic type or analytic instance data and the PSOPTSYNC table that are out of synchronization after you use PeopleSoft Data Mover to move data from one database to another.
Pages for creating, deleting, and copying analytic instances.
The Create Analytic Instance, Delete Analytic Instance, and Copy Analytic Instance pages enable you to define and manage analytic instances that you can then load to inspect and debug your analytic models.
The Analytic Instance Load/Unload page.
The Analytic Instance Load/Unload page enables you to load analytic instances so you can view them within the Analytic Model Viewer, then unload the analytic instances that you no longer need.
Various supporting enhancements in several PeopleTools products.
These products include Analytic Calculation Engine, PeopleSoft Optimization Framework, PeopleSoft Performance Monitor, PeopleSoft Process Scheduler, PeopleSoft Application Engine, PSADMIN, and PeopleCode.
Note: Information about the role that the analytic server framework plays in these products can be found in the documentation for each product.
Analytic Server Terms
The following terms are useful in understanding analytic server technology.
Field or Control |
Definition |
---|---|
Analytic type |
A description of a data set to be loaded and the calculations to be performed on the data set in the analytic server framework. Multiple calculation engines such as the analytic calculation engine or the optimization engine can be associated with an analytic type. |
Analytic instance |
One instance of an analytic type. You can create multiple instances of the same analytic type. |
Analytic server |
The primary functional element of the analytic server framework, called PSANALYTICSRV. Each application server domain can include zero or more analytic servers. |
Analytic server instance |
One running instance of an analytic server. You can run multiple instances of PSANALYTICSRV for a given domain. Each running analytic server instance can hold one analytic instance. |
Analytic engine |
The portion of the analytic server framework that's responsible for managing analytic instances. |
Analytic engine type |
Select one of the following options:
|
Analytic Server Features
The analytic server framework has the following features:
It's dedicated to the storage and management of large models.
It's supported on all PeopleTools application server platforms.
It runs PSANALYTICSRV as a Tuxedo managed server.
You can configure the minimum and maximum number of analytic server instances per domain that are running at one time.
You can specify a timeout for a loaded analytic instance. If the analytic instance isn't referenced within the timeout interval, it's discarded.
Multiple domain environments are supported, in which an analytic instance can be loaded in one Tuxedo domain, and a user can access the analytic instance from another domain.
You install, configure, and administer analytic servers using the same facilities as with other servers.
You can shut down an analytic server and discard any loaded analytic instances.
You use the standard PeopleTools mechanisms to troubleshoot, trace, log and debug analytic servers.
PeopleSoft session activity, such as a user action, a component interface operation, or a message subscription, launches PeopleCode that requires the application server to invoke the analytic calculation engine or the optimization engine to process an analytic instance.
The database maintains a list of all the available PSANALYTICSRV (analytic server) instances, their status, and any analytic instances currently loaded, so it can properly select analytic server instances for new analytic instances, and direct subsequent requests to the proper analytic server instance. When an analytic server instance starts, the database is updated.
When a running program requests the creation of an analytic instance, the analytic server framework considers all available PSANALYTICSRV instances in the same application server domain and allocates one of them from the pool of idle server instances to handle this particular analytic instance. Any further load or recalculate operations requested by the application for this analytic instance are directed back to the same analytic server instance for processing.
Note: If there are no idle server instances, the analytic server framework can spawn additional server instances up to a maximum limit that you can define in the application server domain configuration. If this maximum is reached, the system attempts to allocate a server instance from a running analytic server in another domain.
After an analytic server instance takes over processing the analytic instance, that processing becomes independent of the status of the application server. The core functionality provided by the analytic server framework is the ability to host analytic instances for an indeterminate amount of time in an environment where that data can persist across multiple sessions, and where that data can be accessed without requiring its entire content to be transferred from server to client and back.
Analytic Instance Access
Access to the analytic instances maintained by the analytic server environments is supported only through PeopleCode programs. The environments in which PeopleCode can run include:
The application server (PSAPPSRV).
PeopleSoft Application Engine accessed by PeopleSoft Process Scheduler (PSAESRV or psae)
PeopleSoft Application Engine run from the command line (psae).
An allocated server instance doesn't need to be running in the same Tuxedo domain or on the same server machine as the application server. Once it's allocated, the initiating user is redirected to an application server that's running on the same domain and server machine as the analytic server.
PeopleCode that's running in any PSAPPSRV process can access analytic instances that were loaded by any other PSAPPSRV process, regardless of the Tuxedo domain in which it's running. When the program requests access to such an analytic instance, the running PeopleCode program is restarted and the web server is notified to redirect the request back to an application server within the Tuxedo domain where the analytic instance is loaded. This application server is then able to directly contact the PSANALYTICSRV server with the loaded analytic instance.
Note: PeopleCode that's running in a given Application Engine environment can access only analytic instances that were loaded in the same process.
Secondary Database Connection
A secondary database connection is used to prevent unexpected table locks when you run an analytic calculation. The secondary connection isn't opened until an analytic instance is referenced in a PeopleCode program. A secondary connection is required regardless of whether the analytic calculation is run by an application engine program as a batch process or directly by an online application.
By default, the secondary connection is persistent for improved performance. If you find that the persistent connection imposes too much overhead, you can change it to an on-demand connection by setting bit eight of the DbFlags application server and process scheduler domain parameter.
Note: A non-persistent connection can significantly affect system performance, so consider this setting carefully.
You can use DbFlags bit four to disable the secondary connection altogether, but analytic instance processing requires it, so ensure that DbFlags does not have bit four set.
Errors and Abnormal Process Termination
Any errors that occur while processing an analytic server request result in the PeopleCode program returning an error code or throwing a PeopleCode exception.
If an analytic server instance that's hosting an analytic instance terminates unexpectedly, the loaded analytic instance is lost and unrecoverable. However, the analytic instance status still appears on the Analytic Server Administration pages. The domain monitor (PSMONITORSRV) discovers the unexpected termination and cleans up the status information.