Optimal workflow for updating playframework in production

I am trying to find the best workflow for updating my web application running on a playback platform.

I use start script to run it, but what is best for updating the code so that it is as seamless as possible for users?

In Apache + PHP, it is often enough to leave the new * .php files in the directory, and in many cases this change is not even noticeable to the user.

Could you share your workflow to do this using the playback platform?

+7
source share
1 answer

The playback structure is very different from using something like php on apache. Php is interpreted by Apache when the user requests a page. So, all you have to do is change the file to update the site. However, with java (if you do not use .jsp files and even sometimes), the code is compiled in turn, and the web server needs to load it and its libraries at startup. This means that simply replacing newly compiled files will not work. You need to restart the web container or force it to restart the application in order to get the changes. This will always be noticeable to all users who are trying to access the site at the same time as the reboot is completed.

You may have a web server (not necessarily Apache) that points to your current game installation as a proxy server and displays a new version in parallel, then switches your proxy server point to a new version and turn off the old version. This is probably the easiest way to do this and can be scripted.

Another way is to simply have a web application that redirects the user to the application and performs a parallel change like the one above.

Both of these options require some configuration and coding to make them work without problems. However, the work is probably worth it once you have determined that deploying the installation in production becomes very simple.

0
source

All Articles