Re: Continuous Integration Atomic Deploys and PHP 5.5

From: Date: Sat, 23 Mar 2013 22:26:42 +0000
Subject: Re: Continuous Integration Atomic Deploys and PHP 5.5
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-66773@lists.php.net to get a copy of this message
On 03/23/2013 03:01 PM, Ferenc Kovacs wrote: > realpath the document root(which is a symlink to the actual release > directory) from your index.php/bootstrap file and use that as a base > path for making absolute paths everywhere? > that way the requests started before the symlink switch will continue > with the old version but requests started after the switch will use the > files from the new revision. > ofc. you can still have issues like an ajax request from the old version > gets served by the new version, and if you have more than one server > sooner or later you will/have to sacrifice something from the CAP trio. Well, solving the multi-request/multi-server ajax scenario is a bit of a different problem. You'd need to version those requests to handle that. The scope I am concerned with here is per-server deploy atomicity. But yes, some way to have a 2-docroot scenario where all requests started on one via the docroot symlink stays on that one would be a good approach but it would take a lot of discipline at the userspace level to enforce that across a large and diverse codebase with autoloaders and actual realpath calls all over the place. -Rasmus

« previous php.internals (#66773) next »