设备/服务器开发中的版本控制

发布于 2024-11-27 21:18:28 字数 283 浏览 0 评论 0原文

我正在开发设备应用程序,我们将向设备部署一些最小的设备特定代码,并且该组件将从我们的后端服务器动态加载其余资源(javascript、图像等)。这样我们就可以更频繁地升级应用程序,而不必过多依赖设备升级。在某种程度上,这类似于一些 iPhone 开发者希望通过更快的升级来避免应用程序审批周期。

设备中的代码应该能够检测到服务器代码上的新升级,但仅限于当我们也​​需要升级设备代码时,因此我们可以支持分阶段推出(一次升级 10% 的设备) , ETC)。

我确信有些人已经这样做了。您能分享一下您对此的想法和最佳实践吗?

I am working on device applications, that we will deploy some minimum device specific code to the device, and this component will dynamically load the rest of resources (javascript, images, etc) from our backend server. That way we can upgrade the app more often without depending too much on the device upgrade. In a way, this is similar to some iphone developers who want to avoid the app approval cycle with faster upgrades.

The code in device should be able to detect new upgrades on the server code, but only to a point, when we need to upgrade the device code as well, so we can support phased roll-out (upgrade 10% of devices at a time, etc).

I am sure some folks have already done this. Could you share your thinking and best practices on this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橪书 2024-12-04 21:18:28

一种方法是应用程序有一个轮询过程,询问服务器是否有特定资源的新版本。

然后,服务器可以完全控制谁获得升级,谁不升级(“phone-home”的一部分可能包括当前版本),这将允许您强制执行“仅 X% 的客户端获得升级”功能。您可能还希望包含“降级”功能,以便在前 10% 中看到太多错误时可以回滚。

这本质上是 Web 浏览器在缓存中有资源但该资源可能已过期时所做的操作。他们说“嘿,服务器,我有这个资源,是我在 XYZ 日期从你那里得到的。如果它发生了变化,请给我一个新的,如果没有,请告诉我。”服务器要么发回“尚未更改”响应,要么发回“这是新的”响应。

One way would be for the application to have a polling process that asks a server if there is a new version of a particular resource.

The server then has complete control over who gets the upgrades and who doesn't (part of the "phone-home" could include the current version), and that would allow you to enforce the "only X% of clients get upgraded" capabilities. You may also want to include the ability for things to get "downgraded" so that you can roll back if you see too many errors in the first 10%.

This is essentially what web browsers do when they have a resource in the cache but it may have been expired. They say "Hey, Server, I have this resource that I got from you at XYZ date. If it's changed, give me a new one, if not, let me know." and the server either sends back a "Hasn't Changed" response, or a "Here's the new one" response.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文