云数据库 (WCF) 还是带有 Microsoft Sync 的偶尔连接架构?
我正在开发 .NET 4 Winforms 应用程序,并且在决定处理数据库的最佳方法时遇到问题。我们希望提供一个云数据库系统,应用程序可以通过 WCF 服务与“云”进行通信,并且本质上执行与连接到本地数据库(本地 SQL Express,服务器上的 SQL Server 2008 R2)相同的操作。
我们看到两个选项:
1)使用 WCF 并对云数据库进行所有调用 2) 使用本地数据库并使用 Microsoft Sync Framework 来保持云同步
我们最终将拥有一个 Web 应用程序,它也将使用云数据作为用户的另一个前端。
困境显然是使用哪一个。如果我们选择选项 1,那么我们就不必在使用该软件的任何地方(例如公共位置)安装 SQL Express,并且用户的数据可以下载到该数据库。 WCF 选项允许所有数据保持集中。
我们最终将折叠移动设备,以便 iPhone、iPad 和 Android 也可以与云同步。
我对您对严格云数据库选项与偶尔连接选项(即数据库是本地的、同步到云)的看法感兴趣。
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想允许离线/偶尔连接的场景,为什么不根据需要简单地选择选项 1) 和 2)?如果您通过 WCF 使用相同的 n 层架构来访问数据库,无论数据库位于何处(云或本地数据库),您的代码将始终相同,唯一的区别是偶尔连接的应用程序会同步数据(也可能是通过 WCF)。
同步与直接访问的一个问题是它不是实时的,即其他用户将访问和更新数据,您通常必须考虑如何处理冲突等。如果没有真正的需要(有时连接是主要原因) )对于离线功能,我只选择 1)。从上面还不清楚您将存储什么类型的数据、是否是特定于用户的以及数据可能有多大,但这些都是使用同步时非常现实的问题,特别是在安全性和性能方面。
如果您可以提供有关解决方案具体用途的更多信息,也可能会有所帮助。
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.