How to detect that remote DB is down (notify user) RRS feed

  • Question

  • Hey

    I am learning about MS Sync Framework. I went through "Walkthrough tutorial" and I get the basic idea.
    Link to tutorial: http://msdn.microsoft.com/en-us/library/dd420781.aspx

    Here is what's on my mind right now.

    Let's say I have a sample application that works with remote database.
    According to the tutorial I mentioned before, my application works even when connection to remote database is lost.
    If I understood everything right, then the basic idea is:
    Write/read from the local cache and when you make changes save them locally and start synchronization process (to sync local cache and remote database).

    What I want to do is:
    1. write to remote database if available (if not, write to local cache)   [here is the difference in tutorial --> I think app is normally writing to local cache]
    2. when writing to remote database is not possible, notify user (optional) that from now on all data will be stored in local cache only
    3. in the mean time my app should trying to reach the remote database
    4. when remote database is back online and reachable then synchronzation process should start (and again user can be notified about it)

    My question is:
    At what points (1 - 4 above) Synchronization framework makes my life easier?
    Besides that it has implementation of synchronization process, conflict manager,... which is a big advantage.

    Links to Examples, Tutorials,... are very welcome

    Monday, January 11, 2010 11:04 AM


  • All your requirement is actually at the Sync Application level.

    Here is the suggested way.
    1. Make data change to the local data store (offline).
    2. Have a background thread running and constantly check the SERVER's availability.
    3. Once the server connection is available and the local change is done, use Sync Framework capability to sync from local cache to the remote server.

    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, January 29, 2010 2:18 AM