如何与 ruby on Rails 应用程序进行在线/离线同步?
有什么方法可以与 Rails 项目进行离线同步吗?
换句话说,我们的客户正在使用他们的网站来展示照片库,但他们需要能够在没有有效互联网连接的情况下做到这一点。他们可以随时恢复在线并下载任何新数据,以便能够继续展示他们的画廊?
谢谢!
Is there any way to do offline syncing with a rails project?
In other words, our client is using their site to show a photo gallery, but they need to be able to do it without an active internet connection. At any time, they can get back online - and download any new data - to be able to continue showing their gallery?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须创建一个 JavaScript 客户端应用程序,将更改和状态存储在 HTML5 本地存储中。因此,对于用户来说,他可以执行操作,这些操作可以稍后保存/同步到服务器(例如,当他再次连接到互联网时)。
Sproutcore 将是理想的选择。我不确定是否有任何即将推出的 javascript 库(Backbone.js、spine.js)与本地存储交互。
希望这有帮助。
You will have to make a javascript client application, that stores changes and state inside the HTML5 local storage. So for the user he can do actions, which can be saved/synced later to the server (e.g. when he is connected to the internet again).
Sproutcore would be ideal for this. I am not sure if any of the up and coming javascript libraries (Backbone.js, spine.js) interact with local storage.
Hope this helps.
我决定使用rack-offline,但没有人回答。
如果有人感兴趣,可以在 github 找到它。
I have decided to use rack-offline, but no one answered it.
It can be found at github if anyone is interested.