计算对象三角洲 [英] calculate object delta

查看:117
本文介绍了计算对象三角洲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个应用程序,客户端和服务器共享一个对象模型,对象图可以变得相当大了。

I am working on an application where client and server share an object model, and the object graphs can become rather big.

要保存对象从客户端到服务器,我非常希望只发送差异过线,最大限度地减少网络流量。我可以拉原来的对象图中的服务器和三角洲适用于它

To save an object from client to server, ideally i would like to send only the difference over the wire, to minimize network traffic. I can pull the original object graph on the server and apply the delta to it

想知道是否有任何工具或项目在那里,或是否有人曾与做这样的事的经验。

Wondering if there are any tools or projects out there or if anyone has had any experience with doing such a thing ..

非常感谢

推荐答案

在previous的工作,我们有我们想要的客户端之间共享大型3-D模型。要保存实际的模式的转变是不可能给出模型的大小和带宽的限制。

At a previous job, we had large 3-D models that we wanted to share between clients. To save actual model changes would have been impossible given model size and bandwidth restrictions.

,我们选择对数据序列化的操作的。例如,操作可以是{切面:(PT1,PT2,PT3)},或{钻孔(点,半径,深度)}。这个工作非常适合我们的应用程序,虽然它可能不适合您的机型。

Instead of sending the whole changed model, we opted to serialize operations on the data. For example, an operation might be {CUT plane: (pt1, pt2, pt3)}, or {DRILLHOLE (point, radius, depth)}. This worked great for our app, though it might not be appropriate for your model.

另外,在计算哈希值或时间戳马修的建议是一个很好的一个。另外,也许你可以保留的唯一键的哈希表,以便在服务器知道哪些是删除,这增加了。

Also, Matthew's suggestion of calculating hashes or timestamps is a good one. Also, maybe you could keep a hashtable of unique keys so the server knows which ones were deleted and which were added.

这篇关于计算对象三角洲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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