[Web-SIG] Generator-Based Applications: Marrow HTTPd Example

Massimo Di Pierro mdipierro at cs.depaul.edu
Mon Jan 10 13:41:17 CET 2011


I like this a lot!

On Jan 10, 2011, at 6:25 AM, Alice Bevan–McGregor wrote:

> Howdy!
> 
> Here's a rewritten (and incomplete, but GET and HEAD requests work fine) marrow.server.http branch [1] that illustrates a simple application [2] and protocol implementation [3].  Most notably, examine the 'resume' method [4].
> 
> The 'basic' example yields a future instance and uses the data as the response body.
> 
> Note that this particular rewrite is not complete, nor has it been profiled and optimized; initial benchmarks (using the 'benchmark' example) show a reduction of ~600 RSecs from the 'draft' branch, which is substantial, but hasn't been traced to a particular segment of code or design decision yet.
> 
> The server is now -extremely- easy to read and follow, with all code acting in a linear way.  (Application worker threading has been removed from this branch as well; the server is once again purely async.)
> 
> 	- Alice.
> 
> [1] https://github.com/pulp/marrow.server.http/tree/generator
> 
> [2] https://github.com/pulp/marrow.server.http/blob/generator/examples/basic.py
> 
> [3] https://github.com/pulp/marrow.server.http/blob/generator/marrow/server/http/protocol.py
> 
> [4] 
> https://github.com/pulp/marrow.server.http/blob/generator/marrow/server/http/protocol.py#L177-226 
> 
> 
> _______________________________________________
> Web-SIG mailing list
> Web-SIG at python.org
> Web SIG: http://www.python.org/sigs/web-sig
> Unsubscribe: http://mail.python.org/mailman/options/web-sig/mdipierro%40cti.depaul.edu



More information about the Web-SIG mailing list