SyncML(同步还是更新?)
我面临着另一个困境,关于从移动设备(使用 Android)将数据同步(或更新?)到服务器。
我已经将 SyncML 作为执行此操作的标准,但我最关心的是我们计划同步大量数据(不仅仅是 1 条记录),并且可能只执行一次,一天两次或最多 3 次,或者甚至一天一次都不行 - 所有这些都取决于特定情况。
另一件事 - 设备或服务器仍然能够正常运行,而无需进行同步。本质上,同步只是一个更新
。
通过阅读 SyncML 规范,它更适用于小块数据的同步,并且间隔非常快(即每 5-15 分钟一次,但我想可以由用户调节)。无论如何,同步过程更加复杂,并且对于设备和服务器都很重要(我猜设备更是如此)。
以下是文档中的一段引言,引起了我的思考:
2.2.3 数据同步 SyncML面向的是数据同步 小的独立记录,如 修改记录被传输 完全。这足以满足地址要求 条目、短消息和类似内容 数据。关于SyncML的主要目标, 移动设备,大部分数据都是这样的 类型。这些设备必须能够保持 跟踪他们的哪些记录已被 改变了。每条记录都由一个标识 唯一的ID,因此可以检测到冲突 很简单。由于记录 ID 可能 不是任意选择的,而是 自动创建,之间的映射 服务器和客户端 ID 定义在 协议。映射始终是 由服务器管理。当客户 从服务器接收一个新项目, 他可以发送地图更新命令到 告诉服务器他分配了什么ID 该项目。现在服务器使用 他所有消息中的客户端 ID。
所以,我想我的问题是,我们是否应该继续为此研究 SyncML,或者构建一个内部解决方案 - 也许更适合交付大量数据,并且也可以定义它?
I'm faced with another dilemma, with regards to synchronizing (or updating?) data across to the server, from a mobile device (using Android).
I've looked into SyncML as the standard for doing this, but my big concern is that we plan on syncing
a large amount of data across (not just 1 record), and probably only doing it once, twice or at most 3 times a day, or maybe not even once a day - all dependant on certain circumstances.
The other thing - the device or server will still be able to function properly without having to sync across. The sync would just be an update
, essentially.
From reading up on the SyncML specs, it applies more to syncing across small pieces of data, and at a very fast interval (ie. every 5-15 minutes, but I guess can be regulated by the user). At any rate, the synchronization process is more involved, and important for both the device and the server (more so the device, I guess).
Here's a quote from the documentation that got me thinking:
2.2.3 Data synchronization SyncML is oriented towards synchronization of
small independent records, as the
modied records are transmitted
entirely. This is adequate for address
entries, short messages and similar
data. On the primary target of SyncML,
mobile devices, most data is of this
type. The devices must be able to keep
track which of their records have been
changed. Each record is identied by a
unique ID, so con icts can be detected
quite simple. As the record ID's may
not be arbitrarily chosen but
automatically created, mapping between
server and client ID's is dened in
the protocol. Mapping is always
managed by the server. When the client
receives a new item from the server,
he can send a map update command to
tell the server what ID he assigned to
the item. Now the server uses the
client ID in all his messages.
So, I guess my question is whether we should continue to look into SyncML for this, or built an in-house solution - maybe something more tailored to delivering large pieces of data across, which can define it as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也面临着这个问题。我更喜欢
syncml
解决方案,主要是因为它更具可扩展性。我们要同步的数据表是不确定的,
syncml
可能是更好的选择。I'm faced with the problem too. I prefer
syncml
solution, mainly because it's more extensible.The data tables we want to sync are indeterminate,
syncml
may be a better choice.