<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>lighty's life: 1.4.12 becomes 1.5.0</title>
    <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>1.4.12 becomes 1.5.0</title>
      <description>&lt;p&gt;moo poked me today and was so right: &amp;#8220;With all the changes going into &lt;span class="caps"&gt;SVN&lt;/span&gt; we shouldn&amp;#8217;t call the next release 1.4.12, but 1.5.0&amp;#8221;. Lifting the restriction on &amp;#8216;try to stay compatible to the 1.4.x plugin-API I started right away on ripping the internals apart and put them together sliglty different.&lt;/p&gt;


	&lt;p&gt;If you are developing a plugin for 1.4.x right now, be asured that it won&amp;#8217;t work without changes in 1.5.0. Let me explain what is changing.&lt;/p&gt;
&lt;p&gt;The major change for the plugin developers are 3 or 4 things:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;the fdevent-handling interface is simpler now and hides the nasty details. You only provide a iosocket&lt;/li&gt;
		&lt;li&gt;chunkqueues everywhere and no direct call to &lt;kbd&gt;write()&lt;/kbd&gt; or &lt;kbd&gt;read()&lt;/kbd&gt; on a socket. This is all done through the &lt;kbd&gt;network_*&lt;/kbd&gt; interface. You don&amp;#8217;t have to care about platform dependent functions.&lt;/li&gt;
		&lt;li&gt;there is a lemon-based &lt;span class="caps"&gt;HTTP&lt;/span&gt;-Response parser (see mod_proxy_core)&lt;/li&gt;
		&lt;li&gt;&lt;kbd&gt;TRACE ( )&lt;/kbd&gt; and &lt;kbd&gt;ERROR ( )&lt;/kbd&gt; instead of &lt;kbd&gt;log_error_write(...)&lt;/kbd&gt;&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;All this is in &lt;span class="caps"&gt;SVN&lt;/span&gt; already. Some other changes are coming up right now and are mostly around the central state-engine and how a request is steps through the server. Currently we have these steps:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;accept connection&lt;/li&gt;
		&lt;li&gt;read request header + request content&lt;/li&gt;
		&lt;li&gt;call backend and send all the data&lt;/li&gt;
		&lt;li&gt;read backend response and prepare response header&lt;/li&gt;
		&lt;li&gt;send response to the client&lt;/li&gt;
		&lt;li&gt;on keep-alive go to 2, otherwise close the connection&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;What I currently implement is slightly different:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;accept connection&lt;/li&gt;
		&lt;li&gt;read the request header&lt;/li&gt;
		&lt;li&gt;set up the request-handling filter-chain&lt;/li&gt;
		&lt;li&gt;forward request content to the backend&lt;/li&gt;
		&lt;li&gt;read the backend response header&lt;/li&gt;
		&lt;li&gt;set up the the response-handling filter-chain&lt;/li&gt;
		&lt;li&gt;forward the response content to the client&lt;/li&gt;
		&lt;li&gt;on keep-alive go to 2 otherwise close the connection&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;This follows a simple idea: &amp;#8216;After parsing the &lt;span class="caps"&gt;HTTP&lt;/span&gt;-headers you have all the information on how you want to continue to handle the request.&amp;#8217; All plugins will get called and can hook into the filter-chain.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;mod_uploadprogress will hook into the request-filter-chain to track to progress of connections&lt;/li&gt;
		&lt;li&gt;mod_deflate will replace content in the response-filter-chain&lt;/li&gt;
		&lt;li&gt;mod_demux will split a proxy-response into multiple client responses&lt;/li&gt;
		&lt;li&gt;mod_http_chunking will provide generic &lt;span class="caps"&gt;HTTP&lt;/span&gt;/1.1 chunking&lt;/li&gt;
	&lt;/ul&gt;


It will be left to backend when they want to make the connection to the backend: 
	&lt;ul&gt;
	&lt;li&gt;when they have the request header&lt;/li&gt;
		&lt;li&gt;when they have a part of the request-content (POST body)&lt;/li&gt;
		&lt;li&gt;when they have the full request-content as now&lt;/li&gt;
	&lt;/ul&gt;


&lt;h3&gt;What else will change ?&lt;/h3&gt;

	&lt;ul&gt;
	&lt;li&gt;the hand-written &lt;span class="caps"&gt;HTTP&lt;/span&gt;-request parser will get kicked out in favour of a lemon based one. We already have one for the &lt;span class="caps"&gt;HTTP&lt;/span&gt;-responses and can use most of its code.&lt;/li&gt;
	&lt;/ul&gt;</description>
      <pubDate>Wed, 26 Jul 2006 22:41:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a5feccfb-59d2-40e3-8be0-4b5d683143e0</guid>
      <author>jan</author>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0</link>
      <category>lighttpd</category>
      <trackback:ping>http://blog.lighttpd.net/articles/trackback/1850</trackback:ping>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Alex</title>
      <description>How soon can we expect version 1.5?</description>
      <pubDate>Tue, 15 Aug 2006 06:45:34 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:6a1b1451-fb3e-4b39-9e76-14f42656bc2f</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1934</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by A1eX</title>
      <description>Oh cool a new version soon !

And what about .htaccess support? (perhaps with lighty's pattern style for rewriting urls)
It's the only thing missing in lighty that makes a lot of people continue to use apache...</description>
      <pubDate>Fri, 11 Aug 2006 13:39:16 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8b895199-6926-4b34-b1de-d4b89f8d30a2</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1932</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by jan@kneschke.de</title>
      <description>I don't know if the current code still compiles on win32 nativly, but a while ago it was compiling and working (all but spawning processes).

So, perhaps we have a native win32 version somewhen in the 1.5.x release cycle.</description>
      <pubDate>Fri, 11 Aug 2006 11:55:54 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fe3278b5-b65f-44a3-8704-ac708f2c67e4</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1931</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Rio</title>
      <description>Cool! what about native Win32 support?</description>
      <pubDate>Fri, 11 Aug 2006 05:29:52 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:79dc1723-c212-4af6-b57d-2eb08183b072</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1929</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Jan Kneschke</title>
      <description>Up to now I'm not aware of any complaints about mod_flv_streaming. Whay should be improved ?</description>
      <pubDate>Thu, 03 Aug 2006 10:56:30 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:06cc5215-4d42-48b9-818a-94f9ce925339</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1902</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by video</title>
      <description>Good job.I want to know are there any improvements on Flv stream model?</description>
      <pubDate>Mon, 31 Jul 2006 23:31:35 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:45503448-051f-4398-865b-427cdeae0c9d</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1885</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Jan Kneschke</title>
      <description>The lemon based parser is more strict and easier to maintain than the old hand-written one. 

Hand-written parsers are only better and faster if the implementor knows how to write a parser. To be honest ... lemon does this better than me. :)

For the configfile: All these changes should only care plugin developers. The configfile will stay the same.</description>
      <pubDate>Mon, 31 Jul 2006 11:35:53 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:09224064-137c-4848-952a-ac16cfee6d4c</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1881</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Sencer</title>
      <description>Does the renaming only reflect changes already done, or will it delay the next release further due to other changes you want to get into the 1.5.x series? 
Are you shooting for a concrete date in terms of releasing 1.5.0?</description>
      <pubDate>Sun, 30 Jul 2006 15:55:39 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e4787ff8-ed72-493e-b41b-b06eea50493d</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1875</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Marco Rodrigues</title>
      <description>How about to include configuration for php5-fastcgi ? not only php4-fastcgi..

Here is the code of the script:

## FastCGI programs have the same functionality as CGI programs,
## but are considerably faster through lower interpreter startup
## time and socketed communication
##
## Documentation: /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
##                &lt;a href="http://www.lighttpd.net/documentation/fastcgi.html" rel="nofollow"&gt;http://www.lighttpd.net/documentation/fastcgi.html&lt;/a&gt;

server.modules   += ( "mod_fastcgi" )

## Start an FastCGI server for php5 (needs the php5-cgi package)
fastcgi.server = ( ".php" =&gt;
                   ( "localhost" =&gt;
                     ( "socket" =&gt; "/tmp/php5-fcgi.socket",
                       "bin-path" =&gt; "/usr/bin/php5-cgi"
                     )
                   )
                 )

I've tested this on Ubuntu v6.06 LTS.</description>
      <pubDate>Sun, 30 Jul 2006 09:48:04 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:8ca5ee01-68f5-41bd-bfe1-2aca1e8edea0</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1871</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Rolf Bode-Meyer</title>
      <description>"the hand-written HTTP-request parser will get kicked out in favour of a lemon based one."

Urm, what's the benefit? Isn't hand-written nearly almost always faster and better fitting?

Is lighty one of the cases where this isn't true, or do we have to reckon with lower performance if generated parsers take over the code?</description>
      <pubDate>Sat, 29 Jul 2006 11:52:23 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:66065221-60d7-4fce-8015-49eba891ba93</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1868</link>
    </item>
    <item>
      <title>"1.4.12 becomes 1.5.0" by Imran</title>
      <description>Do we need to do any changes if we've not got anything special done on our CONFIG files other than standard virtual hosting ? </description>
      <pubDate>Sat, 29 Jul 2006 02:43:46 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:97aaa2e9-3701-4e5a-89fb-241d4f86d35a</guid>
      <link>http://blog.lighttpd.net/articles/2006/07/26/1-4-12-becomes-1-5-0#comment-1865</link>
    </item>
  </channel>
</rss>
