Cloud database (WCF) or Occasionally Connected Architecture with Microsoft Sync?

757 Views Asked by At

I'm working on a .NET 4 Winforms app and I'm having a problem deciding on the best way to handle the database. We want to offer a cloud database system where the app can communicate with the "cloud" via WCF services and essentially do the same thing as connecting to the local database (SQL Express locally, SQL Server 2008 R2 on the server).

We see two options:

1) Use WCF and make all calls to the cloud database 2) Use the local database and use Microsoft Sync Framework to keep the cloud in sync

We will eventually have a web application that will also use the cloud data as another front end for the user.

The dilemma is obviously which to use. If we go with Option 1 then we don't have to have a SQL Express installation everywhere the software is used, such as a public location and user's data may be downloaded to that DB. The WCF option allows all data to remain central.

We will eventually fold in mobile so iPhone, iPad, and Android can sync with the cloud as well.

I'm interested in your opinions on a strictly cloud database option vs. the occasionally connected option, i.e. database is local, synced to cloud.

Thank you.

1

There are 1 best solutions below

0
On

If you want to allow for offline/occassionally connect scenarios, why not simply go for both option 1) and 2) as needed? If you use the same n-tier architecture via WCF for accessing the database regardless of where it is (cloud or local db) your code will always be the same, the only difference will be that the occassionally connected application would sync data (also presumably via WCF).

One issue with synching vs direct access is that it's not real time as such, i.e. other users will be accessing and updating data and you normally have to consider how to handle conflicts etc. If there is no real need (sometimes connectivity is the main reason) for offine functionality I would just go with 1). It's also not clear from the above what type of data you would be storing, if it is user specific and also how large the data could be, but again these are very real concerns when use synching especially when it comes to security and performance.

If you can supply more information on exactly what the solution is going to do it may help as well.