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


Groups > comp.lang.python > #80965

Re: OTish: using short-term TCP connections to send to multiple slaves

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.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'say,': 0.05; 'context': 0.07; 'prototyping': 0.07; 'suggestions,': 0.07; 'pointers': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:using': 0.09; 'python': 0.11; '*any*': 0.16; '...,': 0.16; 'attempted': 0.16; 'available;': 0.16; 'elsewhere.': 0.16; 'expecting': 0.16; 'rabbitmq': 0.16; 'received)': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'rings': 0.16; 'seconds,': 0.16; 'slave': 0.16; 'subject:send': 0.16; 'tcp': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'machine': 0.22; 'header:User-Agent:1': 0.23; 'of.': 0.24; 'prototype': 0.24; 'header:X-Complaints-To:1': 0.27; 'point': 0.28; 'wondering': 0.29; 'changed.': 0.31; 'maintains': 0.31; 'probably': 0.32; 'maintaining': 0.32; 'device': 0.34; 'trouble': 0.34; 'connection': 0.35; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'data,': 0.36; 'done': 0.36; 'thanks': 0.36; 'similar': 0.36; 'should': 0.36; 'half': 0.37; 'list': 0.37; 'server': 0.38; 'problems': 0.38; 'connections': 0.38; 'needed': 0.38; 'to:addr :python-list': 0.38; 'previous': 0.38; 'little': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'devices': 0.61; 'forum': 0.61; 'new': 0.61; 'such': 0.63; 'our': 0.64; 'face': 0.64; 'talking': 0.65; 'close': 0.67; 'messaging': 0.68; 'periodically': 0.68; 'acts': 0.74; 'connection.': 0.74; 'long- term': 0.74; 'upper': 0.74; 'power': 0.76; 'bells': 0.84; 'cable': 0.84; 'here...': 0.84; 'hour,': 0.84; 'dozen': 0.91; 'connection,': 0.95
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: OTish: using short-term TCP connections to send to multiple slaves
Date Mon, 17 Nov 2014 09:16:59 +0100
Organization None
References <SMCdnZ700MHHD_XJnZ2dnUVZ8iSdnZ2d@brightview.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p57bd8ca6.dip0.t-ipconnect.de
User-Agent KNode/4.13.3
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.15951.1416212236.18130.python-list@python.org> (permalink)
Lines 45
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416212236 news.xs4all.nl 2867 [2001:888:2000:d::a6]:57754
X-Complaints-To abuse@xs4all.nl
Path csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:80965

Show key headers only | View raw


jkn wrote:

> Hi all
>     This is a little bit OT for this newsgroup, but I intend to use python
> for prototyping at least, and I know there are a lot of knowledgeable
> people using Python in a Network context here...
> 
> I have a use case of a single 'master' machine which will need to
> periodically 'push' data to a variety of 'slave' devices on a small local
> subnet, over Ethernet. We are talking perhaps a dozen devices in all with
> comms occurring perhaps once very few seconds, to much less often - once
> per half an hour, or less. There is probably an upper bound of 64KB or so
> of data that is likely to be sent on each occasion.
> 
> Previous similar systems have attempted to do this by maintaining multiple
> long-term TCP connections from the master to all the slave devices. The
> Master is the server and the slaves periodically check the master to see
> what has changed. Although this ... works ..., we have had trouble
> maintaining the connection, for reasons ... I am not yet fully aware of.
> 
> We are now considering an alternative approach where the master maintains
> a list of slave devices and acts as a client. Each device is a server from
> the point of view of data transfer. We would then use a short-lived TCP
> connection when data is available; the Master would connect to each slave
> which needed the data, send it, and close the connection.
> 
> I should also add that we desire our system to be 'robust' in the face of
> situations such as cable unplugging, device power cycles, etc.
> 
> Although this might get round some of our current problems, I can see that
> we might end up with new problems to deal with. I am wondering if this
> scenario rings bells with anyone, and seeking pointers to what has been
> done elsewhere. As I say, I am expecting to prototype it in Python so any
> specifics also welcome!
> 
> (suggestions as to a better forum to ask for previous experience also
> gratefully received)
> 
> Thanks al lot for any thoughts/suggestions

You said *any* suggestions, so:

I know nothing about them, but would a messaging infrastructure like 
RabbitMQ or ZeroMQ be useful?

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


Thread

OTish: using short-term TCP connections to send to multiple slaves jkn <jkn_gg@nicorp.f9.co.uk> - 2014-11-16 12:02 +0000
  Re: OTish: using short-term TCP connections to send to multiple slaves Chris Angelico <rosuav@gmail.com> - 2014-11-16 23:36 +1100
  Re: OTish: using short-term TCP connections to send to multiple slaves Marko Rauhamaa <marko@pacujo.net> - 2014-11-16 14:44 +0200
  Re: OTish: using short-term TCP connections to send to multiple slaves Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2014-11-16 14:43 +0100
    Re: OTish: using short-term TCP connections to send to multiple slaves Chris Angelico <rosuav@gmail.com> - 2014-11-17 02:13 +1100
      Re: OTish: using short-term TCP connections to send to multiple slaves Grant Edwards <invalid@invalid.invalid> - 2014-11-16 16:53 +0000
      Re: OTish: using short-term TCP connections to send to multiple slaves Roy Smith <roy@panix.com> - 2014-11-16 12:21 -0500
        Re: OTish: using short-term TCP connections to send to multiple slaves Grant Edwards <invalid@invalid.invalid> - 2014-11-16 17:35 +0000
        Re: OTish: using short-term TCP connections to send to multiple slaves Chris Angelico <rosuav@gmail.com> - 2014-11-17 08:56 +1100
          Re: OTish: using short-term TCP connections to send to multiple slaves alister <alister.nospam.ware@ntlworld.com> - 2014-11-17 10:46 +0000
      Re: OTish: using short-term TCP connections to send to multiple slaves jkn <jkn_gg@nicorp.f9.co.uk> - 2014-11-16 21:45 +0000
        Re: OTish: using short-term TCP connections to send to multiple slaves Grant Edwards <invalid@invalid.invalid> - 2014-11-17 16:56 +0000
  Re: OTish: using short-term TCP connections to send to multiple slaves Grant Edwards <invalid@invalid.invalid> - 2014-11-16 16:42 +0000
  Re: OTish: using short-term TCP connections to send to multiple slaves Peter Otten <__peter__@web.de> - 2014-11-17 09:16 +0100

csiph-web