|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi!
I'm totally new to web programming but - well, here's the situation: We are buying some complex bit of software which is still very much in development. So far it looks as if those guys really intend to do their own application server between a database (oracle) and a number of clients. Now, those clients all open sessions to the database (that is, the appserver does) and execute requests which the appserver translates into database dependent sql. We can give a bit of input to those people and I'd very much like to suggest that they use apache as the application server because it saves us administration costs, them development costs and both of us a lot of frust with their homegrown "version 1" appserver. But I do not know enough to make such a suggestion in good faith, and that's why there is this posting. So, is the above scenario (paragraphs one and two) possible at all with apache? How far can one fit in apache into the middle of a three tier architecture where html or web browsers don't come into the picture at all? Can client connect to apache /only/ using http or are other ways like rpc possible too? What about XML-RPC? How are the database connections mapped to client sessions with login and logout and transaction commits/rollbacks and timeouts? How is apaches oracle support? In particular, does automatic failover to a standby database work? (oracle speak: transparent failover) Lots of Greetings! Volker -- For email replies, please substitute the obvious. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Volker Hetzer wrote:
> How far can one fit in apache into the middle of a three tier architecture > where html or web browsers don't come into the picture at all? Apache is an application that sits on top of http (Apache is also called httpd). If you want a database connection but not http, you need a different client/server solution. If you decide that you need Apache to speak to Oracle, some references: http://httpd.apache.org/docs/2.2/mod/mod_dbd.html http://httpd.apache.org/related_projects.html#oracle Ottavio |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Ottavio Caruso schrieb:
> Volker Hetzer wrote: > >> How far can one fit in apache into the middle of a three tier architecture >> where html or web browsers don't come into the picture at all? > > Apache is an application that sits on top of http (Apache is also > called httpd). Yes, I do understand that. > If you want a database connection but not http, you need > a different client/server solution. I want a database connection through http, clients will probably use XML-RPC in their communication with apache. The job of apache is to provide platform independence and SSL. But for the application to work I need persistent connections to the database, so that if three clients open sessions with the apache (i.e, there are three different values), I want three database connections to be created, with each one assigned to one session (based on the value). This database connection should stay until the client has logged off or the session has timed out. So far, the only options I have seen apache offering are - one connection per request, - a pool of connections that get reused in a random manner. Is there a third option like - one connection per client session as identified by a session ? Lots of Greetings! Volker -- For email replies, please substitute the obvious. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Volker, you opened a few threads on at least two ng's, that's
crossposting. I am not a purist, but some may not like it. I used to do this and now I've learnt the lesson! Volker Hetzer wrote: > I want a database connection through http, clients will > probably use XML-RPC in their communication with apache. > The job of apache is to provide platform independence and > SSL. > But for the application to work I need persistent connections > to the database, so that if three clients open sessions with > the apache (i.e, there are three different values), I > want three database connections to be created, with each > one assigned to one session (based on the value). > This database connection should stay until the client has > logged off or the session has timed out. Http, as long as I know, does not offer persistent connections. Don't be fooled by some http1.1 features, such as keep-alive, they have nothing to do with a persistent connection. You can use session, and other tricks, but you have to use a scripting language (php, for instance) to do the job. If you want true persistent connection, don't use http. Ottavio |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Ottavio Caruso schrieb:
> Volker, you opened a few threads on at least two ng's, that's > crossposting. I am not a purist, but some may not like it. I used to do > this and now I've learnt the lesson! Thanks for the hint! > > Volker Hetzer wrote: >> I want a database connection through http, clients will >> probably use XML-RPC in their communication with apache. >> The job of apache is to provide platform independence and >> SSL. >> But for the application to work I need persistent connections >> to the database, so that if three clients open sessions with >> the apache (i.e, there are three different values), I >> want three database connections to be created, with each >> one assigned to one session (based on the value). >> This database connection should stay until the client has >> logged off or the session has timed out. > > Http, as long as I know, does not offer persistent connections. Don't > be fooled by some http1.1 features, such as keep-alive, they have > nothing to do with a persistent connection. You can use session, > and other tricks, but you have to use a scripting language > (php, for instance) to do the job. > If you want true persistent connection, don't use http. Ok, I'll try to be more explicit: I do not care whether the http connection (i.e. the connection between client and apache) is persistent. I'd like the connection between apache and the database to be persistent and not to be reused by another session (i.e. session value) open in the apache server. Here's an example: Client 1 logs on to apache and transmits the database login "x" and password "y". Client gets a session with the value "1". The server (or a php script, whatever) opens a database connection with those credentials and somehow associates it with the value of "1". After apache has responded to the client, the socket connection between client and apache can become severed, as is usual with http. But the database connection between apache and the database persists and database user "x" does not get logged out of the database. Client 2 does the same, gets value 2 and another database session, possibly with the same database credentials. Or not. Now, client 1 sends the next request to apache, together with the value of "1". My hope is that apache, or the scripts of the application can now retrieve the correct database connection. Is that hope realistic? :-) Lots of Greetings and thanks for your patience! Volker -- For email replies, please substitute the obvious. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Volker Hetzer wrote:
> I do not care whether the http connection (i.e. the connection > between client and apache) is persistent. > I'd like the connection between apache and the database to be > persistent and not to be reused by another session (i.e. session > value) open in the apache server. This is better done by a scripting language, eg. php: http://de.php.net/session or google "session handling and reuse" How that applies to Oracle, I don't know and possibly this has not much to do with Apache. Ottavio |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Ottavio Caruso schrieb:
> Volker Hetzer wrote: > >> I do not care whether the http connection (i.e. the connection >> between client and apache) is persistent. >> I'd like the connection between apache and the database to be >> persistent and not to be reused by another session (i.e. session >> value) open in the apache server. > > This is better done by a scripting language, eg. php: > http://de.php.net/session Had a look. Looks like it's simply not possible. Apache thinks that connections with the same user/password/database server are interchangeable, which loses all session functionality from the database point of view. And I didn't find any way for php processes/threads to share objects so I can't build it on my own either. > or google "session handling and reuse" Tried it, there was a lot about j2ee, jsp and other buzzwords but the idea appears the be the same all over. I give up. Lots of Greetings and Thanks to all who responded! Volker -- For email replies, please substitute the obvious. |
|
![]() |
| Outils de la discussion | |
|
|