Hi Rob,
Interesting questions.
1. Each of the owshell programs (owread, owwrite, ...) are small utilities.
They do require a process creation and a tcp connection setup (no persistent
connections), but that may be quite acceptable on a modern server -- the
1-wire bus tends to be the limiting step.
2. owserver handles the multiple requests (I assume from different looping
scripts so concurrent) fairly efficiently. The whole bus is locked when
required, and individual devices are locked if a longer transaction is
needed. Still, there is no prioritization on lock or device access. It
wouldn't be hard to do, but we should establish a need before adding more
complexity.
3. Sharing data between processing is easiest with a database, Probably
ram-based. An alternative would be using perl with OWNET.pm where a complex
loop would be easy with shared data
4. Looking at the perl threading model,
http://migo.sixbit.org/papers/Perl_Threads/ it appears that sharing data
between threads is possible
http://search.cpan.org/~jdhedden/threads-shared-1.24/shared.pm but I'd have
to investigate further whether the module is reaqlly thread-safe (there is a
small amount of state data on the network connection and persistence that
might not like being shared, though each thread could set up it's own
connection to owserver).
Paul Alfille
On Mon, Jul 21, 2008 at 5:55 AM, Rob Conway <[EMAIL PROTECTED]> wrote:
> As the owfs threads have been quiet for a while I hope you don't mind
> this question about data gathering…..I know this is really a scripting
> question however thoucght someone might want to share there thoughts in how
> best to scan lots of 1wire data to be shared between multiple scripts.
>
> I just use multiple bash scripts at the moment, sometimes multiple scripts
> read the same data via OWFS and it is getting harder to manage
>
>
>
> *Objective* - I want to optimize the data gathering to be the fastest
> and most reliable as possible thus decouple the data reading from the
> various scripts I use. However If I optimize data reading (fastest
> possible) will the DO get reliably sent. ? This is very important and should
> take priority over reading data.
>
>
>
>
>
> *My Data*
>
> 12 analog signals from 3 off DS2450 (quad A/D).. This gets sampled every
> 90 seconds and averaged with the last three readings. The 2450 is only 8
> bits and I need to average 4 samples to get repeatable readings .
>
> 4 counter inputs from DS2423 (dual channel counters) This data get read
> every 5 minutes…No need to average
>
> Digital I/O from 8 off DS2405/06 gets read every 2 seconds. (1 second would
> be great)
>
>
>
> *Considerations*
>
> I use a Ubuntu server and use owread and owwrite, I do not use FUSE. I
> understand FUSE could possibly assist however as I need to average and
> provide calculations on the data to get it to engineering units, I cannot
> use FUSE directly. The digital inputs are from push buttons and level
> switches so I need to read uncached data. I use rrdtools to collect the
> data.
>
>
>
> *Current thoughts*
>
>
>
> A dedicated read script shoving data into text files that the other scripts
> can read,
>
> Or
>
> maybe setup ~30 system variables that the OWFS read script uses as
> storage. I have never created system variables, I assume they are located
> in ram. Is there any contention between multiple scripts reading from
> system variables ? Does anybody use this technique ? How best to handle
> writing to digital outputs. ? Would another scripting language assist (i.e.
> perl)
>
>
>
> cheers
>
> rob
>
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers