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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to