[Web-SIG] WSGI in standard library
Robert Brewer
fumanchu at amor.org
Wed Feb 15 00:52:26 CET 2006
Alan Kennedy wrote:
> Here's a few comments I put together about the three contenders that
> have been proposed so far. They're just my own comments from
> reading the code: feel free to treat them as the ravings of
> a madman if you so wish.
>
> 1. CherryPy server - 407 lines (non-code lines: ~80)
>
> - Depends on cherrypy, cherryp._cputil, cherryp.lib.httptools
> - Depends on cherrypy.config
?? Perhaps you're assuming the wrapper in _cpwsgi is being proposed, but
it isn't. That has all of the CherryPy-specific "stuff" in it. The base
file (_cpwsgiserver) has no dependencies except for stdlib modules.
> - Implements HTTP header length limit checking
> - Implements HTTP body length limit checking
> - Uses own logging handler
These are not present in the base _cpwsgiserver.
> - Subclasses SocketServer.BaseServer, not BaseHTTPServer.HTTPServer
> - Therefore does low-level socket mucking-about
> - Provides 2 server implementations
> - CherryHTTPServer
> - PooledThreadServer
Okay, now you're really looking in the wrong place. Ignore
_cphttpserver; it's deprecated and has nothing to do with WSGI. Look at
_cpwsgiserver and only _cpwsgiserver.
> - Explicitly checks for KeyboardInterrupt exceptions
> - PooledThreadServer has clean shutdown through Queue.Queue
> messaging
> - Does not detect hop-by-hop headers
> - No demo application
>
> My gut feeling: too complex, works to hard to be
> "production-ready", at the expense of readability.
Look at the right code and see if your gut feeling changes. ;)
Robert Brewer
System Architect
Amor Ministries
fumanchu at amor.org
More information about the Web-SIG
mailing list