[Tutor] serial data capture/event driven help (fwd)

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Thu Dec 15 22:53:50 CET 2005


[keeping Tutor in CC]

---------- Forwarded message ----------
Date: Thu, 15 Dec 2005 13:40:11 -0600
From: Bobby Castleberry <bob at farms.coop>
To: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
Subject: Re: [Tutor] serial data capture/event driven help

Danny Yoo wrote:
  > There's a module for handling the serial port called PySerial:
>
>     http://pyserial.sourceforge.net/
>
> Does this look useful for you?  You could set up a thread to read data
> from each of your those ports, and just call read().

The threading on this worries me because the app could end up scaling
very large and the program will be running on a vmware box with already
reasonable utilization.  I've read on several lists that threading
becomes mighty complicated when you start scaling up.  Our perl guy has
a program that is collecting off of four scales currently (was thinking
about reusing his implementation) but with threads and poling it pegs an
athlon 2800+ at 80% cpu and it's the only thing running.  Of course that
could just be perl and the way it handles threading.  I'll probably take
a run at implementing this with threads and polling first just to see
how it performs (doesn't seem difficult in theory :).

>
> but I don't know how far this has gone yet; you may want to talk with the
> Twisted folks for an up-to-date status on it.

I've heard the twisted project mentioned a few times on the list and was
hoping to get a eye brow raise from someone who has sunk their teeth in
it.  Just kind of looking for a red light, green light type of feeling
before I proceed to bang my head against the concept of asynchronous
programming some more (is that learning through osmosis).  I appreciate
the links though, I hadn't read about the other asynchronous serial
project before so maybe I can take my time learning twisted and just
whip this out using the other module.  Anyone know of a link for the
"Bent" module, I'm not getting anything useful through google.  I
haven't joined the twisted list yet.  Judging by the archive the topics
are a bit over my head at this stage of the game, although a twisted
beginner list would be handy if said thing exists.


-- 
Bobby Castleberry
System Administrator
Meadowbrook Farms Coop




More information about the Tutor mailing list