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


Groups > comp.lang.python > #75434

multiprocessing vs. asyncio.SubprocessProtocol

Date 2014-07-31 12:00 -0700
From Charles Hixson <charleshixsn@earthlink.net>
Subject multiprocessing vs. asyncio.SubprocessProtocol
Newsgroups comp.lang.python
Message-ID <mailman.12482.1406833433.18130.python-list@python.org> (permalink)

Show all headers | View raw


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.)

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web