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


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

multiprocessing vs. asyncio.SubprocessProtocol

Started byCharles Hixson <charleshixsn@earthlink.net>
First post2014-07-31 12:00 -0700
Last post2014-07-31 12:00 -0700
Articles 1 — 1 participant

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


Contents

  multiprocessing vs. asyncio.SubprocessProtocol Charles Hixson <charleshixsn@earthlink.net> - 2014-07-31 12:00 -0700

#75434 — multiprocessing vs. asyncio.SubprocessProtocol

FromCharles Hixson <charleshixsn@earthlink.net>
Date2014-07-31 12:00 -0700
Subjectmultiprocessing vs. asyncio.SubprocessProtocol
Message-ID<mailman.12482.1406833433.18130.python-list@python.org>
What are the tradeoffs between using multiprocessing vs. using 
asyncio.SubprocessProtocol?
This only one that I've noticed is that asyncio seems to require much 
more hands-on management of message queueing.  OTOH, I'm no expert in 
either of them, and I might be missing something that will bite me later.

OTOH, I could do the whole thing with a TCP/IP peer-to-peer setup on 
localhost.  And that's much easier to figure out.  (Each process has one 
input queue, and runs until it receives a message telling it to die.  
JSON is all I need for serialization...though ast.literal_eval would 
work as well.)

So I guess I also want to know whether there's any advantage in using 
multiprocessing vs using a datagram transmission over localhost.  (That 
clearly has the advantage that it makes it easier to grow to multiple 
machines.)

[toc] | [standalone]


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


csiph-web