[VSRV][V4RB] connection status
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Sep 2 09:15:31 CDT 2003
on 9/1/03 6:11 PM, Tim Davis at timdavis at amug.org wrote:
> Hi Ruslan,
>
>>> Before each database action I ask db.IsOpen, if
>>> false call db.Open, then continue the action.
>>
>> I wonder...if do this BEFORE EACH operation, then
>> Check of connection must be very fast operation!
>
> Definitely!
>
> Here are a couple other ideas (not necessarily as a replacement for
> server IsOpen) that would be even faster. You may not like them, I'm
> just thinking of speed.
>
> 1. The server "tells" the client it is disconnected (or will be), and
> the client retains the boolean property, or reconnects immediately.
GOOD IDEA.
Although, This can work only if client still alive.
But if client go to coffee, and line is good, server really will be able do
this.
> 2. The server simply "reconnects" on new requests after timeout. (Then
> of course what might be the advantage of timing out? ... )
Not clear.
> The disadvantage of IsOpen is the client needs to ask every time prior
> to a database activity. But it is better than the action failing due to
> timeout. The second idea above avoids this repetitive line of code and
> requests to the server.
Igor say that RIGHT NOW, if you do some operation, and it fails you get
exception in languages where they exists or db.err otherwise.
So yes, this is the most effective way.
Although Igor say in current version READ can hang on long time...
We will think how to make this in the best way
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list