Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 6 of 6 total |
Best way to deal with network disconnect/reconnects on a local database on network drive? |
Fri, Nov 11 2016 1:42 PM | Permanent Link |
Robert D. Smith | I have a few users who use notebooks with docking stations. I have them set to automatically shutdown the wireless connection when docked to ensure the quickest network speeds. When they undock, the hardwired connection is severed and the wireless then kicks in.
However, a lot of times, they will have my application open and when this occurs, the application becomes unresponsive due to the application no longer being able to see the actual database/network drive. I'd like to do something similar to the following: 1. When the database is no longer responsive, close the database. 2. When it is available again, automatically reconnect. I've thought about using something like the INDY IPAddrMon component to monitor the IP address and then close the database on loss of connection, but was wondering if there was anything I could do utilizing any existing events in DBISAM without adding any additional overhead to my application, or if you had any other suggestions? Thanks! |
Fri, Nov 11 2016 8:16 PM | Permanent Link |
Raul Team Elevate | On 11/11/2016 1:42 PM, Robert D. Smith wrote:
> 1. When the database is no longer responsive, close the database. > 2. When it is available again, automatically reconnect. > I've thought about using something like the INDY IPAddrMon component to monitor the IP address and then close the database on loss of connection, but was wondering if there was anything I could do utilizing any existing events in DBISAM without adding any additional overhead to my application, or if you had any other suggestions? AFAIK you have to pretty much roll this yourself as DBISAM local connections do not have supervision (like remote connection has ping capability). I think only time you will know something is wrong is when you start an operation and it times out with an error. You could look at making the timeouts shorter (not even sure whether LockWaitTime and LockRetryCount would be ones to use or if this s OS level timeout). So the trick is to know "when" part - IpAddrMon sounds like a reasonable idea. Win 8 and newer also have the NetworkStatusChanged callback event one can register for (not sure what Indy uses). However even then if you start closing database only after network goes away you might still have timeouts. Remote session with dbsrvr solves pretty much all of these problems but of course would require setup with server/pc running the dbsrvr. Raul |
Sat, Nov 12 2016 3:00 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Robert
Whilst it may be technically feasible to do what you want(I don't know because I haven't tried it) as far as the network is concerned you also have the problem of are any of the users daft enough to pull the notebook from/ insert the notebook to the docking station in the middle of a database operation which could cause corruption. Like Raul I think moving to c/s could be a solution. Without experimenting I think switching between wireless and wired should work using the engine server disconnect/reconnect events. Roy Lambert |
Tue, Nov 15 2016 1:32 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Robert,
Raul is correct - your best solution in this case is to use the DBISAM Database Server, even if just for a few users. It can handle interrupted connections with transparent reconnections, which is essentially what you need. Tim Young Elevate Software www.elevatesoft.com |
Wed, Nov 16 2016 3:17 PM | Permanent Link |
Robert D. Smith | Thanks all for your suggestions! I'll look at porting this application to C/S in the near future! My current DBISAM server is a bit on the old side, so I'll need to look at moving it to a new system.
For the time being, I've gotten the IP Address Watch to work. Essentially, when an adapter loses its IP address, it throws an error message to the user and closes the application. Definitely not the best solution, but it's something until I can port it (unfortunately, that means porting 3 different applications). Tim Young [Elevate Software] wrote: Robert, Raul is correct - your best solution in this case is to use the DBISAM Database Server, even if just for a few users. It can handle interrupted connections with transparent reconnections, which is essentially what you need. Tim Young Elevate Software www.elevatesoft.com |
Thu, Nov 17 2016 3:20 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Robert
Porting should be pretty easy. Unless you currently use lost of tables and want to shift over to lots queries its almost just set it to use a remote rather than a local session. Table based c/s may not be as effective as query based but it works. I can say this categorically for ElevateDB because I did it for my main app. I spent quite a lot of time timing a few operations and in my highly table based program c/s was not quite as fast as f/s (talking c10% might have been less but I can't remember) over wired connections but a lot faster over wireless. I have a simple 1 line txt file that specifies either {C/S}server or fully qualified path to the config and my program works out which to use from that. It should take you less than a day to make the changes and test. Roy Lambert |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |