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


Groups > comp.lang.python > #73584

asyncio: wrapping a subprocess in a server

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <accumulator@icloud.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.186
X-Spam-Level *
X-Spam-Evidence '*H*': 0.63; '*S*': 0.00; 'separately': 0.09; 'tcp': 0.16; 'all,': 0.19; 'trying': 0.19; 'input': 0.22; "i'm": 0.30; 'protocols': 0.31; 'run': 0.32; 'packaging': 0.33; 'connection': 0.35; 'but': 0.35; 'charset:us-ascii': 0.36; 'should': 0.36; 'two': 0.37; 'server': 0.38; 'received:17': 0.38; 'to:addr:python- list': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'how': 0.40; 'chain': 0.60; 'back': 0.62; 'kind': 0.63; 'acts': 0.74; 'revive': 0.84
MIME-version 1.0
From David Farler <accumulator@icloud.com>
Content-type multipart/signed; boundary="Apple-Mail=_865D3A77-7FB1-44E2-A362-A68BF2C87FFE"; protocol="application/pkcs7-signature"; micalg=sha1
Subject asyncio: wrapping a subprocess in a server
Date Wed, 25 Jun 2014 11:24:55 -0700
To python-list@python.org
X-Mailer Apple Mail (2.1878.2)
X-MANTSH 1TEIXWV4bG1oaGkdHB0lGUkdDRl5PWBoaHREKTEMXGx0EGx0YBBIZBBsdEBseGh8 aEQpYTRdLEQptfhcaEQpMWRcbGhsbEQpZSRcRClleF2hjeREKQ04XSxsYGmJCH2lhGEd+GXhzB x96GxIYHlweEQpFQxcWaGgdbBgabhwHbGseEgceaR1sBxMTH2gHaWlpG2sdExxraGgZakNJRkV fTgRJRUcUEQpYXBcZBBoEGx4HTU4cExoaHRMFGx0EGx0YBBIZBBsdEBseGh8bEQpeWRdhHmZDf xEKQ1oXGx0EGB4fBBgeBBsYHREKQkUXbU0bGGJMXUdJGGIRCkJOF2tFGlJQHkNcWVxoEQpCTBd jTlJGc2hsa2V8HREKQmwXaHtbfRx4fm9PRkQRCkJAF2BOU0hsWhkYQ3BtEQpCWBdhWnJnexJka F1mUBEKcGgXaVNMWURwHWddZUARCnBoF2xTcBhpBWteHlpAEQpwaBdlQGBAcBpeZmJGXxEKcGg XbR58XV4ZE3NoQ3sRCnBoF29HemEBYlxEBUFJEQpwaxdpSG8eQmhdGFhEexEKcEsXbE5oeGhtb x9jYWgRCnBsF28TThgbcBkdeBhFEQ==
X-CLX-Spam false
X-CLX-Score 1011
X-Proofpoint-Virus-Version vendor=fsecure engine=2.50.10432:5.12.52,1.0.14,0.0.0000 definitions=2014-06-25_06:2014-06-25,2014-06-25,1970-01-01 signatures=0
X-Proofpoint-Spam-Details rule=notspam policy=default score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1406250189
X-Mailman-Approved-At Wed, 25 Jun 2014 20:31:22 +0200
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11239.1403721083.18130.python-list@python.org> (permalink)
Lines 137
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1403721083 news.xs4all.nl 2933 [2001:888:2000:d::a6]:42342
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73584

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi all,

I'm trying to vend some kind of server that spawns a client-unique subprocess when a client connects. The server acts as a middleman, receiving structure messages from the client, sending input to the subprocess, and packaging up subprocess data before sending back to the client. The connection is long-lived and the client can continue to send "requests". If the subprocess crashes or dies, the server should be able to revive it transparently.

I know how to separately create server and subprocess protocols and having the event loop run either until completion, but what is the best way to chain two protocols together?

|| Client || <~~ TCP ~~> || Server <--> Subprocess ||

Regards,
David

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


Thread

asyncio: wrapping a subprocess in a server David Farler <accumulator@icloud.com> - 2014-06-25 11:24 -0700

csiph-web