本文介绍了离线/在线数据同步设计(Javascript)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用所有html5的好友进行脱机webapp的脱机支持。但是,我现在开始考虑编写同步模块,以确保将任何脱机数据发送到服务器和服务器数据回到客户端。现在我确信这已经完成了,我的意思是它的一个漂亮的经典设计问题影响移动设备和其他许多事情。所以我想知道任何人可以指出一些这样的东西的好的设计资源?

I'm currently in the process of writing an offline webapp using all the html5 goodies for offline support. However I'm starting now to think about writing the sync module that will ensure that any offline data gets sent to the server and server data back to the client. Now I'm sure this has been done before, I mean its a pretty classic design issue that affects mobile devices and a plethora of other things. So I'm wondering can anyone point me to some good design resources for this kind of thing?

现在我真的不需要太复杂这个,我的意思是我不会处理多个用户访问相同的数据,我很高兴不会合并冲突(只是采取最新的),但我仍然希望将来允许我的这些选项的设计。

Now I really do not need to be too sophisticated with this, I mean I'm not handling multiple users accessing the same data and I'm happy not to merge conflicts (just take the latest) but still I would like a design that will allow me those options in the future.

另外,是否有任何实现这种类型的东西的开源项目?我不是在剥夺别人的代码(如果许可证允许),我很高兴港口。

Also, are there any open source projects implementing this type of thing? I'm not above ripping off someone else's code (if license allows) and I'm happy to port.

推荐答案

我的计划对于类似的设计(尚未尝试)是使用像这样的东西在本地存储数据,然后同步它与一个遥控的沙发实例。

My plan for a similar design (not yet tried) is to use something like PouchDB to store the data locally and then sync it with a remote couch instance.

这篇关于离线/在线数据同步设计(Javascript)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 10:23