同步框架作为备份/后台数据库 [英] Sync Framework as Backup/Backoffice database

查看:75
本文介绍了同步框架作为备份/后台数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用SQL Express数据库并在客户端PC(以及数据库)上运行的WPF应用程序.该应用程序将由多个客户端使用,但是每个客户端的数据库将包含唯一的记录.该数据库包含文本数据以及图像斑点,因此其大小可能会变得非常大(平均2GB).

现在,我想对数据中心的中央服务器进行最新备份.此外,我想向客户端提供基于ASP.net MVC的后台,这样他们也可以在不访问应用程序本身的情况下从网络上的任何位置操纵数据.

搜寻了一段时间后,我发现了MS Sync Framework,我认为这将是实现此目标的好方法,因为它将创建客户端本地数据库的副本,并且他们将能够修改该副本上的数据,即使本地PC已关闭(在下次启动时同步),也可以同步回本地数据库.

由于已经存在用于许可目的和其他功能的WCF服务,因此我也想将其用于同步,这似乎完全有可能

但是,我在Internet上找到的所有示例都谈到了多个客户端在同一个数据库的副本上工作,然后通过中央集线器或对等方式将它们彼此同步.

我找不到任何示例,但是如何将每个客户端的副本分别保存在服务器上.我想我需要在服务器的SQL上为每个客户端创建一个数据库,并想出一种方法来让WCF使用此数据库.
每个客户端在WCF上都通过其身份验证证书的DN进行标识.

如果这是最好的方法,请告诉我该怎么做,如果有一种方法可以轻松地为服务器上的客户端动态配置数据库(我不想手动设置).我还想知道,当架构更改时,更新所有这些数据库(在服务器和客户端上)的最佳方法是什么?

I am developing a WPF application that uses an SQL Express database and runs on the clients PC (as well as the database). This application will be used by multiple clients but every client''s database will contain unique records. The database contains textual data as well as image blobs, thus its size can become pretty large (2GB on average).

Now I want to make an up to date backup to a central server in a datacenter. Furthermore I would like to provide an ASP.net MVC based backoffice to the clients so they can also manipulate data from anywhere on the net without having access to the application itself.

After searching around for a while I have found the MS Sync Framework and I think this will be a great way to accomplish this, since it will create a copy of the clients local database and they will be able to modify data on this copy that will be synced back to the local db, even when the local PC is turned off (sync on next startup).

Since there is already an WCF service in place for licensing purposes and other functions, I would like to also use this for the sync, which seems perfectly possible

However, all examples I find on the internet speak about multiple clients working on a copy of the same database which is then synced to eachother through a central hub or in a peer to peer fashion.

I cannot find any examples however how I would be able to keep a copy of each client seperately on the server. I suppose I need to create a db on the server''s SQL for each client, and figure out a way to have the WCF use this db.
Each client is identified on the WCF by its authentication certificate''s DN.

Please advice how I could do this, if this would be the best way, if there is a way to easily provision the db for the client on the server on the fly (I don''t want to set these up manually). I am also wondering what then would be the best way to update all these databases (on the server and the clients) when the schema would change.

推荐答案



我有点困惑,如果您想同步所有客户端数据库,那为什么要在服务器上为每个客户端使用单独的数据库?

实际上,Sync框架将在指定的时间间隔同步指定的数据库.可以将其设置为可下载/可上传,或两者都设置.

如果每个客户端需要单独的副本,并且不想在两个客户端之间进行同步,则可以将同步服务指向其他服务器数据库而不是中央数据库.

希望这些信息对您有帮助,

谢谢
-amit.
Hi,

i am bit confuse, if you would like to sync all the client database then why you want separate databases on server for each client ?

Actually Sync framework will synchronize your specified databases at specified interval time. it can be set as downloadable/uploadable or both.

If you need separate copy for each client and do not want to sync between two client then you can point your sync service with different server database instead of central database.

hope this information will helpful to you,

thanks
-amit.


这篇关于同步框架作为备份/后台数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆