Subject Detecting unavailable server
Author sasidhardoc
I am developing an application using FB 2.5 and the .NET provider. In addition to usual Db operations, the application subscribes to database events which are used to trigger UI refreshes etc
Since some of the users use wireless connections, I would like to be able to detect unavailable database connection & notify user. I can think of 3 ways to do this - comment and suggestions are welcome.
1. Frequently poll the db and try to connect. Easiest way but in reality I will have a couple of hundred clients frequently trying to connect to the Db
2. Start a connection and transaction, keep alive for the duration of application, periodically try to run a query. Not sure if this is much better than 1 except that I am not opening and closing
3. Use a server side application to post a heartbeat event. Have all clients subscribe to this event