Asynchronous HTTP server in standard library ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pierre Quentel

    Asynchronous HTTP server in standard library ?

    Python standard library provides two modules for asynchronous socket
    programming : asyncore and asynchat. Several web servers have been built
    upon these modules (medusa being the best-known I suppose) and are famous
    for their performance level

    Unfortunately no example of use is provided in the standard library (whereas
    the more "classic" SocketServer is illustrated by BaseHTTPServer,
    SimpleHTTPServe r, etc). I think it would be useful if Python came with a
    simple HTTP server written with these modules, to help beginners understand
    how use them

    I've written one, which handles GET and POST requests. It's inspired by (and
    partly copied from) the http subset of medusa, only reduced to less than 200
    lines. It's called SimpleAsyncHTTP Server and published on Active State
    Python Cookbook


    Any thoughts ?
    Pierre


  • Wilk

    #2
    Re: Asynchronous HTTP server in standard library ?

    "Pierre Quentel" <quentel.pierre @wanadoo.fr> writes:
    [color=blue]
    > Python standard library provides two modules for asynchronous socket
    > programming : asyncore and asynchat. Several web servers have been built
    > upon these modules (medusa being the best-known I suppose) and are famous
    > for their performance level
    >
    > Unfortunately no example of use is provided in the standard library (whereas
    > the more "classic" SocketServer is illustrated by BaseHTTPServer,
    > SimpleHTTPServe r, etc). I think it would be useful if Python came with a
    > simple HTTP server written with these modules, to help beginners understand
    > how use them
    >
    > I've written one, which handles GET and POST requests. It's inspired by (and
    > partly copied from) the http subset of medusa, only reduced to less than 200
    > lines. It's called SimpleAsyncHTTP Server and published on Active State
    > Python Cookbook
    > http://aspn.activestate.com/ASPN/Coo.../Recipe/259148
    >
    > Any thoughts ?[/color]

    I think you'll be welcome in the web-sig !!!


    --
    Wilk - http://flibuste.net

    Comment

    • John J. Lee

      #3
      Re: Asynchronous HTTP server in standard library ?

      Wilk <wilkSPAM@OUTfl ibuste.net> writes:
      [color=blue]
      > "Pierre Quentel" <quentel.pierre @wanadoo.fr> writes:[/color]
      [...][color=blue][color=green]
      > > Any thoughts ?[/color]
      >
      > I think you'll be welcome in the web-sig !!!
      > http://python.org/sigs/web-sig/[/color]

      Yes, certainly -- don't let it worry you that the discussion died down
      for the last month or so. It'll likely start up again if/when
      somebody posts something interesting (or, more accurately, when
      somebody posts something controversial ;-).


      John

      Comment

      Working...