Subscribing to assets #478
Replies: 5 comments
-
There are two data items for each device AssetChanged and AssetRemoved. Changed handles all adds and updates, removed handles removals where the asset is marked for removal. If you listen to those two data items it should do what you want. Once you get the asset id from the event, you can query for the new asset. |
Beta Was this translation helpful? Give feedback.
-
That doesnt seem to scale. What happens when there are a sufficiently large number of devices? All devices have to be listening to all other devices? |
Beta Was this translation helpful? Give feedback.
-
to be clear, i am asking this int the context of tasks assets |
Beta Was this translation helpful? Give feedback.
-
This works the same for all asset types. Each device will need to listen to other devices in their domain. It will scale since the amount of data will be very small if you only subscribe to a few event types. The issue in a distributed system is you need to have peer to peer connections. This is where we can consider discovery as a necessary part of this solution. We should discuss discovery as well. |
Beta Was this translation helpful? Give feedback.
-
Can you walk me through how a Lets take a potential robotic machine tender collaborator looking for a task to do for example. Instead:
do i have that right? |
Beta Was this translation helpful? Give feedback.
-
Question about cppagent capability: can we open a stream on /assets endpoint? Or is there some other "subscribe"-like mechanism for assets? Such as opening a stream on /sample, but for assets?
Were implementing Task assets and looking to avoid polling if possible.
Beta Was this translation helpful? Give feedback.
All reactions