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


Groups > comp.lang.python > #81399

Re: Recurring Task

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <drsalists@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.016
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'cpython': 0.05; 'hosts': 0.07; 'advice.': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; "wouldn't": 0.14; '23,': 0.16; 'bound,': 0.16; 'cc:name:python list': 0.16; 'thread,': 0.16; 'timestamp': 0.16; 'twisted': 0.16; 'worst': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'fine': 0.24; 'cc:2**0': 0.24; 'options': 0.25; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'use?': 0.31; 'this.': 0.32; 'probably': 0.32; "i'd": 0.34; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'module.': 0.36; 'project': 0.37; 'nov': 0.38; "you're": 0.61; 'soon': 0.63; 'home': 0.69; 'wish': 0.70; '100%': 0.77; '100': 0.79; 'messed': 0.84; 'polling': 0.84; 'good,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9oeENF7iNh2o+NLyPuhf8cid5kGexFn5bP4FVTQofCE=; b=EaxFNZqWB46LkbpLw4iddWlYRwzT+yTQKYRkNAcycPWOoX8mk0ChuvjLRZBsLVkTH5 UH/zBxVDLS4dlx21D0a+PxJVqHAJubpV+yGJ8HRM/7PUdmO0RoaSL7h1lWfoWO+W5Z7h 1DmPTrdeyRm0u4Of3Jc1FnN/T8CS3hv+d9maSIyOF3+oNnplhNEzbrD+U150nrhgsrFj iAQccOji5nflggrPtcD5c2TKvZX65KG1tsro1pTxUSAlLF060w0TgVvC7AqrsNPOUToY pvcIWRzBZAllpPtGMM7z4sBzV/IfATArrSga2EZK7/VIUPow5jkV9g17V+f576EJu6PR IZvg==
MIME-Version 1.0
X-Received by 10.152.88.69 with SMTP id be5mr16941578lab.36.1416772118175; Sun, 23 Nov 2014 11:48:38 -0800 (PST)
In-Reply-To <4a496b58-867f-43ae-b6f9-48f4d885b170@googlegroups.com>
References <4a496b58-867f-43ae-b6f9-48f4d885b170@googlegroups.com>
Date Sun, 23 Nov 2014 11:48:38 -0800
Subject Re: Recurring Task
From Dan Stromberg <drsalists@gmail.com>
To tim@timothyarnold.co.uk
Content-Type text/plain; charset=UTF-8
Cc Python List <python-list@python.org>
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.16205.1416772126.18130.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416772126 news.xs4all.nl 2845 [2001:888:2000:d::a6]:44723
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:81399

Show key headers only | View raw


On Sun, Nov 23, 2014 at 7:23 AM,  <tim@timothyarnold.co.uk> wrote:
> Hi All
> Looking for some advice. I'm creating a small netwok poller and wondered what people recommend to use? Will be polling up to 100 hosts every ten reconds or so
>
> Options I can see
>
> Home grown using worker threads with Queue and dispatcher based on timestamp

This might be good, as might the multiprocessing module.

> Twisted timer service

I wouldn't wish a large Twisted project on my worst enemy.  If you
need async, you might consider gevent.

> Python Scheduler

Perhaps - I have no experience with this.

I'd probably go the multiprocessing route.  multithreading is fine
with CPython if you're 100% I/O bound, but as soon as you add one
CPU-bound thread, the multitasking gets all messed up - unless you
move to jython.

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


Thread

Recurring Task tim@timothyarnold.co.uk - 2014-11-23 07:23 -0800
  Re: Recurring Task Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-11-23 13:35 -0500
  Re: Recurring Task Dan Stromberg <drsalists@gmail.com> - 2014-11-23 11:48 -0800
  Re: Recurring Task Dan Stromberg <drsalists@gmail.com> - 2014-11-23 11:56 -0800

csiph-web