Online/Offline mode, abstracted RRS feed

  • Question

  • We are planning an enterprise app.  The basic setup will consist of a winforms client that will connect via remoting to a centralized app-server over a vpn.  We must be able to provide basic functionality even in the event of a network outage.  The plan is to have a local database that is a stripped down version of the main database.  The local database will get updated periodically so it stays roughly in synch with the main database.  The client will be able to switch between online (main database over remoting) and Offline (local database via direct mdac). 

    My initial design is to go with a layer of service interfaces, and implement it twice - one for Online and one for Offline.  The client will just know the service interface and tell a Factory object if it's online or offlien and receive the appropriate implementation.

    This sounds good at first, but I think it's going to be more involved because the really the main variation is at the data-layer, so maybe the domain layer needs to know if it's remote or local?

    Anyone have any comments or advice?


    Thursday, June 1, 2006 4:12 PM

All replies

  • I don't think .NET remoting is a good choice when you want to provide basic functionality even in the event of a network outage. .Net Remoting tightly couples objects from the client and server

    I would advice something like message queuing and services together with a connection manager or you can use what you are saying a local database a connection manager and a synchronization between the server database and the small client database. The domain layer doesn’t have to know if it's connected or not.

    Thursday, June 1, 2006 6:26 PM
  • Hi

    It is not enough to switch to the "off-line" database and to update it everyonce in a while

    You also need to update all the work done offline to the main database (and resolve any conflict etc.)

    You may want to take a look at "Smart Client Offline Application Block" http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/offline.asp

    And/or http://www.codeproject.com/smartclient/Alternative_SOAB.asp


    Friday, June 2, 2006 7:36 PM