Oracle 11g has introduced Database
Resident Connection Pooling (DRCP) to support server-side
connection pooling. With DRCP, different application
processes can share sessions on the same machine and across
a multitude of other machines. This new feature
greatly increases the scalability of applications that
cannot be deployed as multithreaded, such as PHP
applications. DRCP is also useful in multi-threaded
applications that frequently maintain idle connections.
Unlike some other databases, creating a
new connection in Oracle requires a non-trivial amount of
database resources. The Oracle database architecture
is designed to create a connection that is capable of
performing many concurrent operations using the same
connection. Web-tier and middle-tier database applications
generally require many threads during their execution.
Each thread must take its turn to consume database
resources. In order to build scalable applications,
minimal connections should be used by the application.
In order to support this practice, Oracle has provided
connection-pooling options in all of their data access
drivers such as OCI and ODP.NET. The use of
connection-pooling in an application allows multiple threads
to share resources. This reduces the number of sessions
required to support multiple application end users and
allows for very scalable applications.
The Growing Need for DRCP
Since its introduction in 1995, PHP has
grown to be one of the most popular languages on the web.
Other major database vendors have already taken steps to
provide better support for PHP applications. As the
use of this language becomes more common, it is no surprise
that Oracle's customers have been eager to use PHP in their
web-based applications. Until Oracle 11g, however, the
major obstacle for using PHP to access Oracle databases was
the inability of single-threaded PHP to use middle-tier
connection pooling. The PHP architecture was not
efficient with Oracle's connection architecture.
Consequently, Oracle users who wanted PHP applications were
forced to either use another language or another database.
However, with the introduction of DRCP in Oracle 11g, this
is no longer the case.
Database Resident Connection Pooling
provides a connection pool within the database server. The
DRCP supports situations where an application requires a
database connection for a short amount of time before
releasing the connection. DRCP works by creating a
pool of dedicated servers which consist of a server
foreground and a database session combined; a model that is
referred to as ?pooled? servers.
Prior to DRCP, only multithreaded
applications were eligible to take advantage of the session
sharing capability. By utilizing DRCP, the pooled
servers are shared across middle-tier processes on the same
host and across different middle-tier hosts.
Additionally, DRCP complements middle-tier connection pools
because it eliminates the need to maintain persistent
database connections at the middle-tier in order to avoid
the overhead of connection creation and termination.