I am about to start a new software application and am exploring options. I am enjoying what I see so far for Workers, but had a question for how you see the "standard" way of streaming data from N to N.
Our system would have N number of Hardware Workers that handle all of the interaction with each piece of hardware. These would be subWorkers from a "control" worker. I want to broadcast that data so that any other worker can receive it, if they have subscribed to it. (I'm imaging using User Events for this.) The number of subscribers could be N number and would need to operate asynchronously. Imagine these as "reporters" that could be writing to file, database, or display. The User Event would be created at the Top Level Worker and be given to all subWorkers as they are generated, to ensure a single shared User Event that any given Worker can choose to subscribe to or not.
I know this inherently breaks the 1 to 1 messaging Workers has, but unsure how else to stream data like this in the framework. All the rest of messaging would follow the standard Workers API.
The data being streamed would all be some child of a custom Data.lvclass hierarchy, so handling the data types wouldn't be a concern at this level.
Is there a better way of doing this in the Workers framework that I am not seeing?
Pub/Sub or data broadcasting possibilities
1 reply