On Sun, 19 Jun 2022, andrey100100...@gmail.com wrote:
Yes, you were absolutely right, the thread library needs some work.

It is impossible to use multiple processes with notes, due to the
exhaustion of the NFN limit.

Andrej, what are you going to do with alarm in the real thing?

You could use threads (cooperative round-ribbon multitasking) using
some data log to register their state and use a "master" thread to
control them (kill them, change some data structure, etc).

You can use rfork, locks, pipes, etc and forget about libthread.

You could experiment with the topology of the nodes, for example
instead of a big star you can simplify things a lot using chains
of nodes where the last node sends the chain data to the analyzer
(you were talking about polling sensors):

aNode1 --> aNode2 --> aNode3 --> ... --> aNoden -->
                                                                                      
> --- > Anz
bNode1 --> bNode2 --> bNode3 --> ... --> bNoden -->

Imagine that n=100. Each node only has to make a connection with
2 nodes (the first of the chain just one), adding data to the
received one and send it to the next. Anz only has to make a
connection with the last nodes of the chains, two in this case,
and process the data received. Of course you have to play with your
numbers, the acceptable delay, etc.

I'm pretty sure people here could point you to some examples using
plan9, and note that you could use raspberry pi zeros as nodes.

Have fun.

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Tfa6823048ad90a21-Md1b869bf61deccadf9733908
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to