You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Shane Nay <sh...@isupportlive.com> on 2000/06/26 07:08:20 UTC

Re: Can you tie session to exclusive db connection across http requests?

Keith,
On Mon, 26 Jun 2000, you wrote:
> Hello,
> 
> In a CGI type of web environment, user "A" wants to update a certain row of
> data, so he fetches it for display in his browser. User "B" fetches the same
> data shortly after user "A" fetches the data (but before user "A" updates).
> User "A" updates. Then user "B" updates, resulting in user "B" overwriting
> the update of user "A", but never seeing user "A" updates. This is because
> in a typical web environment, the database connection is closed (OR randomly
> pooled) with each http request, thus not taking advantage of oracles
> "A.C.I.D." transaction qualities (if you need to ask, then you are not
> qualified to answer)....

So you're putting a mission critical system together visa vi a web
interface?..., hmm, that's unusual.  Well then you've probably got a whole
different subset of conditions underwhich your application is running.  (IE
this sounds intranet as opposed to internet)

The two suggestions by John & Frank were good.  I'll give you mine, but it
sounds like you and I are working with a whole different spectrum of audiences.
 Okay, what I would do is similar to what was aforementioned and that's a
timestamp in the users browser that says when the information was lasted
viewed.  (IE when they are getting the data that they are requesting to make an
update)  Then check the tables altered timestamp (automagically set via a
pl/sql trigger, or someother clever mechanism) and see if it's before that
date.  If it is, send the user the updated information to his browser and tell
him he's going to have to be quicker next time :-).