Re: Continuous Integration Atomic Deploys and PHP 5.5

From: Date: Sun, 24 Mar 2013 10:52:32 +0000
Subject: Re: Continuous Integration Atomic Deploys and PHP 5.5
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-66779@lists.php.net to get a copy of this message
On 24/03/13 09:26, Rasmus Lerdorf wrote: > 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 > Are you saying that to allow atomic deploys with O+ you need to make sure that all files are either autoloaded with a full realpath, or manually included/required by the realpath? You mentioned that O+ does not use inodes as cache keys like APC, but what does it use instead? Just the file path? Cheers, David

« previous php.internals (#66779) next »