Recurring Task

Dan Stromberg drsalists at gmail.com
Sun Nov 23 14:48:38 EST 2014


On Sun, Nov 23, 2014 at 7:23 AM,  <tim at 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.



More information about the Python-list mailing list