<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: What PHP Deployment Gets Right</title>
	<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/</link>
	<description></description>
	<pubDate>Wed, 09 Jul 2008 12:08:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Kents</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-16682</link>
		<dc:creator>Kents</dc:creator>
		<pubDate>Fri, 11 Apr 2008 21:25:18 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-16682</guid>
		<description>Saludos,

Gracias a artículos o comentarios como estos, seguiremos trabajando con PHP.
Desde hace mucho tiempo desarrollo con php y hasta ahora no he encontrado algo mejor para trabajar mis aplicaciones web's.
Espero que siga así por mucho tiempo, buena esa Bicking..!</description>
		<content:encoded><![CDATA[<p>Saludos,</p>

<p>Gracias a artículos o comentarios como estos, seguiremos trabajando con PHP.
Desde hace mucho tiempo desarrollo con php y hasta ahora no he encontrado algo mejor para trabajar mis aplicaciones web&#8217;s.
Espero que siga así por mucho tiempo, buena esa Bicking..!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graeme</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-15452</link>
		<dc:creator>Graeme</dc:creator>
		<pubDate>Tue, 19 Feb 2008 05:55:45 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-15452</guid>
		<description>It is very easy to get a PHP installation up and running with adequate debugging for simple scripts, or for simple customisations of existing ones.

This also means that PHP apps (Wordpress for example) end up having a huge range of extensions/plugins etc. (getting away with sloppy coding helps).</description>
		<content:encoded><![CDATA[<p>It is very easy to get a PHP installation up and running with adequate debugging for simple scripts, or for simple customisations of existing ones.</p>

<p>This also means that PHP apps (Wordpress for example) end up having a huge range of extensions/plugins etc. (getting away with sloppy coding helps).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack Diederich</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8137</link>
		<dc:creator>Jack Diederich</dc:creator>
		<pubDate>Tue, 15 Jan 2008 21:33:18 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8137</guid>
		<description>Not directly related to your point;  your article prompted me to blurb about the differences between mod_(perl&#124;php&#124;python) from a closer to the metal standpoint &lt;a href="http://jackdied.blogspot.com/2008/01/three-flavors-of-mod.html" rel="nofollow"&gt;on my blog&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Not directly related to your point;  your article prompted me to blurb about the differences between mod_(perl|php|python) from a closer to the metal standpoint <a href="http://jackdied.blogspot.com/2008/01/three-flavors-of-mod.html" rel="nofollow">on my blog</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8120</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 14 Jan 2008 21:19:05 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8120</guid>
		<description>From what I've seen WebFaction doesn't make any changes to the software. They just run each tool's HTTP server (most come with one) behind their main Apache server. Their control panel makes it easy to configure which domain should go to which tool. It's very simple but from my experience it's rock solid and still very fast.</description>
		<content:encoded><![CDATA[<p>From what I&#8217;ve seen WebFaction doesn&#8217;t make any changes to the software. They just run each tool&#8217;s HTTP server (most come with one) behind their main Apache server. Their control panel makes it easy to configure which domain should go to which tool. It&#8217;s very simple but from my experience it&#8217;s rock solid and still very fast.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnSeq</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8116</link>
		<dc:creator>JohnSeq</dc:creator>
		<pubDate>Mon, 14 Jan 2008 17:09:32 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8116</guid>
		<description>If you use mod_fastcgi+perl but add a 'die' statement at the end of your (fastcgi) script,  your CGI process prespawn but only service one request.

Doesn't that get you pretty close to mod_php's sandboxing/etc?

I had to do something like this to address a memory leak. I 'died' my script after more than one request, but the same principal applies.</description>
		<content:encoded><![CDATA[<p>If you use mod_fastcgi+perl but add a &#8216;die&#8217; statement at the end of your (fastcgi) script,  your CGI process prespawn but only service one request.</p>

<p>Doesn&#8217;t that get you pretty close to mod_php&#8217;s sandboxing/etc?</p>

<p>I had to do something like this to address a memory leak. I &#8216;died&#8217; my script after more than one request, but the same principal applies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adriaan Nel</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8079</link>
		<dc:creator>Adriaan Nel</dc:creator>
		<pubDate>Sun, 13 Jan 2008 18:41:26 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8079</guid>
		<description>Excellent excellent article, this is exactly why I prefer to use PHP to any other language.</description>
		<content:encoded><![CDATA[<p>Excellent excellent article, this is exactly why I prefer to use PHP to any other language.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shanti Braford</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8075</link>
		<dc:creator>Shanti Braford</dc:creator>
		<pubDate>Sun, 13 Jan 2008 17:05:26 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8075</guid>
		<description>Great writeup of the various flavors of process models.

PHP definitely has some big advantages in this realm.</description>
		<content:encoded><![CDATA[<p>Great writeup of the various flavors of process models.</p>

<p>PHP definitely has some big advantages in this realm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gaetano Giunta</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8053</link>
		<dc:creator>Gaetano Giunta</dc:creator>
		<pubDate>Sun, 13 Jan 2008 09:43:56 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8053</guid>
		<description>I'll have to candidate this post for "100% right" post of the year!
I have been trying to formalize all these aspects (to coworkers and managers, mostly) for a long time, but without ever reaching a reasonably clear explanation.
I do not mind too much about cgi vs. worker processes models details, insofar the huge advances in saving developers time are spelled out:

* automagic resource, variable and memory teardown PER REQUEST (this is teh magic, baby)

  This is what gives imho php a bad rep on slashdot: you can code sloppy and get away with it! global vars are ok!

* no shared state (almost, and you can put that in the db, generally).

  I had a "revelation" moment once when I rewrote a C app running on text only wireless terminals: turning the quite-standard app into a simple "browser" that a - sent queries to the server and b - always displayed back the received results as 'a page' (plus handled a couple of error codes) shrank the codebase to one third, eliminated bugs and most importantly made all subsequent evolutions trivial (just change your code inside the db / server, no more recompiling or deploying ever!). State is your enemy!

* nice process / application isolation is a huge bonus, too, even though it is still quite common and not so unlikely to bring a server to his knees (tight neverending loop, allocating huge chunks of memory or a huge number of db connecions or filling up your partition with logs, etc).

All in all my only wish is for even more sandboxing and isolation, eg. running code at different security levels, only allowing a subset of functions/operations, checking it for correctness before executing etc. Then we would need no more stinking template libraries!</description>
		<content:encoded><![CDATA[<p>I&#8217;ll have to candidate this post for &#8220;100% right&#8221; post of the year!
I have been trying to formalize all these aspects (to coworkers and managers, mostly) for a long time, but without ever reaching a reasonably clear explanation.
I do not mind too much about cgi vs. worker processes models details, insofar the huge advances in saving developers time are spelled out:</p>

<ul>
<li><p>automagic resource, variable and memory teardown PER REQUEST (this is teh magic, baby)</p>

<p>This is what gives imho php a bad rep on slashdot: you can code sloppy and get away with it! global vars are ok!</p></li>
<li><p>no shared state (almost, and you can put that in the db, generally).</p>

<p>I had a &#8220;revelation&#8221; moment once when I rewrote a C app running on text only wireless terminals: turning the quite-standard app into a simple &#8220;browser&#8221; that a - sent queries to the server and b - always displayed back the received results as &#8216;a page&#8217; (plus handled a couple of error codes) shrank the codebase to one third, eliminated bugs and most importantly made all subsequent evolutions trivial (just change your code inside the db / server, no more recompiling or deploying ever!). State is your enemy!</p></li>
<li><p>nice process / application isolation is a huge bonus, too, even though it is still quite common and not so unlikely to bring a server to his knees (tight neverending loop, allocating huge chunks of memory or a huge number of db connecions or filling up your partition with logs, etc).</p></li>
</ul>

<p>All in all my only wish is for even more sandboxing and isolation, eg. running code at different security levels, only allowing a subset of functions/operations, checking it for correctness before executing etc. Then we would need no more stinking template libraries!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8034</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sun, 13 Jan 2008 04:45:56 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8034</guid>
		<description>I agree with your premise 100%. For web-based development since PHP was written for that exact environment, PHP is excellent and in an framework it reduces development of complex sites from months to days, outside of a framework PHP's memory management and speed makes its scalability amazing. However, calling PHP a "CGI-based" process may be ok for the masses, but I nearly stopped reading after that sentence because its not accurate and does PHP a dis-service. 

I get your point, PHP cleans up after itself and is fast and that's super-critical in web environments. I did an eval of a Java based enterprise-class system (many machines each with 32 Gig) with scalability issues because they had many scripts that had to run per scale-level (each script did something different). Java likes to pre-compile and load all its stuff and scripts into memory and keep it there. That's just the nature of Java. I'm not dissing Java in general - I'd use it instead of PHP in other applications - but it was the wrong tool for the job for a complex, web-based, frequently changing, many many calculation-based, enterprise-level system. The final implementation? A Java-PHP hybrid succeeding where Java by itself failed. But I digress. 

My complaint is your use of the term CGI model. CGI (common gateway interface) is just an API for how to call standalone programs. CGI processes can be called from a server running in threaded or worker mode. 
PHP can be called in CGI mode or via mod_php.  A badly written non-PHP CGI script won't clean up after itself. In one case I saw a badly written OS (not Linux), run on a badly written web server (not Apache), calling a badly written CGI script (not PHP) and it ran out of total memory causing the server to have to reboot. 

Again I agree, a badly written PHP script will not those memory issues. PHP cleans up after itself,loads amazingly quickly (even faster with optimizers), etc, etc.; but calling it CGI-based grates against the actual definition of CGI and kills me. Instead of calling it CGI-based I think you should call it something else. I don't have a good term "requestional-based?" "session-y-ness?" "session-envelope-based?" "web-transactional?", "web-module-based?" :) ANYTHING but CGI.</description>
		<content:encoded><![CDATA[<p>I agree with your premise 100%. For web-based development since PHP was written for that exact environment, PHP is excellent and in an framework it reduces development of complex sites from months to days, outside of a framework PHP&#8217;s memory management and speed makes its scalability amazing. However, calling PHP a &#8220;CGI-based&#8221; process may be ok for the masses, but I nearly stopped reading after that sentence because its not accurate and does PHP a dis-service. </p>

<p>I get your point, PHP cleans up after itself and is fast and that&#8217;s super-critical in web environments. I did an eval of a Java based enterprise-class system (many machines each with 32 Gig) with scalability issues because they had many scripts that had to run per scale-level (each script did something different). Java likes to pre-compile and load all its stuff and scripts into memory and keep it there. That&#8217;s just the nature of Java. I&#8217;m not dissing Java in general - I&#8217;d use it instead of PHP in other applications - but it was the wrong tool for the job for a complex, web-based, frequently changing, many many calculation-based, enterprise-level system. The final implementation? A Java-PHP hybrid succeeding where Java by itself failed. But I digress. </p>

<p>My complaint is your use of the term CGI model. CGI (common gateway interface) is just an API for how to call standalone programs. CGI processes can be called from a server running in threaded or worker mode. 
PHP can be called in CGI mode or via mod_php.  A badly written non-PHP CGI script won&#8217;t clean up after itself. In one case I saw a badly written OS (not Linux), run on a badly written web server (not Apache), calling a badly written CGI script (not PHP) and it ran out of total memory causing the server to have to reboot. </p>

<p>Again I agree, a badly written PHP script will not those memory issues. PHP cleans up after itself,loads amazingly quickly (even faster with optimizers), etc, etc.; but calling it CGI-based grates against the actual definition of CGI and kills me. Instead of calling it CGI-based I think you should call it something else. I don&#8217;t have a good term &#8220;requestional-based?&#8221; &#8220;session-y-ness?&#8221; &#8220;session-envelope-based?&#8221; &#8220;web-transactional?&#8221;, &#8220;web-module-based?&#8221; :) ANYTHING but CGI.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Braydon Fuller</title>
		<link>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8028</link>
		<dc:creator>Braydon Fuller</dc:creator>
		<pubDate>Sun, 13 Jan 2008 01:43:57 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/01/12/what-php-deployment-gets-right/#comment-8028</guid>
		<description>The great thing about using php for a framework is that it allows nearly anyone to use their existing hosting to "install" new software by uploading "Drupal", "Wordpress", or "Joomla". It's in true omnipresent PHP permissive mentality, and great for putting hundreds of sites on the same box -- it is inexpensive.

While modwsgi is designed for commodity shared hosting in mind, it could be used for dedicated hosts just as well. Using modwsgi on shared hosting largely depends on if those admins choose to adapt using modwsgi in a similar way that has made modphp and php omnipresent. Furthermore, using modwsgi apps will still only be able to serve up so many simultaneous sessions on a one application one site model, thus if each site has it's own process, it will be limited. I've tested my python app which has a complex templating module in both modwsgi daemon and embedded mode at around 30-40 simultaneous sessions before it noticeably starts to really grind really slow. (Perhaps I don't have things configured correctly, by using threading?...) 100 sessions pretty much locked the app up until the sessions ended. I'm also on a VPS w/ 128mb of ram for testing. To scale well, I am imagining that there would need to be several apps used that interact with each other, and some interesting things could be possible with modwsgi daemon mode. Each app could take care of many different sites, and be able to spawn child process if it needs. One of those apps could be to write to disk previous requests, so as to be able to bypass all the other apps and serve directly a static file, this would enable huge performance gains for serving thousands of people those pages simultaneously. As for the user login side, each logged in user could have a duplicate site process dedicated to them. This could allow them to possibly make site wide changes with out ever committing them live, and see them as if they were live. When they are finished they can merge that data with the site data and make the updates, the static process could then recreate the changed pages. All in all, modwsgi, and or a webserver with an equivalent function of daemon management of python apps via wsgi, has lots of potential. One of the downsides is that Apache must be restarted frequently for changes in configuration, and updates to scripts, although I could be missing something... as I havn't tried configuring such behavior yet and to dig into how modwsgi works. Perhaps something built with Erlang could provide a better webserver for this kind of thing, and allow for python to have an omnipresence among hosting, with lower level control of the system. Thus this would enable far greater complex functionality outside the framework's language and framework's design scope more efficiently. A framework thus isn't it's own world, but would provide more interfaces to interact with any software on the system. Python can be great for this.</description>
		<content:encoded><![CDATA[<p>The great thing about using php for a framework is that it allows nearly anyone to use their existing hosting to &#8220;install&#8221; new software by uploading &#8220;Drupal&#8221;, &#8220;Wordpress&#8221;, or &#8220;Joomla&#8221;. It&#8217;s in true omnipresent PHP permissive mentality, and great for putting hundreds of sites on the same box &#8212; it is inexpensive.</p>

<p>While modwsgi is designed for commodity shared hosting in mind, it could be used for dedicated hosts just as well. Using modwsgi on shared hosting largely depends on if those admins choose to adapt using modwsgi in a similar way that has made modphp and php omnipresent. Furthermore, using modwsgi apps will still only be able to serve up so many simultaneous sessions on a one application one site model, thus if each site has it&#8217;s own process, it will be limited. I&#8217;ve tested my python app which has a complex templating module in both modwsgi daemon and embedded mode at around 30-40 simultaneous sessions before it noticeably starts to really grind really slow. (Perhaps I don&#8217;t have things configured correctly, by using threading?&#8230;) 100 sessions pretty much locked the app up until the sessions ended. I&#8217;m also on a VPS w/ 128mb of ram for testing. To scale well, I am imagining that there would need to be several apps used that interact with each other, and some interesting things could be possible with modwsgi daemon mode. Each app could take care of many different sites, and be able to spawn child process if it needs. One of those apps could be to write to disk previous requests, so as to be able to bypass all the other apps and serve directly a static file, this would enable huge performance gains for serving thousands of people those pages simultaneously. As for the user login side, each logged in user could have a duplicate site process dedicated to them. This could allow them to possibly make site wide changes with out ever committing them live, and see them as if they were live. When they are finished they can merge that data with the site data and make the updates, the static process could then recreate the changed pages. All in all, modwsgi, and or a webserver with an equivalent function of daemon management of python apps via wsgi, has lots of potential. One of the downsides is that Apache must be restarted frequently for changes in configuration, and updates to scripts, although I could be missing something&#8230; as I havn&#8217;t tried configuring such behavior yet and to dig into how modwsgi works. Perhaps something built with Erlang could provide a better webserver for this kind of thing, and allow for python to have an omnipresence among hosting, with lower level control of the system. Thus this would enable far greater complex functionality outside the framework&#8217;s language and framework&#8217;s design scope more efficiently. A framework thus isn&#8217;t it&#8217;s own world, but would provide more interfaces to interact with any software on the system. Python can be great for this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
