Sybperl and Modperl on Apache

Sybperl and Modperl on Apache

Post by Paul Davie » Tue, 30 Mar 1999 04:00:00



I'm currently developing a webserver using Sybase ASE 11.0.3, Sybperl,
Modperl and Apache on Linux 2.0.36.

The application is a high throughput OLTP server and performance is
critical - it's a kind of seach engine type app. I am therefore intending to
use ModPerl to maintain a persistent database connection via Sybperl to
Sybase.

However, I have the following question: Can a persistent database connection
support multiple users?  If multiple users share the same database
connection simultaneously then surely there will be a conflict?

If this is the case then is there a way round this problem or do I have to
go back to the old way of initialising new database connections per user
session?

Any help would be appreciated.

Thanks

Paul

 
 
 

Sybperl and Modperl on Apache

Post by Michael Pepple » Tue, 30 Mar 1999 04:00:00



> I'm currently developing a webserver using Sybase ASE 11.0.3, Sybperl,
> Modperl and Apache on Linux 2.0.36.

> The application is a high throughput OLTP server and performance is
> critical - it's a kind of seach engine type app. I am therefore intending to
> use ModPerl to maintain a persistent database connection via Sybperl to
> Sybase.

> However, I have the following question: Can a persistent database connection
> support multiple users?  If multiple users share the same database
> connection simultaneously then surely there will be a conflict?

> If this is the case then is there a way round this problem or do I have to
> go back to the old way of initialising new database connections per user
> session?

Each apache "child" can have a single connection open. It should be a generic
connection (ie opened for a generic user such as 'webuser' for example). Then
each request that is serviced by apache will be sent to one of the open
connections.

What you can't do is maintain open connections based on user sessions, because
the connections are based on processes, and there's no way of forcing one
particular apache child to process the requests for one specific session.

Note that you must NOT open your connection in the startup script for apache.
The connections must be opened in the apache child processes.

Michael
--
Michael Peppler         -||-  Data Migrations Inc.

Int. Sybase User Group  -||-  http://www.isug.com