问题
I want to build a mobile web app with transparent offline and sync support for collaborative persistent data. I am considering using Google Drive Realtime API for the backend. How well is offline and sync supported by the API? Does it just work "automagically" from the included API scripts, or should I use some "plugin"? I have searched the documentation without luck.
What I mean by offline and sync support is that, when offline, it should be possible to
- edit the latest synced version of a document/object previously retrieved from the server
- create new documents/objects
- store all documents/objects locally
As soon as the app goes online again, all modifications and new docs/objects stored locally should be "merged" or "synced" with the server versions.
回答1:
There is no explicit offline support. The API will deal well with flaky internet connections, but you can't load or create entirely offline.
I'm not sure what you mean by sync support, but if you have an internet connection it will automatically sync changes from collaborators and persist them on the server.
来源:https://stackoverflow.com/questions/25259074/google-drive-realtime-api-offline-and-sync-support