Bidirectional provider implementation#149
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #149 +/- ##
==========================================
- Coverage 63.77% 62.69% -1.08%
==========================================
Files 36 37 +1
Lines 17637 18325 +688
==========================================
+ Hits 11248 11489 +241
- Misses 6389 6836 +447 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4117bb6 to
e06d186
Compare
a9ab8a7 to
26d129c
Compare
|
I also noticed during some testing that no UpdateFilter request is sent to the provider if no timebased filter is given in the VISS subscription message. Is this intentional? How would the provider in this case know, when to send new values? |
Yes, it is intentional, my interpretation is that TimeBased filter is kind of mandatory -> (Arguments, of which path and filter are mandatory) https://www.w3.org/TR/viss2-core/#subscribe I cannot find anywhere in the specification what should be the expected behaviour if the TimeBased filter is not provided in the subscribe request https://www.w3.org/TR/viss2-core/#timebased-filter-operation |
|
In general I agree with @rafaeling, it seems not to be stated as clear as we would want: You can understand it in two ways:
but since it is in the same sentence it leaves doubts if timebased filter is mandatory. |
I think there is a misunderstanding here. Our goal was not only to allow the client to basically throttle the sending of values but also to allow subscription based systems as a provider. It should be possible to have a provider that only sends values as long as at least one client is subscribed. This would help to reduce system load and unnecessary computations that might be necessary to transform "raw" signals to VSS signals before they are published to the databroker. If an UpdateFilterRequest is now only sent when a subscription filter is present, the provider can never be sure if a client (without filter) is subscribed or not. Thus, the provider would need to send values all the time, just like in the current implementation. |
Fixed: If the subscribe method doesn’t specify a TimeBased filter, the default time_interval value used will now match the value provided when the signal is claimed from the databroker. |
62602b7 to
1010e8f
Compare
|
https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/5893 since it is an eclipse wide issue and all checks beside the one are not failing its good to merge. |
f2097f8 to
956e338
Compare
Introduced the FilterManager structure to manage filter subscriptions based on the lowest time interval.
Added new fields to the Subscriptions struct to manage ChangeSubscription and Providers by their UUID.
Modified sender: broadcast::Sender in ChangeSubscription to sender: broadcast::Sender<Option> to allow receiving None when the sender is gone. This enables returning an error (VISS case) or None to the consumer.
Implemented logic to propagate time-based filters to providers, notify subscriptions according to the time interval, and claim signals by providers during startup.
Added VISS subscription integration tests.