Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
how to do asynchronous http requests with epoll and python 3.1
_wolf
3/24/2010 5:47:00 PM
i asked this question before on
http://stackoverflow.com/questions/2489780/how-to-do-asynchronous-http-requests-with-epoll-and-...
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/pyt...
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/pyt...
howto.html
[2]:
http://www.torna...
[3]:
http://pycurl.source...
[4]:
http://groups.google.com/group/python-tornado/browse_thread/thread/276059a076593266/c49e8f834497271e?lnk=gst&q=httpclient+trouble+with+epoll#c49e8f...
[5]:
http://stac...
[6]:
http://python.mirocommunity.org/video/1501/pycon-2010-demystify...
[7]:
http://python.mirocommunity.org/video/1605/pycon-2010-keynote-r...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
how to do asynchronous http requests with epoll and python 3.1
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password