简体   繁体   English

web 应用程序的动态更新

[英]Dynamic Update of web application

Currently I'm working on a business plan for a new company I'm looking into, I have been made the lead programmer within this new venture and so I have been coming up with some ideas for the project.目前,我正在为我正在寻找的一家新公司制定商业计划,我已成为这家新企业的首席程序员,因此我一直在为该项目提出一些想法。

Once of the ideas that I have had has got me a little stumped in the best way to handle it, the idea is to have a central management server dedicated to the control of client applications.有一次我的想法让我对处理它的最佳方式感到有些困惑,这个想法是有一个中央管理服务器专门用于控制客户端应用程序。

Basically we have ~1K Client's all running our client application on there server, When we issue a patch for the system the main server will connect to each client and get it's basic information such as version, disk space etc., then we push the new updates accordingly.基本上我们有大约 1K 客户端都在服务器上运行我们的客户端应用程序,当我们为系统发布补丁时,主服务器将连接到每个客户端并获取它的基本信息,例如版本、磁盘空间等,然后我们推送新的相应地更新。

Now I know that I can simply have a script that overwrites the files but that's too un-professional and it will not suffice, so basically what I am asking is:现在我知道我可以简单地拥有一个覆盖文件的脚本,但这太不专业而且还不够,所以基本上我要问的是:

What ways is there for me to update ~1K client applications taking into consideration important facts such as server loads, version control, update history?考虑到服务器负载、版本控制、更新历史等重要事实,我有什么方法可以更新约 1K 客户端应用程序?

One thought that I have had is to use something like GitHub to manage the revisions but I'm not massively knowledgeable of how to go about that.我的一个想法是使用 GitHub 之类的东西来管理修订,但我对如何 go 知之甚少。

Any advice is appreciated, kind regards.任何建议表示赞赏,亲切的问候。

I would guess that the best way to handle such situation would be to build the update mechanism into the client app itself.我猜想处理这种情况的最佳方法是将更新机制构建到客户端应用程序本身中。 Then, when the update is ready, you can have your main mgmt server connect to clients and notify them that the update is available.然后,当更新准备就绪时,您可以让主管理服务器连接到客户端并通知他们更新可用。

Rather than overwriting the files from the server without any regard for what the clients may be doing at the time, this way each client would then be able to get the update and install it when it is best to do so.与其从服务器覆盖文件而不考虑客户端当时可能在做什么,这样每个客户端都可以在最好的时候获取更新并安装它。

The sequence would then be like this:然后序列将是这样的:

  1. Server notifies client that an update is available服务器通知客户端有可用更新
  2. Client completes whatever task it's doing客户完成它正在做的任何任务
  3. Client retrieves and installs update客户端检索并安装更新
  4. Client notifies the server of the installation status (success/failure) and any errors that have occurred during the installation客户端通知服务器安装状态(成功/失败)和安装过程中发生的任何错误
  5. Server records the installation info in some sort of history.服务器在某种历史记录中记录安装信息。

We have utilised this mechanism in one of the projects I worked on a little while ago, although there were only a handful of clients (less than 20) - and it worked very well.我们在我不久前参与的一个项目中使用了这种机制,尽管只有少数客户(不到 20 个)——而且效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM