web应用程序部署和多个版本。

时间:2022-05-13 14:09:30

I'm curious to know how other developers deal with versioning of web-apps and deploying different versions. The fundamental problem is that someone might be using your web-app when you deploy a new version, at which point the Javascript etc they have not he client-side is out of date.

我很想知道其他开发人员是如何处理web应用的版本控制和部署不同版本的。最根本的问题是,当你部署一个新版本时,有些人可能正在使用你的web应用程序,这时他们没有的Javascript等客户端已经过时了。

Versioning the media on the client-side is easy enough, but if you version that you also need to version your business logic and the database, which is where things could get messy...

在客户端上对媒体进行版本控制是很容易的,但是如果您对媒体进行版本控制,您还需要对您的业务逻辑和数据库进行版本控制,这可能会导致混乱……

So I see a couple of ways of dealing with this:

我看到了一些处理这个问题的方法

  1. Display a "Upgrading" notice on the site when deploying a new version.

    在部署新版本时,在站点上显示“升级”通知。

  2. Version tag client-side and reject any submissions to the new version from old client-side sources. Fair enough, but it doesn't really go hand in hand with continuous deployment.

    版本标记客户端并拒绝任何来自旧客户端源的新版本提交。很好,但是它并不能真正与持续部署相结合。

  3. Continuous DB migration - running multiple version of the app at the same time (migrating users to the new version when possible). This would need any updates on the old DB schema to be "forward ported" to the new schema. Seems the most attractive for deployment, but also could be horribly complex.

    连续DB迁移——同时运行多个版本的应用程序(尽可能将用户迁移到新版本)。这需要对旧的DB模式进行任何更新,以便“向前移植”到新模式。看起来是最吸引人的部署,但也可能非常复杂。

  4. Somewhere in the middle of all three.

    介于这三者之间。

I should note that I know worrying about this kind of thing is beyond the needs of most apps, but I was thinking about it and I'm curious to know how others deal with it.

我应该注意到,我知道担心这类事情超出了大多数应用程序的需求,但我正在考虑它,我很想知道其他人是如何处理它的。

1 个解决方案

#1


-2  

There are plenty of tools available for your exact requirements. Like Phing, and Phingistrano. Git also makes it simple but that wont display offline notice and DB deployment . I recommend dont go for auto deployment on live server, use auto deployment on staging and manual deployment on live. Also look for continuous integration on google and try teamcity

有很多工具可以满足您的精确需求。像Phing Phingistrano。Git也使它变得简单,但是不会显示离线通知和DB部署。我建议不要在live服务器上进行自动部署,在staging上使用自动部署,在live上使用手动部署。还要在谷歌上寻找持续集成,并尝试teamcity

#1


-2  

There are plenty of tools available for your exact requirements. Like Phing, and Phingistrano. Git also makes it simple but that wont display offline notice and DB deployment . I recommend dont go for auto deployment on live server, use auto deployment on staging and manual deployment on live. Also look for continuous integration on google and try teamcity

有很多工具可以满足您的精确需求。像Phing Phingistrano。Git也使它变得简单,但是不会显示离线通知和DB部署。我建议不要在live服务器上进行自动部署,在staging上使用自动部署,在live上使用手动部署。还要在谷歌上寻找持续集成,并尝试teamcity