本文介绍了实时与Android的应用程序,谷歌驱动器同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道,如果它是利用谷歌驱动器,以执行不同的设备(安卓,iOS的,网络等),不同用户之间的自定义文件的实时同步​​可行的。我说的是类似于谷歌文档的实时协作功能(这是加入对谷歌Wave,我相信工作的结果),但有一个自定义的文档格式。

I'm wondering if it's feasible to utilize Google Drive to perform real-time syncing of custom documents between different users on different devices (Android, iOS, web, etc). What I'm talking about is similar to the real-time collaboration capabilities of Google Docs (which was added as a result of the work on Google Wave I believe), but with a custom document format.

例如,用户将操纵文档数据的Andr​​oid应用程序,而这些变化会显示在实时(或接近)的其他用户的Andr​​oid或Web应用程序,他们已经共享的原始文件与

For example, a user would manipulate data in a document on an Android app, and those changes would show up in real-time (or close to it) in another user's Android or web app that they've shared the original document with.

这是一些谷歌驱动器和谷歌驱动器SDK旨在处理?

Is this something that Google Drive and the Google Drive SDK are designed to handle?

推荐答案

您将不得不使用自己的逻辑这一点。在这里复杂性是推动实时变化,做到以高效满耳,所以你可能会只发送文件的不同之处或更好的发送操作转换到连接的客户端这是不容易做到。谷歌驱动器仅仅是存储整个文件,所以你的情况,你会用它来存储所有并发的编辑的汇总结果。

You will have to use your own logic for this. The complexity here is to push real time changes and do it in an efficient maner, so you would probably only send diffs of the file or even better send operational transformations to connected clients which is not trivial to do. Google Drive is simply for storage of entire file so in your case you would use it to store the aggregated result of all of the concurrent edits.

从技术上讲,为web应用程序,你可能会不得不经常使用网络插座或长轮询技术或轮询(我不能帮你为Android在这一个)。

Technically, for the web app, you would likely have to use web-sockets or long-polling techniques or polling frequently (and I can't help you for Android on this one).

如果你有兴趣我会通过阅读这篇启动: http://en.wikipedia.org/wiki / Operational_t​​ransformation

If you are interested I would start by reading this: http://en.wikipedia.org/wiki/Operational_transformation

这篇关于实时与Android的应用程序,谷歌驱动器同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-03 01:15