<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: FastCGI in PHP. The way it could be</title>
	<atom:link href="http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/</link>
	<description>Programming for Mac and Web</description>
	<lastBuildDate>Thu, 04 Aug 2011 07:10:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
		<item>
		<title>By: genabatyan</title>
		<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/comment-page-1/#comment-80536</link>
		<dc:creator>genabatyan</dc:creator>
		<pubDate>Fri, 14 Aug 2009 20:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=4#comment-80536</guid>
		<description>Hey, I had the same Idea since ages. Today have been crawling the web if anyone has done anything this way.&lt;br&gt;It really surprises me that there&#039;s almost nothing on this topic and nobody seems to be interested!&lt;br&gt;&lt;br&gt;Many sophisticated and resource-hungry PHP frameworks appear and become very popular, but come on, a test page of 5 lines, using doctrine to fetch one record from the database needs 50ms! and that&#039;s with APC enabled. This is absolutely ridiculous.&lt;br&gt;I believe if doctrine initialization - a great part of which is shared absolutely the same way across all requests - would be moved out of the fast-cgi request loop, performance boost would be gigantic and had a chance to get close to &quot;normal&quot; fast-cgi experiences.&lt;br&gt;&lt;br&gt;I was trying to write a proof-of-concept almost zero-config pure-php solution to &quot;long-living php workers&quot; but without using any standards like fast-cgi. But it turned out to be too complex to waste time on it, why not doing it &quot;right&quot; from the beginning, that is implementing a widely accepted fastcgi protocol in pure PHP.&lt;br&gt;&lt;br&gt;If you&#039;re still interested drop me a line!</description>
		<content:encoded><![CDATA[<p>Hey, I had the same Idea since ages. Today have been crawling the web if anyone has done anything this way.<br />It really surprises me that there&#39;s almost nothing on this topic and nobody seems to be interested!</p>
<p>Many sophisticated and resource-hungry PHP frameworks appear and become very popular, but come on, a test page of 5 lines, using doctrine to fetch one record from the database needs 50ms! and that&#39;s with APC enabled. This is absolutely ridiculous.<br />I believe if doctrine initialization &#8211; a great part of which is shared absolutely the same way across all requests &#8211; would be moved out of the fast-cgi request loop, performance boost would be gigantic and had a chance to get close to &#8220;normal&#8221; fast-cgi experiences.</p>
<p>I was trying to write a proof-of-concept almost zero-config pure-php solution to &#8220;long-living php workers&#8221; but without using any standards like fast-cgi. But it turned out to be too complex to waste time on it, why not doing it &#8220;right&#8221; from the beginning, that is implementing a widely accepted fastcgi protocol in pure PHP.</p>
<p>If you&#39;re still interested drop me a line!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ð¡ÐµÑ€Ð³ÐµÐ¹ ÐšÑƒÑ€Ð°ÐºÐ¸Ð½ &#187; Ð˜ÑÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Load Balancing Ð¸ Performance Ð´Ð»Ñ ÑÐ°Ð¹Ñ‚Ð¾Ð²</title>
		<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/comment-page-1/#comment-7677</link>
		<dc:creator>Ð¡ÐµÑ€Ð³ÐµÐ¹ ÐšÑƒÑ€Ð°ÐºÐ¸Ð½ &#187; Ð˜ÑÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Load Balancing Ð¸ Performance Ð´Ð»Ñ ÑÐ°Ð¹Ñ‚Ð¾Ð²</dc:creator>
		<pubDate>Tue, 14 Aug 2007 15:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=4#comment-7677</guid>
		<description>[...] Ð¢ÑÐ¶ÐµÐ»Ð¾ ÑÐºÐ°Ð·Ð°Ñ‚ÑŒ, ÐºÐ¾Ð½ÐµÑ‡Ð½Ð¾, Ñ‡Ñ‚Ð¾ Ð²ÑÑ‘ ÑÑ‚Ð¾ Ð±Ð»Ð¾Ð³Ð¸ Ð¸ &#8220;Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¾ Ð² Google Reader&#8221;, Ð¿Ñ€Ð¾ÑÑ‚Ð¾ Ð²ÑÑ‘ ÑÑ‚Ð¾ Ñ‡Ð¸Ñ‚Ð°Ð»Ð¾ÑÑŒ, ÐºÑƒÑ€Ð¸Ð»Ð¾ÑÑŒ, Ð¿ÐµÑ€ÐµÐ²Ð°Ñ€Ð¸Ð²Ð°Ð»Ð¾ÑÑŒ: High Scalability - Building bigger, faster, more reliable websites. MySQL Performance Blog Domas Mituzas - ÑÐ¿ÐµÑ†Ð¸Ð°Ð»Ð¸ÑÑ‚ Ð¿Ð¾ MySQL + Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ° Wikipedia Ñ€ÐµÐºÐ¾Ð¼ÐµÐ½Ð´ÑƒÑŽ Wikipedia: site internals, etc (the workbook) Load Balancing Your Web Site Performance Tuning Best Practices for MySQL MySQL Manual Index Hint Syntax Optimizing Queries with EXPLAIN FastCGI in PHP. The way it could be Lighttpd Performance Improvements Lighttpd Optimizing FastCGI performance Understanding FastCGI Application Performance Squid: Accelerator Mode XCache Faster Is Possible Using X-Accel-Redirect Header With Nginx to Implement Controlled Downloads Lighttpd X-Sendfile Scaling with MySQL replication ÐœÐ¾Ð¶ÐµÑ‚ Ñ‡ÐµÐ³Ð¾ Ð¸ Ð·Ð°Ð±Ñ‹Ð» - Ñƒ Ð¼ÐµÐ½Ñ Ð½ÐµÑ‚ Ð»Ð°Ð¿Ñ‚Ð¾Ð¿Ð° (Ñ Ð¸Ñ… Ð½ÐµÐ½Ð°Ð²Ð¸Ð¶Ñƒ), Ð¿Ð¾ÑÑ‚Ð¾Ð¼Ñƒ Ñ‡Ð°ÑÑ‚ÑŒ ÑÑÑ‹Ð»Ð¾Ðº ÐµÑ‰Ñ‘ ÐµÑÑ‚ÑŒ Ð½Ð° Ð´Ñ€ÑƒÐ³Ð¾Ð¹ Ð¼Ð°ÑˆÐ¸Ð½Ðµ, Ð¸ Ð²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð¾ Ð·Ð°Ð²Ñ‚Ñ€Ð° Ñ Ð¸Ñ… Ñ‚Ð¾Ð¶Ðµ Ð´Ð¾Ð±Ð°Ð²Ð»ÑŽ ÑÑŽÐ´Ð°.  Blog, Web &#8212; Ð¡ÐµÑ€Ð³ÐµÐ¹ ÐšÑƒÑ€Ð°ÐºÐ¸Ð½ @ 16:46     Ð£Ð¶Ðµ ÐºÐ¾Ð¼Ð¼ÐµÐ½Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð»Ð¾ (1) &#187; [...]</description>
		<content:encoded><![CDATA[<p>[...] Ð¢ÑÐ¶ÐµÐ»Ð¾ ÑÐºÐ°Ð·Ð°Ñ‚ÑŒ, ÐºÐ¾Ð½ÐµÑ‡Ð½Ð¾, Ñ‡Ñ‚Ð¾ Ð²ÑÑ‘ ÑÑ‚Ð¾ Ð±Ð»Ð¾Ð³Ð¸ Ð¸ &#8220;Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¾ Ð² Google Reader&#8221;, Ð¿Ñ€Ð¾ÑÑ‚Ð¾ Ð²ÑÑ‘ ÑÑ‚Ð¾ Ñ‡Ð¸Ñ‚Ð°Ð»Ð¾ÑÑŒ, ÐºÑƒÑ€Ð¸Ð»Ð¾ÑÑŒ, Ð¿ÐµÑ€ÐµÐ²Ð°Ñ€Ð¸Ð²Ð°Ð»Ð¾ÑÑŒ: High Scalability &#8211; Building bigger, faster, more reliable websites. MySQL Performance Blog Domas Mituzas &#8211; ÑÐ¿ÐµÑ†Ð¸Ð°Ð»Ð¸ÑÑ‚ Ð¿Ð¾ MySQL + Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶ÐºÐ° Wikipedia Ñ€ÐµÐºÐ¾Ð¼ÐµÐ½Ð´ÑƒÑŽ Wikipedia: site internals, etc (the workbook) Load Balancing Your Web Site Performance Tuning Best Practices for MySQL MySQL Manual Index Hint Syntax Optimizing Queries with EXPLAIN FastCGI in PHP. The way it could be Lighttpd Performance Improvements Lighttpd Optimizing FastCGI performance Understanding FastCGI Application Performance Squid: Accelerator Mode XCache Faster Is Possible Using X-Accel-Redirect Header With Nginx to Implement Controlled Downloads Lighttpd X-Sendfile Scaling with MySQL replication ÐœÐ¾Ð¶ÐµÑ‚ Ñ‡ÐµÐ³Ð¾ Ð¸ Ð·Ð°Ð±Ñ‹Ð» &#8211; Ñƒ Ð¼ÐµÐ½Ñ Ð½ÐµÑ‚ Ð»Ð°Ð¿Ñ‚Ð¾Ð¿Ð° (Ñ Ð¸Ñ… Ð½ÐµÐ½Ð°Ð²Ð¸Ð¶Ñƒ), Ð¿Ð¾ÑÑ‚Ð¾Ð¼Ñƒ Ñ‡Ð°ÑÑ‚ÑŒ ÑÑÑ‹Ð»Ð¾Ðº ÐµÑ‰Ñ‘ ÐµÑÑ‚ÑŒ Ð½Ð° Ð´Ñ€ÑƒÐ³Ð¾Ð¹ Ð¼Ð°ÑˆÐ¸Ð½Ðµ, Ð¸ Ð²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð¾ Ð·Ð°Ð²Ñ‚Ñ€Ð° Ñ Ð¸Ñ… Ñ‚Ð¾Ð¶Ðµ Ð´Ð¾Ð±Ð°Ð²Ð»ÑŽ ÑÑŽÐ´Ð°.  Blog, Web &mdash; Ð¡ÐµÑ€Ð³ÐµÐ¹ ÐšÑƒÑ€Ð°ÐºÐ¸Ð½ @ 16:46     Ð£Ð¶Ðµ ÐºÐ¾Ð¼Ð¼ÐµÐ½Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð»Ð¾ (1) &raquo; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Zakhlestin&#8217;s blog &#187; Application Server in PHP? wellâ€¦ Yes!</title>
		<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/comment-page-1/#comment-5952</link>
		<dc:creator>Alexey Zakhlestin&#8217;s blog &#187; Application Server in PHP? wellâ€¦ Yes!</dc:creator>
		<pubDate>Tue, 19 Jun 2007 13:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=4#comment-5952</guid>
		<description>[...] Long story: Some time ago I was ranting about PHP and it&#8217;s &#8220;way&#8221; of handling FastCGI. The idea is to have persistent PHP-application which would handle requests from inside. This would allow us have &#8220;real&#8221; persistent cache in application (persistent connection to arbitary resources, preparsed XSLT&#8217;s in memory) and reply to queries really fast as we wouldn&#8217;t need to load all the classes on each request (classes would be loaded only once, during app initialization). And no, APC and similiar technologies do not completely solve this problem. [...]</description>
		<content:encoded><![CDATA[<p>[...] Long story: Some time ago I was ranting about PHP and it&#8217;s &#8220;way&#8221; of handling FastCGI. The idea is to have persistent PHP-application which would handle requests from inside. This would allow us have &#8220;real&#8221; persistent cache in application (persistent connection to arbitary resources, preparsed XSLT&#8217;s in memory) and reply to queries really fast as we wouldn&#8217;t need to load all the classes on each request (classes would be loaded only once, during app initialization). And no, APC and similiar technologies do not completely solve this problem. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indeyets</title>
		<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/comment-page-1/#comment-5925</link>
		<dc:creator>indeyets</dc:creator>
		<pubDate>Mon, 18 Jun 2007 18:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=4#comment-5925</guid>
		<description>Stanislav: That&#039;s exactly what I am implementing right now. :) 
SCGI in pure php (FastCGI will be next)</description>
		<content:encoded><![CDATA[<p>Stanislav: That&#8217;s exactly what I am implementing right now. <img src='http://blog.milkfarmsoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
SCGI in pure php (FastCGI will be next)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stanislav Malyshev</title>
		<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/comment-page-1/#comment-5924</link>
		<dc:creator>Stanislav Malyshev</dc:creator>
		<pubDate>Mon, 18 Jun 2007 18:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=4#comment-5924</guid>
		<description>I see no reason why you can&#039;t implement FCGI protocol in long-running PHP script. However, PHP webserver model is targeted on (relatively) short isolated requests - that&#039;s how web applications work and that&#039;s how webservers expect them to work. It is not right that this is only for Apache&#039;s mod_php - it is true for *all* webserver SAPIs. There&#039;s nothing &quot;improper&quot; in PHPs FCGI implementation - FCGI is a protocol to communicate with the  webserver and PHP implements it properly - it&#039;s just not meant to do what you want it to do, because it is oriented on different model of communication with the server and different model of applications. 
If, however, you do need the long-running script having its own event loop communicating with the web server, nothing prevents you from using non-webserver SAPI - namely CLI - and implementing the event loop inside your script on top of it. Well, not entirely correct - there&#039;s one thing:  there&#039;s no PHP extension I know that implements it right now, so you&#039;d have to either write one or parse all bits and bytes of FCGI in PHP (this BTW is exactly what Python is doing). If you find such module or implement it yourself, you are more than welcome to share it with the world :) However, while such things could be very useful, I don&#039;t see it becoming default model of running PHP over FCGI anytime soon.</description>
		<content:encoded><![CDATA[<p>I see no reason why you can&#8217;t implement FCGI protocol in long-running PHP script. However, PHP webserver model is targeted on (relatively) short isolated requests &#8211; that&#8217;s how web applications work and that&#8217;s how webservers expect them to work. It is not right that this is only for Apache&#8217;s mod_php &#8211; it is true for *all* webserver SAPIs. There&#8217;s nothing &#8220;improper&#8221; in PHPs FCGI implementation &#8211; FCGI is a protocol to communicate with the  webserver and PHP implements it properly &#8211; it&#8217;s just not meant to do what you want it to do, because it is oriented on different model of communication with the server and different model of applications.<br />
If, however, you do need the long-running script having its own event loop communicating with the web server, nothing prevents you from using non-webserver SAPI &#8211; namely CLI &#8211; and implementing the event loop inside your script on top of it. Well, not entirely correct &#8211; there&#8217;s one thing:  there&#8217;s no PHP extension I know that implements it right now, so you&#8217;d have to either write one or parse all bits and bytes of FCGI in PHP (this BTW is exactly what Python is doing). If you find such module or implement it yourself, you are more than welcome to share it with the world <img src='http://blog.milkfarmsoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  However, while such things could be very useful, I don&#8217;t see it becoming default model of running PHP over FCGI anytime soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indeyets</title>
		<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/comment-page-1/#comment-65</link>
		<dc:creator>indeyets</dc:creator>
		<pubDate>Tue, 10 Oct 2006 08:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=4#comment-65</guid>
		<description>ajp is not as &quot;beautiful&quot; and complete solution as fastcgi, imho.</description>
		<content:encoded><![CDATA[<p>ajp is not as &#8220;beautiful&#8221; and complete solution as fastcgi, imho.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henrik</title>
		<link>http://blog.milkfarmsoft.com/2006/06/fastcgi-in-php-the-way-it-could-be/comment-page-1/#comment-64</link>
		<dc:creator>Henrik</dc:creator>
		<pubDate>Mon, 09 Oct 2006 15:41:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=4#comment-64</guid>
		<description>Just implement the AJP protocol and use the built in support in version 2.2 or mod_jk for previous versions.</description>
		<content:encoded><![CDATA[<p>Just implement the AJP protocol and use the built in support in version 2.2 or mod_jk for previous versions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

