Typically, Netscape Application Server applications must access a database, or several databases. Administering database connectivity encompasses the following areas:
About Database Drivers
Database connectivity is achieved through the use of a database driver, which is a piece of software written either by the database vendor or a third-party vendor. The following types of database drivers can be configured with the Netscape Application Server to provide database connectivity:
Native Database Drivers
Native database drivers are provided by the database vendor. These drivers are optimized for clients to connect to that specific database.
Connecting to a database using a native driver typically provides the best performance. The Netscape Application Server interfaces with the following databases using the native driver of that database:
ODBC Database Drivers
ODBC database drivers are typically written by third-party vendors using the database vendor's open-connectivity architecture. ODBC drivers are available for most databases in the industry and provide easy application portability when changing between databases.
ODBC database drivers, however, typically limit access to database functionality. For example, access to stored procedures and manipulation of binary data is usually limited when using an ODBC driver. In addition, though it is easier to connect to many databases, performance is not as high as if you were using a native database driver.
Both Native and ODBC database drivers should be installed before installing a Netscape Application Server. This way, the Netscape Application Server can automatically configure the drivers.
About Database Connectivity Parameters
The Netscape Application Server allows you to adjust database connectivity through connection parameters. The connection parameters allow you to optimize the performance with which the Netscape Application Server connects to a database or databases. The connection parameters are grouped in the following categories:
Connection and Thread Parameters
You can set the length of time the Netscape Application Server attempts to make a database connection as well as the minimum and maximum number of threads available for database connections. These parameters optimize the performance of the Netscape Application Server by keeping the server from wasting resources. For example, because the Netscape Application Server waits for open database connections when a request is made, the connection time limit is useful to limit the server from endlessly trying to connect to a database that is down.
The thread parameters determine how many threads the Netscape Application Server allocates for asynchronous database queries. Such threads are usually used for queries returning a large number of rows and allowing the application to do other tasks while waiting for the query to finish.
The default thread allocations are adequate for most applications. If an application developer uses many asynchronous queries, you might want to increase the maximum number of available threads. Keep in mind that each thread does use a small stack allocation and pulls from the total number of available system threads. Therefore, if an application does not use any asynchronous queries, you can increase performance by setting the maximum available threads to zero.
Result Set Buffer
After an application executes a database query, a result set is returned from the database. Application developers can elect to buffer that result set so that the application can move backwards to rows already passed by as the application retrieves rows from the result set.
Typically, after a result set is returned from the database and the application retrieves or moves past the individual rows in that result set, those rows are removed from memory. The application would have to execute another query to return to a previous row. This is not performance-efficient.
Buffering the result set holds it in memory. This allows applications to move back and forth through the result set as it is retrieving rows. Therefore, applications do not have to execute another query. This increases the number of free database connections, which would have been used by the query, and enhances the performance of the applications running on the Netscape Application Server.
You can adjust the following result set buffering parameters:
The default values are adequate for most applications, so adjustments are not usually required for initial application installations.
The result set buffer is dynamically adjusted. If there are no rows to buffer, there is no space allocated in memory. This allows the Netscape Application Server to maintain performance by utilizing the maximum amount of active memory.
Database Cache Parameters
The database cache is an array used to hold active and recently used database connections. Database connections are added to the cache array when an application creates a database connection.
While the application is using that database connection, the Netscape Application Server marks that connection as in use. Once the database operations are finished, the server marks the database connection as free. The cache then holds the free connection in the cache array for a configured period of time. This allows a new request to the same database to be quickly handled because the server uses the free cached connection. Once a free connection exceeds the time-out, a cleaning thread removes the connection from the cache and opens a slot for a new connection to be cached.
You can adjust the following cache parameters:
The default values are adequate for most applications, so adjustments are not usually required for initial application installations.
The cache array is dynamically adjusted up to the maximum number of allowable connections. If there are no connections to cache, the array is allocated to zero spaces.
|