From: David J. <dav...@di...> - 2002-12-14 02:49:01
|
On 2002.12.13 13:57:02 -0500 Pavel Cisar wrote: > David, > > On 13 Dec 2002 at 10:02, David Jencks wrote: > > > Resource manager == database == firebird engine:-) > > Ah, I see :-) > > > While it might be possible to put a timeout manager on the client side > of > > the connection, I dont' think there is any way to make it as reliable > as > > putting it on the engine/server side. I think there will always be > some > > failure modes where the connection is not killed but the remote timeout > > manager stops working. > > There should not be any such modes that will leave the dead connection > open forever. Server should always notice, sooner or later, that > connection is dead/broken. Of course, this doesn't solve the problem when > > client gets a connection and then goes to infinite loop. I agree that we > should handle that in some way, to prevent malicious code or DOS attacks, > > but this is still IMO related to connections, not transaction level. > > > I think your argument at root is that the "lost connection" detection > by > > firebird is sufficient to detect problems. I dont' completely know > how > > this works but think it is based on a heartbeat of some kind, pinging > the > > clients. is this correct? > > Yes (see my reply to Ivan in this thread). Actually, the code is pretty > tricky and depends on some assumptions about connection behaviour at OS > level. I have my doubts about the quality of this code and its design, > because I saw over years many different kind of troubles tracked to it in > > some way. > > > I still think that transaction timeouts would be a really useful and > > standard feature, although they don't appear to fit in the Delphi > > transaction model if I remember correctly. > > First, what's the definition of "timeout" ? Total amount of time ? Total > time of inactivity ? I am to some extent still learning, but I think it is total time since transaction started. > > What's more important to you, transaction or connection timeout ? Right now, since I am working on the jboss tm, I'm thinking more about transaction timeouts. Thinking about it I think connection timeouts are useful too. How about considering the JINI renewable lease model for them: a client requests a lease for a particular length of time, and the server can grant a lease for that length or less. If the client decides it needs the resource for longer, it has to renew the lease periodically with the server, the server can again decide if and for how long it will grant the lease. I dont' know how hard it would be to implement in C++ but it seems very elegant and effective in JINI in java. BTW as I recall JINI also has leases on transactions for their timeout model. This would be fine with me also since it is even more flexible than the simple timeout model. It does seem to involve some asynchronous communication (sending lease renewals while you are waiting for a query to complete). Thanks david jencks > Connection timeout is there already, and could be improved (for example: > closing connection after some time of inactivity at FB protocol level). > > Best regards > Pavel Cisar > http://www.ibphoenix.com > For all your upto date Firebird and > InterBase information > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Firebird-devel mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-devel > > |