Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61309 invoked from network); 23 Mar 2013 22:26:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Mar 2013 22:26:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.212.48 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.212.48 mail-vb0-f48.google.com Received: from [209.85.212.48] ([209.85.212.48:55388] helo=mail-vb0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/32-44422-72C2E415 for ; Sat, 23 Mar 2013 17:26:48 -0500 Received: by mail-vb0-f48.google.com with SMTP id fc21so3253610vbb.35 for ; Sat, 23 Mar 2013 15:26:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=lyUilHHLgYatfFlFRkua5zGfFPJsZjnKPPATBzH3tug=; b=GPVTqJowALUXaexh01VtRTI+fbSsTJOy0vMRCJsSFiSNvfTGXSArKRTB+PrXb8Y0oQ cI3LI7c7zyS/9tmhtngZ6hQuKE2tHvh4eVHYwMakxFmcJcWUu6GqikszKS7amlXd4p71 BuhaDZIR2BVoKf067loHRicjcdPrfvg55sfzanSMtt4T26hD5jCoXmcvJsC69/lbCno8 zE/srO8JCMYkJ6uTk99WQZmniQ7H6WLlz4QRjR4W3PwNRr705RNbYCRLDDsDQ3qZNtJo yRE+IzzStGTzDp8BNT5ThVRpkld/cDks3csxZECFrkSOyY4v+eooqwD/f0dbo25YsDes 93pw== X-Received: by 10.52.23.205 with SMTP id o13mr7446933vdf.78.1364077605369; Sat, 23 Mar 2013 15:26:45 -0700 (PDT) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id l18sm11339022vdh.10.2013.03.23.15.26.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 23 Mar 2013 15:26:44 -0700 (PDT) Message-ID: <514E2C22.4070708@lerdorf.com> Date: Sat, 23 Mar 2013 15:26:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: Ferenc Kovacs CC: PHP internals References: <514DFAFF.4010901@lerdorf.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQkLUKhcFGlIpBCcN+Uz2MBMoIwLrfnwFDM8I2/xkrEhHFJX5glXJx0AFTNRvDi31YJZDXg/ Subject: Re: [PHP-DEV] Continuous Integration Atomic Deploys and PHP 5.5 From: rasmus@lerdorf.com (Rasmus Lerdorf) 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