<?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: Python web developpement: the dilemma</title>
	<atom:link href="http://www.larsen-b.com/Article/130.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com/Article/130.html</link>
	<description>Titanium Exposé</description>
	<lastBuildDate>Mon, 02 Jul 2018 13:54:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-556</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-556</guid>
		<description><![CDATA[&lt;p&gt;If it&#039;s just the caching issue with Webware, that can certainly be resolved -- it would just be a small modification to ServletFactory to make it keep its cache down to a reasonable size.  You can also mark your servlets as not being reusable, which probably wouldn&#039;t be much of a performance hit.&lt;/p&gt;
&lt;p&gt;As far as threading issues, it is a problem, but on some level any system has to deal with concurrency, and concurrency is hard.  It&#039;s the same in Zope (though they tend to keep threads more isolated to avoid some of these issues).  Twisted doesn&#039;t solve this either, it just uses a different technique for concurrency.  And if you want to use something like SQLObject (which you can) you&#039;ll have to do so &lt;a class=&quot;reference&quot; href=&quot;http://blog.colorstudy.com/ianb/weblog/2003/11/10.html#P32&quot;&gt;with threads&lt;/a&gt; -- leaving you potentially with both thread and async issues.&lt;/p&gt;
&lt;p&gt;I think there are some advantages to the forking system that Apache uses.  SkunkWeb also does this, but unlike mod_python it doesn&#039;t run in the Apache process.  Keeping the two isolated can provide some advantages, and make it all more controllable.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>If it&#8217;s just the caching issue with Webware, that can certainly be resolved &#8212; it would just be a small modification to ServletFactory to make it keep its cache down to a reasonable size.  You can also mark your servlets as not being reusable, which probably wouldn&#8217;t be much of a performance hit.</p>
<p>As far as threading issues, it is a problem, but on some level any system has to deal with concurrency, and concurrency is hard.  It&#8217;s the same in Zope (though they tend to keep threads more isolated to avoid some of these issues).  Twisted doesn&#8217;t solve this either, it just uses a different technique for concurrency.  And if you want to use something like SQLObject (which you can) you&#8217;ll have to do so <a class="reference" href="http://blog.colorstudy.com/ianb/weblog/2003/11/10.html#P32">with threads</a> &#8212; leaving you potentially with both thread and async issues.</p>
<p>I think there are some advantages to the forking system that Apache uses.  SkunkWeb also does this, but unlike mod_python it doesn&#8217;t run in the Apache process.  Keeping the two isolated can provide some advantages, and make it all more controllable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jkx</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-557</link>
		<dc:creator>jkx</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-557</guid>
		<description><![CDATA[&lt;p&gt;Anser to Ian:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;I think the best way to fix my trouble w/ webware is to tweak the ServletFactory, since i want to have advanced cache. I want the servlet to be reusable because i work w/ ZPT, and ZPT are long to parse.&lt;/li&gt;
&lt;li&gt;Mixing Twisted with thread won&#039;t be a nice approach i think, since as you say, &#039;leaving you potentially with both thread and async issues&#039;. I haven&#039;t take a look deeply in ZPublisher but Zope doesn&#039;t suffer of this kind of issue.&lt;/li&gt;
&lt;li&gt;The fork approach (which i forget in the document) can be a way to do this too. but once again i guess this can eat a lot of CPU, and i try to avoid this.. But i gonna look at &lt;a class=&quot;reference&quot; href=&quot;http://skunkweb.sourceforge.net/opman/&quot;&gt;Skunk&lt;/a&gt; closer&lt;/li&gt;
&lt;/ul&gt;
]]></description>
		<content:encoded><![CDATA[<p>Anser to Ian:</p>
<ul class="simple">
<li>I think the best way to fix my trouble w/ webware is to tweak the ServletFactory, since i want to have advanced cache. I want the servlet to be reusable because i work w/ ZPT, and ZPT are long to parse.</li>
<li>Mixing Twisted with thread won&#8217;t be a nice approach i think, since as you say, &#8216;leaving you potentially with both thread and async issues&#8217;. I haven&#8217;t take a look deeply in ZPublisher but Zope doesn&#8217;t suffer of this kind of issue.</li>
<li>The fork approach (which i forget in the document) can be a way to do this too. but once again i guess this can eat a lot of CPU, and i try to avoid this.. But i gonna look at <a class="reference" href="http://skunkweb.sourceforge.net/opman/">Skunk</a> closer</li>
</ul>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dialtone</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-558</link>
		<dc:creator>Dialtone</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-558</guid>
		<description><![CDATA[Actually Twisted already uses threads for DB querying. It has a fantastic package which is Twisted.enterprise that can handle all the most popular databases available for python (postgres, msserver, firebird, mysql, oracle and so on), and it also has a object relational mapper built-in called Row, which works even if it&#039;s not maintained anymore. I would suggest that if you really need the object mapping stuff you can offer for maintainership. &lt;br /&gt;
&lt;br /&gt;
Also there is a good light and fast OODB called Atop which is available at www.divmod.org&lt;br /&gt;
&lt;br /&gt;
Twisted has NO problems to work with databases itself, and it has no problems working with threads. Actually it uses a ThreadPool to connect to various databases, if you need to some heavy tasks which are blocking you can always use &#039;deferToThread&#039; which sends your task to a thread and then returns the result to the main twisted thread.&lt;br /&gt;
&lt;br /&gt;
Also you can rely on processes, which are far better than threads in python (at least), because they can be debugged easily and can be stopped easily and can scale to more computers. 32 computers are cheaper than a 32-way SMP supercomputer.&lt;br /&gt;
&lt;br /&gt;
Also Nevow is arguably the best web framework out there for scalability and speed :P]]></description>
		<content:encoded><![CDATA[<p>Actually Twisted already uses threads for DB querying. It has a fantastic package which is Twisted.enterprise that can handle all the most popular databases available for python (postgres, msserver, firebird, mysql, oracle and so on), and it also has a object relational mapper built-in called Row, which works even if it&#8217;s not maintained anymore. I would suggest that if you really need the object mapping stuff you can offer for maintainership. </p>
<p>Also there is a good light and fast OODB called Atop which is available at <a href="http://www.divmod.org" rel="nofollow">http://www.divmod.org</a></p>
<p>Twisted has NO problems to work with databases itself, and it has no problems working with threads. Actually it uses a ThreadPool to connect to various databases, if you need to some heavy tasks which are blocking you can always use &#8216;deferToThread&#8217; which sends your task to a thread and then returns the result to the main twisted thread.</p>
<p>Also you can rely on processes, which are far better than threads in python (at least), because they can be debugged easily and can be stopped easily and can scale to more computers. 32 computers are cheaper than a 32-way SMP supercomputer.</p>
<p>Also Nevow is arguably the best web framework out there for scalability and speed :P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jkx</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-559</link>
		<dc:creator>Jkx</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-559</guid>
		<description><![CDATA[&lt;p&gt;Answer for Dialtone (the twisted entousiast of #twisted.web)&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;For me ORM has nothing to deal w/ a web oriented framework. I think SQLObject or Modeling offer a large set of possibilites for this kind of issues.&lt;/li&gt;
&lt;li&gt;OODB, hum if i need to choose one OODB i guess i&#039;will choose ZODB. But once again that doesn&#039;t feet w/ my needs.&lt;/li&gt;
&lt;li&gt;Do you meen that using SQLo in twisted is do-able ? Hum .. mixing thread w/ async is perhaps a not so bad idea .. i don&#039;t know.&lt;/li&gt;
&lt;li&gt;Processes is a good approach too .. perhaps a mix, i mean: a Twisted server for page rendering and another for DB..&lt;/li&gt;
&lt;li&gt;Last: yes Nevow is pretty kool for templating (one more !!) but i don&#039;t feel confident w/ Stan :) I think template is a html file and Stan .. no thanks :)&lt;/li&gt;
&lt;/ul&gt;
]]></description>
		<content:encoded><![CDATA[<p>Answer for Dialtone (the twisted entousiast of #twisted.web)</p>
<ul class="simple">
<li>For me ORM has nothing to deal w/ a web oriented framework. I think SQLObject or Modeling offer a large set of possibilites for this kind of issues.</li>
<li>OODB, hum if i need to choose one OODB i guess i&#8217;will choose ZODB. But once again that doesn&#8217;t feet w/ my needs.</li>
<li>Do you meen that using SQLo in twisted is do-able ? Hum .. mixing thread w/ async is perhaps a not so bad idea .. i don&#8217;t know.</li>
<li>Processes is a good approach too .. perhaps a mix, i mean: a Twisted server for page rendering and another for DB..</li>
<li>Last: yes Nevow is pretty kool for templating (one more !!) but i don&#8217;t feel confident w/ Stan :) I think template is a html file and Stan .. no thanks :)</li>
</ul>
]]></content:encoded>
	</item>
	<item>
		<title>By: jkx</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-560</link>
		<dc:creator>jkx</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-560</guid>
		<description><![CDATA[&lt;p&gt;I missed to link to &lt;a class=&quot;reference&quot; href=&quot;http://skunkweb.sourceforge.net/opman/node38.html&quot;&gt;Skunk Transaction Anatomy&lt;/a&gt;&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I missed to link to <a class="reference" href="http://skunkweb.sourceforge.net/opman/node38.html">Skunk Transaction Anatomy</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dialtone</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-561</link>
		<dc:creator>Dialtone</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-561</guid>
		<description><![CDATA[Actually Stan is just an s-expr like syntax to build a template without using (x)html.&lt;br /&gt;
&lt;br /&gt;
It is also used to produce xmls like an RSS feed with little to no effort.&lt;br /&gt;
&lt;br /&gt;
The most important thing of all, anyway, is that you don&#039;t have to use stan if you don&#039;t like it. It is widely used in the examples because with stan you can fit everything inside just one python file (which is handy for that matter).&lt;br /&gt;
&lt;br /&gt;
BTW, maybe the reason because you have a 2 day vacuum on your DB is probably because you haven&#039;t written you SQL by hand (which is great for optimizing a database).&lt;br /&gt;
&lt;br /&gt;
Give a try to Nevow and don&#039;t look at stan if you don&#039;t like it (it is great for protoyping though).&lt;br /&gt;
&lt;br /&gt;
PS: I&#039;m no Twisted enthusiast ;P]]></description>
		<content:encoded><![CDATA[<p>Actually Stan is just an s-expr like syntax to build a template without using (x)html.</p>
<p>It is also used to produce xmls like an RSS feed with little to no effort.</p>
<p>The most important thing of all, anyway, is that you don&#8217;t have to use stan if you don&#8217;t like it. It is widely used in the examples because with stan you can fit everything inside just one python file (which is handy for that matter).</p>
<p>BTW, maybe the reason because you have a 2 day vacuum on your DB is probably because you haven&#8217;t written you SQL by hand (which is great for optimizing a database).</p>
<p>Give a try to Nevow and don&#8217;t look at stan if you don&#8217;t like it (it is great for protoyping though).</p>
<p>PS: I&#8217;m no Twisted enthusiast ;P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harald Armin Massa</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-562</link>
		<dc:creator>Harald Armin Massa</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-562</guid>
		<description><![CDATA[&lt;p&gt;Another approach to handle requests is implemented by Quixote with using SCGI. A SCGI-Server is listening on a local port, and Apache is routing requests there via MOD_SCGI.&lt;/p&gt;
&lt;p&gt;Performance is quite high, as the SCGI-Server can spawn more processes if requests come in rapidly. Threading within the requesthandler can be used, but does not need to be used - and is ususally not needed.&lt;/p&gt;
&lt;p&gt;SCGI is a very lightweight protocol. &lt;a class=&quot;reference&quot; href=&quot;http://www.quixote.ca&quot;&gt;http://www.quixote.ca&lt;/a&gt;&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Another approach to handle requests is implemented by Quixote with using SCGI. A SCGI-Server is listening on a local port, and Apache is routing requests there via MOD_SCGI.</p>
<p>Performance is quite high, as the SCGI-Server can spawn more processes if requests come in rapidly. Threading within the requesthandler can be used, but does not need to be used &#8211; and is ususally not needed.</p>
<p>SCGI is a very lightweight protocol. <a class="reference" href="http://www.quixote.ca">http://www.quixote.ca</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jkx</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-563</link>
		<dc:creator>Jkx</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-563</guid>
		<description><![CDATA[&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Quixote and Webware have the quite same approach (handling is done thought mod_webkit and executed in the threaded AppServer on Webware). But  in webware, objects are shared thought the AppServer, which is a threaded TCPServer. This mean use thread and most of us right know that thread in python is a holy graal :). I&#039;m wondering how Quixote handle this case.&lt;/li&gt;
&lt;li&gt;I just finished a test w/ the twisted producer / consumer. And this works but :&lt;ul&gt;
&lt;li&gt;spliting a page rendering in chunk is quite hard (or impossible)&lt;/li&gt;
&lt;li&gt;if you use too small chunk, you will get some really bad performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;For performance, I wondering: Should we do a bit of benchmarking ? I can collect results but i don&#039;t have a lot of time to bench each system..&lt;/li&gt;
&lt;/ul&gt;
]]></description>
		<content:encoded><![CDATA[<ul class="simple">
<li>Quixote and Webware have the quite same approach (handling is done thought mod_webkit and executed in the threaded AppServer on Webware). But  in webware, objects are shared thought the AppServer, which is a threaded TCPServer. This mean use thread and most of us right know that thread in python is a holy graal :). I&#8217;m wondering how Quixote handle this case.</li>
<li>I just finished a test w/ the twisted producer / consumer. And this works but :
<ul>
<li>spliting a page rendering in chunk is quite hard (or impossible)</li>
<li>if you use too small chunk, you will get some really bad performance.</li>
</ul>
</li>
<li>For performance, I wondering: Should we do a bit of benchmarking ? I can collect results but i don&#8217;t have a lot of time to bench each system..</li>
</ul>
]]></content:encoded>
	</item>
	<item>
		<title>By: fumanchu</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-564</link>
		<dc:creator>fumanchu</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-564</guid>
		<description><![CDATA[??? shared objects are bloody simple with mod_python; module-level globals persist between requests and threads quite nicely.]]></description>
		<content:encoded><![CDATA[<p>??? shared objects are bloody simple with mod_python; module-level globals persist between requests and threads quite nicely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jochen Rebhan</title>
		<link>http://www.larsen-b.com/Article/130.html/comment-page-1#comment-565</link>
		<dc:creator>Jochen Rebhan</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-565</guid>
		<description><![CDATA[Have you looked at www.cherrypy.org ?&lt;br /&gt;
For me it seems to be the most pythonic framework.]]></description>
		<content:encoded><![CDATA[<p>Have you looked at <a href="http://www.cherrypy.org" rel="nofollow">http://www.cherrypy.org</a> ?<br />
<br />
For me it seems to be the most pythonic framework.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
