<story><title>Uvloop: Fast Python networking</title><url>http://magic.io/blog/uvloop-blazing-fast-python-networking/</url></story><parent_chain></parent_chain><comment><author>haberman</author><text>&amp;gt; However, the performance bottleneck in aiohttp turned out to be its HTTP parser, which is so slow, that it matters very little how fast the underlying I&amp;#x2F;O library is.&lt;p&gt;This is exactly the same observation that motivated the Mongrel web server for Ruby, 10 years ago this year.&lt;p&gt;&amp;quot;Mongrel is a small library that provides a very fast HTTP 1.1 server for Ruby web applications. [...] What makes Mongrel so fast is the careful use of an Ragel [C] extension to provide fast, accurate HTTP 1.1 protocol parsing. This makes the server scream without too many portability issues.&amp;quot;  -- &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mongrel&amp;#x2F;mongrel&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mongrel&amp;#x2F;mongrel&lt;/a&gt;&lt;p&gt;And its successor Thin:&lt;p&gt;&amp;quot;Thin is a Ruby web server that glues together 3 of the best Ruby libraries in web history: (1) the Mongrel parser, the root of Mongrel speed and security&amp;quot; -- &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;code.macournoyer.com&amp;#x2F;thin&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;code.macournoyer.com&amp;#x2F;thin&amp;#x2F;&lt;/a&gt;&lt;p&gt;In case anyone is still wondering, parsing in Ruby&amp;#x2F;Python&amp;#x2F;Lua is pretty slow compared to C&amp;#x2F;C++.  That&amp;#x27;s why I personally have been really interested for a long time in writing parsers in C that can be used from higher level languages.  That way you can get the best of both worlds.</text></comment>
<story><title>Uvloop: Fast Python networking</title><url>http://magic.io/blog/uvloop-blazing-fast-python-networking/</url></story><parent_chain></parent_chain><comment><author>SEJeff</author><text>Also note that David Beazley (google him if you&amp;#x27;re not aware) has a competitor to asyncio, which arguably is also a direct competitor to this called curio:&lt;p&gt;&lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;curio.readthedocs.io&amp;#x2F;en&amp;#x2F;latest&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;curio.readthedocs.io&amp;#x2F;en&amp;#x2F;latest&amp;#x2F;&lt;/a&gt;&lt;p&gt;The caveat is that it uses the new async&amp;#x2F;await coroutine bits that just landed in Python 3.5, so it only works with Python 3.5+. He also gave a talk on concurrency in python recently at last year&amp;#x27;s PyCon:&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=MCs5OvhV9S4&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=MCs5OvhV9S4&lt;/a&gt;</text></comment>