Connection Pooling in PHP available in OCI8
By cj on Oct 09, 2007
I'm sitting in the first talk at the Zend Conference and listening to Terry Chay's talk about Art in Software Architecture. He's speaking about the connection pooling solution that Tagged.com use with their Oracle DB infrastructure.
I can tell he skipped the morning keynote to polish his talk because he spoke only about current issues with huge websites (tens of millions of registered users) and connection management.
Well, those issues are in the past, and if Terry hadn't skipped the keynote to work on his talk, he would have heard the announcement that Oracle in collaboration from Zend have released a Beta update to the PHP OCI8 extension (download source for 1.3.0 Beta from PECL) that supports Oracle Database 11g "Database Resident Connection Pooling" (DRCP). It also has "Fast Application Notification" (FAN) support that helps applications detect and recover from machine/network/database failures. Oracle Database 11g (production for Linux 32 bit only at time of writing) itself can be downloaded from www.oracle.com.
The key things I want to point out about DRCP are that even on commodity hardware you can scale dramatically - you don't need to wait until you have a big site to reap the benefits of pooling. The second thing is that the pool is on the DB side, so it works regardless of the number of web servers you have.
There is a technical White Paper: Database Resident Connection Pooling in Oracle Database 11g; a PHP specific whitepaper will be forthcoming. The README in the beta OCI8 release from PECL has some useful information on using the extension. Here are some links to specific Oracle documents on DRCP for bedtime reading:
OCI Manual description
Database Concepts description
List of Data Dictionary Views for DRCP
For this beta release, use the OTN PHP Forum for comments and issues.