Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #84601
| From | Marko Rauhamaa <marko@pacujo.net> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: HTTP over Asynchronous AF_UNIX Socket in python |
| Date | 2015-01-26 16:12 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <87siexeimb.fsf@elektro.pacujo.net> (permalink) |
| References | <mailman.18146.1422279152.18130.python-list@python.org> |
Norah Jones <nh.jones01@gmail.com>: > But this cannot work since normal socket will not work and thus i > thought of `asyncore` module in python. To use asyncore module again i > will have to subclass asyncore.dispatcher. This class also contains > connect() method. > > Another problem is I don't know how asyncore module works and thus not > able to find a way to mix the work of 1) listening forever, accept the > connection, store id and the sock_fd. > 2) accept data from the process' agent sister process, retrieve the > sock_fd by matching the id in the dictionary and send it through the > AF_UNIX socket. Asyncore was a nice idea, but you shouldn't build anything on top of it. The newest Python versions have moved to a scheme called asyncio. Its programming model is a bit unconventional and hasn't won me over yet. Personally, I have found select.epoll(EPOLLET) plus a timer implementation enough of a framework for all of my async needs. Then comes HTTP support. The stdlib networking facilities are great for quick scripting, but not really compatible with the asynchronous paradigm. I have coded my protocols by hand myself. Marko
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
HTTP over Asynchronous AF_UNIX Socket in python Norah Jones <nh.jones01@gmail.com> - 2015-01-26 13:32 +0000 Re: HTTP over Asynchronous AF_UNIX Socket in python Marko Rauhamaa <marko@pacujo.net> - 2015-01-26 16:12 +0200
csiph-web