在 Web 应用程序中与客户端同步数据和图像

发布于 2024-10-08 11:44:41 字数 474 浏览 9 评论 0原文

我正在用 PHP 编写一个 Web 应用程序,它需要存储图像和图像元数据。将来,应用程序可能需要在客户端上离线工作。用户可能需要在前往无法访问互联网的偏远地区之前将所有图像和数据下载到他的笔记本电脑上。在远程位置时,用户可以将新图像添加到系统中,并能够将它们与图像数据库的本地副本进行比较。当返回到可以访问互联网的区域时,用户将运行同步操作,将其新图像复制到服务器并检索任何新图像。

我查看了 HTML5 中新的 Web 存储/本地存储选项(Web sql 数据库似乎已被删除),我认为这太有限了,因为只有 5MB 空间,一两个图像很容易超过这个空间。

我想要做的事情真的可以通过基于浏览器的 Web 应用程序实现吗?或者我应该考虑为没有网络访问权限的用户编写具有本地文件存储功能的桌面/平板电脑应用程序。最初,它确实需要是一个网络应用程序,我只是想提前思考。我将来会通过从一开始就使用 couchDB 之类的东西作为后端来为自己提供更多选择吗?据我了解,这具有良好的同步功能。

谢谢,

I'm writing a web application in PHP which needs to store images and image meta data. In future, the application may need to work offline on the client. A user might need to download all the images and data to his laptop before going to a remote area without internet access. Whilst at the remote location the user could add new images to the system and be able to compare them with his local copy of the image database. When returning to an area with internet access, the user would run a sync operation which would copy his new images to the server and retrieve any new ones.

I've looked at the new web storage / localstorage options in HTML5 (web sql database seems to have been dropped) and I think this is going to be too limited as there is only 5MB space and one or two images could easily exceed that.

Is what I want to do actually possible / practical with a browser-based web application? Or should I be looking at writing a desktop/tablet application with local file storage capabilities for users without net access. Initially, it does need to be a web application, I'm just trying to think ahead. Will I give myself more options in future by using something like couchDB for the backend from the start? As I understand it, this comes with good syncing functionality.

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文