At 9:39 AM -0500 7/28/99, <sinisa@stripped> wrote:
>Paul DuBois writes:
> > At 4:36 AM -0500 7/28/99, <sinisa@stripped> wrote:
> > >toxalot@stripped writes:
> > > > >Hi Jennifer !
> > > > >
> > > > >
> > > > >There are indeed many ways this can be accomplished, but at this
> > > > >moment I think that the best possible way is with :
> > > > >
> > > > >select get_lock("user_name",10000);
> > > > >.........
> > > > >
> > > > >select release_lock("user_name");
> > > > >
> > > > >
> > > > >If you have further questions, please do not hesitate.
> > > > >
> > > > >Sinisa
> > > > >
> > > >
> > > >
> > > > When would you select release_lock ? Would users have to log out
>and then
> > > > you could select release_lock?
> > > >
> > >
> > >Hi Jenifer !
> > >
> > >What I was suggesting to you is the algorithm to use in your programs
> > >or applications.
> > >
> > >
> > >When the user logins, you run get_lock with a high timeout value, This
> > >value should be empirical, because customer may switch off, and a lock
> > >would remain to ban further entry.
> >
> > I don't understand this. If by "switch off" you are referring to the
> > person with the original lock, when that user's session ends, the lock
> > is automatically released. If you are referring to the second person
> > who requests the lock, won't the request be tossed if that session is
> > killed?
> >
>
>No Paul, say the application is a WWW application. User enters first
>dialog, get_lock is issued and he suddenly decides to go to MTV and
>listen to the music.
I thought only smart people used MySQL. :-)
>User has "switched off". He has not regularly left the application, he
>has not clicked on "Exit" button (let's call it like that), so
>release_lock is not issued. You need timeout in order to make
>resources available for such cases !!
>
>OK ??
Okay, I understand now. Your terminology suggested a termination of
the session.
--
Paul DuBois, paul@stripped