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


Groups > comp.lang.python > #16845

Re: Need some IPC pointers

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'languages,': 0.03; 'python)': 0.05; 'situation.': 0.05; 'json': 0.07; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'restful': 0.09; 'am,': 0.12; 'library': 0.13; 'protocol': 0.15; '"long': 0.16; '3.2,': 0.16; 'both.': 0.16; 'independent,': 0.16; 'it).': 0.16; 'lan': 0.16; 'runtime.': 0.16; 'wrote:': 0.18; 'possibly': 0.19; 'written': 0.20; 'suggest': 0.20; '(but': 0.21; "aren't": 0.21; 'appropriate': 0.22; 'header:In-Reply-To:1': 0.22; 'format,': 0.24; "python's": 0.24; "i'm": 0.26; 'server': 0.30; 'fairly': 0.30; 'context,': 0.30; 'parent': 0.30; 'plus,': 0.30; 'subject:some': 0.30; 'xml': 0.31; "i've": 0.31; "i'll": 0.31; 'andrew': 0.32; 'necessary.': 0.32; 'header:User-Agent:1': 0.33; 'rather': 0.33; 'header:X-Complaints-To:1': 0.33; 'there': 0.33; 'done': 0.34; 'to:addr:python-list': 0.34; 'anything': 0.34; 'languages.': 0.34; 'running': 0.35; 'something': 0.35; 'problem.': 0.36; 'received:au': 0.36; 'http': 0.37; 'but': 0.37; "there's": 0.37; 'think': 0.37; 'received:org': 0.38; 'some': 0.38; 'client': 0.39; "i'd": 0.39; 'either': 0.39; 'being': 0.39; "it's": 0.40; 'to:addr:python.org': 0.40; 'communicate': 0.40; 'your': 0.61; 'internet.': 0.65; 'ever': 0.65; 'transfer': 0.72; 'research,': 0.84; 'nice,': 0.84; 'interchange': 0.91; 'received:110': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Lie Ryan <lie.1296@gmail.com>
Subject Re: Need some IPC pointers
Date Fri, 09 Dec 2011 03:21:52 +1100
References <4ED69A1A.3080609@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 110-175-240-90.static.tpgi.com.au
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0
In-Reply-To <4ED69A1A.3080609@gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3427.1323361340.27778.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1323361340 news.xs4all.nl 6900 [2001:888:2000:d::a6]:54727
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:16845

Show key headers only | View raw


On 12/01/2011 08:03 AM, Andrew Berg wrote:
> I've done some research, but I'm not sure what's most appropriate for my
> situation. What I want to do is have a long running process that spawns
> processes (that aren't necessarily written in Python) and communicates
> with them. The children can be spawned at any time and communicate at
> any time. Being able to communicate with non-local processes would be
> nice, but is not necessary. The implementation needs to be
> cross-platform, but child processes will use the same OS as the parent
> during runtime.
> I don't think I'll ever need to transfer anything complicated or large -
> just strings or possibly tuples/lists. I'd rather not go outside the
> standard library (but I'd consider it). I don't need to worry about
> compatibility with older Python versions; if it only works with Python
> 3.2, that's not a problem.
> I'm thinking sockets, but perhaps there's something simpler/easier.
>

Considering your requirements, I'd suggest a RESTful web service. It is 
fairly trivial to write HTTP clients in most languages, and python's 
standard library comes with a simple HTTP server so writing the server 
is easy as well.

In context, the "long running process" will be the "server", the 
"children processes" will be the "client". Writing HTTP client is fairly 
trivial in most languages, the protocol is platform independent, and it 
is fairly trivial to communicate with non-local processes over the LAN 
or the Internet. As a plus, it's well standardized.

As the data interchange format, I suggest either xml or json. There is a 
library for xml and json in almost any popular languages. Python comes 
with both.

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


Thread

Re: Need some IPC pointers Lie Ryan <lie.1296@gmail.com> - 2011-12-09 03:21 +1100

csiph-web