Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68231 > unrolled thread

Re: which async framework?

Started byChris Angelico <rosuav@gmail.com>
First post2014-03-12 04:17 +1100
Last post2014-03-12 04:17 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: which async framework? Chris Angelico <rosuav@gmail.com> - 2014-03-12 04:17 +1100

#68231 — Re: which async framework?

FromChris Angelico <rosuav@gmail.com>
Date2014-03-12 04:17 +1100
SubjectRe: which async framework?
Message-ID<mailman.8054.1394558241.18130.python-list@python.org>
On Wed, Mar 12, 2014 at 3:01 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:
> Yes, why use a library when you can rewrite it all yourself?
> Actually, you should probably issue system calls to the kernel directly,
> the libc is overrated (as is portability, I suppose).

It's a trade-off, of course. I am fluent in over six million forms of
TCP socket communication (give or take), so I'll often skip the
libraries and just directly connect a socket. But on the flip side,
some protocols are just way more convenient to let a library handle.
An HTTP POST request, for instance, requires - potentially - a whole
lot of escaping and merging and stuff, or a simple call to one
function with a dictionary of form data. But I like to retain close
familiarity with the actual protocols, in case I'm trying to transfer
a file onto a target system that provides something buggy or
incomplete... most notably, the innumerable platforms whose FTP
clients don't support passive mode. (RFC 959 specified it in 1985, why
doesn't the default WinXP client support it??) I've written a good few
FTP clients for that reason.

There's a huge difference between something meant to do a huge amount
of work long-term and something to just quickly move some data across
a VM boundary. For the latter, I'll do whatever's quickest *right
now*, and that may well mean "don't bother figuring out the XYZ
module, just do it over a plain socket".

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web