how to do asynchronous http requests with epoll and python 3.1

Discussion in 'Python' started by _wolf, Mar 24, 2010.

  1. _wolf

    _wolf Guest

    i asked this question before on
    http://stackoverflow.com/questions/...onous-http-requests-with-epoll-and-python-3-1
    but without a definitive answer as yet.

    can someone help me out? i want to do several simple http GET and POST
    requests in the same process using Python 3.1 without using threading.


    the original post:

    there is an interesting page [http://scotdoyle.com/python-epoll-
    howto.html][1] about how to do asnchronous / non-blocking / AIO http
    serving in python 3.

    there is the [tornado web server][2] which does include a non-blocking
    http client. i have managed to port parts of the server to python 3.1,
    but the implementation of the client requires [pyCurl][3] and [seems
    to have problems][4] (with one participant stating how ‘Libcurl is
    such a pain in the neck’, and looking at the incredibly ugly pyCurl
    page i doubt pyCurl will arrive in py3+ any time soon).

    now that epoll is available in the standard library, it should be
    possible to do asynchronous http requests out of the box with python.
    i really do not want to use asyncore or whatnot; epoll has a
    reputation for being the ideal tool for the task, and it is part of
    the python distribution, so using anything but epoll for non-blocking
    http is highly counterintuitive (prove me wrong if you feel like it).

    oh, and i feel threading is horrible. no threading. i use [stackless]
    [5].

    *people further interested in the topic of asynchronous http should
    not miss out on this [talk by peter portante at PyCon2010][6]; also of
    interest is [the keynote][7], where speaker antonio rodriguez at one
    point emphasizes the importance of having up-to-date web technology
    libraries right in the standard library.*


    [1]: http://scotdoyle.com/python-epoll-howto.html
    [2]: http://www.tornadoweb.org/
    [3]: http://pycurl.sourceforge.net/
    [4]:
    http://groups.google.com/group/pyth...ttpclient trouble with epoll#c49e8f834497271e
    [5]: http://stackless.com/
    [6]: http://python.mirocommunity.org/video/1501/pycon-2010-demystifying-non-bl
    [7]: http://python.mirocommunity.org/video/1605/pycon-2010-keynote-relentlessl
     
    _wolf, Mar 24, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Mills

    epoll socket server

    James Mills, Oct 10, 2008, in forum: Python
    Replies:
    0
    Views:
    743
    James Mills
    Oct 10, 2008
  2. Eki
    Replies:
    0
    Views:
    653
  3. sonet

    perl and epoll

    sonet, Nov 3, 2006, in forum: Perl Misc
    Replies:
    0
    Views:
    219
    sonet
    Nov 3, 2006
  4. lovecreatesbeauty

    epoll networking code review

    lovecreatesbeauty, Aug 30, 2012, in forum: C Programming
    Replies:
    4
    Views:
    707
    Ben Bacarisse
    Aug 30, 2012
  5. Miki Tebeka
    Replies:
    2
    Views:
    292
    Miki Tebeka
    Sep 12, 2012
Loading...

Share This Page