设备/服务器开发中的版本控制 [英] Versioning in device/server development

查看:29
本文介绍了设备/服务器开发中的版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

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

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?

推荐答案

一种方法是使应用程序具有轮询过程,该过程询问服务器是否存在特定资源的新版本.

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.

然后,服务器可以完全控制谁获得升级以及谁没有升级(电话回家"的一部分可能包括当前版本),这将使您能够强制只有X%的客户端获得升级".升级"功能.您可能还希望包括使事物降级"的功能,以便在前10%看到太多错误时可以回滚.

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%.

从本质上讲,这是Web浏览器在高速缓存中具有资源但可能已过期时会执行的操作.他们说:嘿,服务器,我有从XYZ日期起从您那里获得的资源.如果更改了,给我一个新资源,如果没有,请告诉我."然后服务器要么发回未更改"响应,要么发回这里是新的"响应.

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.

这篇关于设备/服务器开发中的版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆