“从不在线”/始终“离线”/断开连接的客户端的同步 [英] Synchronization for 'never online' / always 'offline' / disconnected clients

查看:93
本文介绍了“从不在线”/始终“离线”/断开连接的客户端的同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


在我们的项目中,我们需要能够同时实施:基于文件的同步和基于服务的同步。 它旨在用于启用
连接或禁用/不允许的环境。禁用时我们应该能够交换文件(便携式媒体:usb内存,CD等)


同步也应该是双向的,尽管在每个方向上流动的数据都是独立的,这意味着冲突解决问题不在桌面上。


客户端数据存储可以是XML或SQL Server CE。在服务器端,我们将使用MS SQL Server 2008.


从理论上思考,我们需要的是:包含更改的格式化文档,(de)两侧的序列化程序(客户端和服务器)和交付服务。 (解)序列化器应该能够消费/生成文件和交付服务,如果
要么联系我们的基于Web的服务,要么在可用媒体上准备文件 - 具体取决于场景。


<我知道我们可以构建一个非常漂亮的自制轮,并且相信这可以在WCF上实现,但我正在努力避免这种情况。


如果你对SyncFx如何帮助有所了解,请感谢如果连接被禁用/不允许。


谢谢!


PS


我们使用的是sql之前的服务器合并复制,但因为订户和分销商都必须在线才能进行同步而不是一个选项。


一切皆有可能

解决方案

您好,


您可以考虑使用SyncFx数据库提供程序来构建此方案。根据我目前对您的方案的理解,有两种可能的模式。


设置:


   1.使用Collaboration SqlSyncProvider for Server。服务器是SQL Server 2008。


   2.将Collaboration SqlCeSyncProvider用于客户端。客户端使用SQL CE存储。


模式一(2个同步副本):


   1.始终将SQL CE数据库存储在便携式设备中,例如USB密钥


   2.如果连接可用,请通过Web服务将客户端与服务器同步。如果没有,请拔下USB 来自本地计算机的密钥并将其插入服务器计算机以在本地同步。


 


模式二(3个同步副本):


  1.将SQL CE数据库存储在客户端本地计算机中,并在便携式设备中使用另一个SQL CE数据库


  2.如果连接可用,请通过Web服务将客户端与服务器同步。如果没有,请将客户端数据库同步到便携式设备中的ce数据库。


  3.将便携式设备连接到服务器计算机并同步。  


  4.将便携式设备连接到客户端计算机并进行同步。


如果您还没有尝试过SyncFx数据库提供程序,请查看MSDN(http://msdn.microsoft.com/en-us/library/bb902854(v=SQL.110).aspx ) 和示例( http://code.msdn.microsoft.com/site/search?f%5B0%5D。 TYPE = SEARCHTEXT&安培; F%5B0%5D.Value =微软%20Sync%20Framework&安培; F%5B1%5D.Type =所属&安培; F%5B1%5D.Value =官方&安培; F%5B1%5D.Text =微软) 链接。


谢谢,



 


 


 


 


Hi,

In our project we need to be able to implement both: file-based and service-based synchronization. It is intended to be used in environments where connectivity is enabled or DISABLED/NOT ALLOWED. When it is disabled we should be able to exchange files (portable media: usb memory, CD etc)

The synchronization should also be bi-directional, although the data flowing in every direction is independent which means that conflict resolution problem is off the table.

The client data storage can be XML or SQL Server CE. On the server side we will use MS SQL Server 2008.

Theoretically thinking, what we need is: formatted document(s) containing changes, (de-)serializers on both sides (client and server) and a delivery service. The (de-)serializers should be able to consume/produce documents and delivery service should either contact our web-based service or prepare files on available media - depending on the scenario.

I understand we can build a very nice home made wheel and believe that is possible on WCF, but am trying to avoid that.

Appreciate if you shed some light on how SyncFx could help in case when connectivity is disabled/not allowed.

Thank you!

P.S.

We used sql server merge replication before, but because both, subscriber and distributor have to be online to do a sync that is not an option.


Everything is possible

解决方案

Hi,

You may consider using SyncFx database provider to build up this scenario. There are two possible patterns just based on my current understanding to your scenario.

Setup:

   1. Use Collaboration SqlSyncProvider for Server. Server is SQL Server 2008.

   2. Use Collaboration SqlCeSyncProvider for client. Client uses SQL CE store.

Pattern one (2 sync replicas):

   1. Always store the SQL CE database in a portable device such as a USB key

   2. If connection is available, sync client with server through your web service. If not, pull the USB  key from your local machine and plug it into your server machine to sync locally.

 

Pattern two (3 sync replicas):

  1. Store SQL CE database in the client local machine, and have another SQL CE databse in the portable device

  2. If connection is available, sync client with server through your web service. If not, syncing client ce database to the ce database in the portable device.

  3. Connection the portable device to the server machine and sync.  

  4. Connection the portable device to client machine and sync.

If you haven't try the SyncFx database providers yet, please look at the MSDN (http://msdn.microsoft.com/en-us/library/bb902854(v=SQL.110).aspx) and sample (http://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&f%5B0%5D.Value=Microsoft%20Sync%20Framework&f%5B1%5D.Type=Affiliation&f%5B1%5D.Value=Official&f%5B1%5D.Text=Microsoft) links.

Thanks,

Dong

 

 

 

 


这篇关于“从不在线”/始终“离线”/断开连接的客户端的同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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