-
Notifications
You must be signed in to change notification settings - Fork 1
add sdpi p history service option #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…transaction summary anchors.
… technologies such that protocol buffers.
Suggest changing R0512 to something like:
Possible need to tweak R0514 to something like:
Reasoning:I was thinking more about the case where a provider starts providing history information but some of the history becomes unavailable before it is delivered. This could occur when:
Some available options :
I quite like option 3 because:
If the consumer didn't request a baseline mdib, we could sensibly fallback to option 1: end the subscription. |
I would quite like to be able to omit waveform streams from the history because:
But the general case, where providers may omit any information, seems quite complicated and could be problematic. That is, important context may be lost. Could the provider be allowed to omit waveform streams either:
Or maybe there is no value in waveform streams in the historic record and they could just be omitted completely? That is, remove The main problem seems to be missing state versions (R1005), although I think we need to get rid of that one anyway. |
--> | ||
<wse:Filter Dialect="urn:oid:1.3.6.1.4.1.19376.1.6.2.10.1.3.1.1"> | ||
<hm:ProvideInitialMdib>...</hm:ProvideInitialMdib> | ||
<hm:LanguageFilter/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the <hm:LanguageFilter/>
here could be more generic because histories are potentially large and some one to manage that may be helpful.
So, for example, <hm:Filter Dialect="urn:oid:language-oid"/>
. With 0 or more allowed. And that providers must also support http://docs.oasis-open.org/ws-dd/ns/dpws/2009/01/Action
and should support sdc.filter://Handle
. (must and should for consistency with DWPS and 20701 R0039 ).
It would be nice if absence of the action or handle filter implied including everything. Is it a problem that's inconsistent with the language filter behaviour?
<hm:Range> | ||
<hm:Version SequenceId="..." StartVersion="..." EndVersion="..."/> | ||
</hm:Range> | ||
<hm:TimeRange StartTime="4294967295" EndTime="4294967295"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From HistoryModel.xsd
I think this should be something like:
<hm:Range>
<hm:Version SequenceId="..." StartVersion="..." EndVersion="..."/>
<-- 'Range' may be alternatively supplied using time-stamps, though versions are preferred:
<hm:Time StartTime="4294967295" EndTime="4294967295"/>
-->
</hm:Range>
`s12:Envelope/s12:Body/wse:Subscribe/wse:Filter/@Dialect`:: To be set to `urn:oid:1.3.6.1.4.1.19376.1.6.2.10.1.3.1.1`, which is the default one defined in this specification. Other dialects may be supported but are not in the scope herein. | ||
`s12:Envelope/s12:Body/wse:Subscribe/wse:Filter/hm:ProvideInitialMdib`:: Set to `true` if an initial <<acronym_mdib>> is requested or `false` otherwise. | ||
`s12:Envelope/s12:Body/wse:Subscribe/wse:Filter/hm:LanguageFilter`:: A list of languages for localized texts to be requested (see data type description in <<vol2_clause_appendix_a_mdpws_history_service_xmlschema>> for more details). | ||
`s12:Envelope/s12:Body/wse:Subscribe/wse:Filter/hm:Range`:: A range that selects the historic <<acronym_mdib>> data, either based on time frames or <<acronym_mdib>> versions (see data type description in <<vol2_clause_appendix_a_mdpws_history_service_xmlschema>> for more details). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to deal with time epochs here? I can see three options:
- drop support for requesting history by time, or use relative time like subscriptions.
- leave the provider free to decide which time-reference frame it should use when comparing mdib timestamps and history query time-stamps.
- add attributes to select epoch.
1 seems best to me, but I'm not sure what the use cases are for this one. 2 seems okay as well because time is supposed to be UTC time, which is independent of non-slewing time-adjustments. If 2, perhaps a note along the lines : "The provider may not reliably select the correct change reports for time ranges that span an abrupt time adjustment".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any value for consumers in allowing hm:Range
and/or either range limit to be omitted to ask for:
- everything available (
hm:Range
omitted), - everything up to a specific mdib version/time
@StartVersion
or@StartTime
omitted, - everything from a specific mdib version/time to the time the subscription was created (
@EndVersion
or@EndTime
omitted)
<xsd:documentation>Zero or more ChangeSequence elements to describe changes of different MDIB sequences and/or instance numbers.</xsd:documentation> | ||
</xsd:annotation> | ||
</xsd:element> | ||
</xsd:sequence> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding <xsd:attribute name="LastReport" default="false" type="xsd:boolean" use="optional" />
to signal end of reporting sequencing without needing an empty message.
The sequence diagrams weren't showing up for me. It looks like the action isn't copying them into the supplement from |
Consumer <-- Provider: ChangeSequenceReport(ChangeSequence(@SequenceId=X, HistoricReport(@Time=tm>max(tn))*)) | ||
end | ||
|
||
Consumer <-- Provider: SubscriptionEnd(SourceCancelling) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest making the Consumer <-- Provider: SubscriptionEnd(SourceCancelling)
optional for consistency with ws-eventing (where it is a should) :
opt Notification may not be sent
Consumer <-- Provider: SubscriptionEnd(SourceCancelling)
end
Also suggest setting flag on last iteration since this makes life easier for consumers, something like:
loop until no more reports exist for @SequenceId=X
alt Not last iteration
Consumer <-- Provider: ChangeSequenceReport(ChangeSequence(LastReport=false, HistoricReport(@Time=tn>t)*))
else Last iteration
Consumer <-- Provider: ChangeSequenceReport(ChangeSequence(LastReport=true, HistoricReport(@Time=tn>t)*))
end
end
</wse:NotifyTo> | ||
</wse:Delivery> | ||
<!-- | ||
'Expires' can be omitted as the subscription is terminated by the event source when all data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be:
Expires
can be omitted as the subscription should be terminated by the event source when all data....
In WS-Eventing, a missing Expires
means the subscriber is requesting an indefinite lifetime but I don't think the source is required to grant that. So the consumer probably needs to keep renewing the subscription if the subscribe response includes a wse:Expires
and the subscription expires naturally before the consumer receives all data.
Also DEV-27 constrains wse:Expires
to xml-durations, and doesn't allow it to be omitted. I wonder if we should just stick to including the expires element for the history service for simplicity?
|
||
The <<vol1_spec_sdpi_p_actor_somds_provider>> may split the response into multiple reports by sending multiple notifications. | ||
This allows for the <<vol1_spec_sdpi_p_actor_somds_provider>> to stipulate the data rate in which it provides the information to the <<vol1_spec_sdpi_p_actor_somds_consumer>> and avoid exceeding | ||
data size limitations of notifications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth pointing out that the consumer can also control the data rate it accepts the information using the HTTP protocol (i.e., delaying the response code)?
This allows for the <<vol1_spec_sdpi_p_actor_somds_provider>> to stipulate the data rate in which it provides the information to the <<vol1_spec_sdpi_p_actor_somds_consumer>> and avoid exceeding | ||
data size limitations of notifications. | ||
|
||
Once the final report has been sent, the <<vol1_spec_sdpi_p_actor_somds_provider>> sends an empty report and ends the subscription to signify the end of the <<term_history_service>> request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest setting hm:ChangeSequenceReport/@LastReport="true"
for the last report (see other comments) instead of sending an empty report because this eliminates one message, which could fail to get through so including a flag on the message seems much more robust.
Also, ending the subscription seems okay to me. But I wonder, based "signify" and other text, if you mean that the provider must send a subscription end notification. That seems a problem because:
- "signify" to imply sending a notification may be a little opaque,
- consumers are not required to supply an
wse:EndTo
end-point in ws-eventing, - providers are not required to send subscription end notifications by ws-eventing (its only should),
- the end notification could be lost and we haven't specified retry mechanisms.
It seems okay to me for the provider to end the subscription, and for them to should send the end-notification if they like to (that is, consistent with ws-eventing 2004 draft we use). And especially if the consumer could also detect the subscription has ended with hm:ChangeSequenceReport/@LastReport
(I guess that's what they'd do in practice so everything else is just trying to stay consistent with the ws-eventing standards draft, which we might not want to over-specify? ).
But consumers could also detect failure of Renew
operations from ws-eventing (which would return wse:UnableToRenew
). Can't really use GetStatus
because that's not specified by SDPi and its not clear from the ws-eventing draft what a source should do when the status of a subscription that doesn't exist is requested :(.
|
||
Once the final report has been sent, the <<vol1_spec_sdpi_p_actor_somds_provider>> sends an empty report and ends the subscription to signify the end of the <<term_history_service>> request. | ||
|
||
The <<term_history_service>> allows for limited filtering: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest that (for consistency with other profiles/standards) providers must support action based filtering and should support handle based filtering for the history service. So the protocol should support this somehow (see suggestion for one approach in another comment).
Because the history service is a foundational feature that may be used by large and small participants in the future, a little flexibility seems worthwhile even if the business cases aren't 100% clear at the beginning. I know low-resource providers would prefer that consumers only request what they need but providers have no control over that and best they can do is support the mechanisms.
Implementation doesn't seem hard to me if there is a mechanism in the protocol but I don't feel very strongly about this. Mostly because it requires consumers to use it for providers to benefit, which may not happen in practice.
.R0503 | ||
[sdpi_requirement#r0503,sdpi_req_level=shall] | ||
**** | ||
A <<vol1_spec_sdpi_p_actor_somds_provider>> shall provide the <<term_history_service>> by implementing the port type with the QName hs:HistoryService. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the history service mandatory or an option? I guess I think it should be an option because some devices (e.g., a portable pulse oximeter used for spot measurements) may not wish/have the resources to provide history. Devices with reliable connections to the network (e.g., ethernet) may not wish to maintain history either.
In that case, perhaps R0503 could be something like: A provider shall indicate support for the history service by implementing the port type with the QName hs:HistoryService`.
And R0504 would become something like A provider that implements the history service shall accept the ws-eventing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the history service is mandatory, I think providers should be allowed (e.g., by R0504) to respond to subscriptions on the history service with a wse:FilteringRequestedUnavailable
. Other wise they seem to have to send at least one history notification to signal the end of the subscription, which seems like a lot of work to implement and maintain for a null-response.
For a version range-filtered subscription, a <<vol1_spec_sdpi_p_actor_somds_provider>> shall respond with notifications that reflect the MDIB of the <<vol1_spec_sdpi_p_actor_somds_provider>> at the given pm:Mdib@SequenceId and pm:Mdib@InstanceId in the version interval including ++[hm:VersionRange/@StartVersion, hm:VersionRange/@EndVersion]++. | ||
|
||
NOTE: A <<vol1_spec_sdpi_p_actor_somds_provider>> may respond with data that exceed the interval of ++[hm:VersionRange/@StartVersion, hm:VersionRange/@EndVersion]++. | ||
**** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
R0507 and R0508 allow providers to send new mdib updates via the history service (they may respond with data that exceed [start, end]
). They just keep sending change reports. I think this could be great because it saves splitting things up across multiple messages. However, when we last discussed that it wasn't something you wanted. Is that still the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, perhaps we need to note that A provider may respond with a subset of data from the interval [start, end]
This could happen when:
- the provider has discarded historic data to make room for current data (see suggestion in general comments for an idea to deal with gaps),
- the filter requests measurements from the future (either in time or mdib version number).
[sdpi_requirement#r0509,sdpi_req_level=shall] | ||
**** | ||
If a hm:HistoryQuery element contains a hm:LanguageFilter element, a <<vol1_spec_sdpi_p_actor_somds_provider>> shall transmit <<term_historic_localized_text>> according to the rule set specified in hm:HistoryQuery/hm:LanguageFilter. | ||
**** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest, for clarity, a note along the lines: the provider may omit hm:HistoricLocalizedTexts
if it has no information matching the filter to transmit (e.g, doesn't support the language requested).
**** | ||
If it is not intended for a <<vol1_spec_sdpi_p_actor_somds_provider>> to include <<term_historic_localized_text>>s in hm:ChangeSequenceReport elements, the <<vol1_spec_sdpi_p_actor_somds_provider>> shall provide all <<term_historic_localized_text>>s at the LOCALIZATION SERVICE. | ||
|
||
NOTE: This implies that the LOCALIZATION SERVICE provides historic and current localized texts for which all references are consistent across all <<term_mdib_sequence_of_changes>>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at localization really, but reading this I wondered R0509 requires providers to send localized text even if they only have static localized text. Can't the consumer just get the localized text from the localized text service in this case? I think this is worth thinking through because:
- many (most?) providers may only have static localized text
- there might be a lot of localized text so it seems quite inefficient to send it to every history subscription if it never changes. Unless we trying to encourage everyone to support gzip :).
[sdpi_requirement#r0517,sdpi_req_level=shall] | ||
**** | ||
When a <<vol1_spec_sdpi_p_actor_somds_provider>> has sent the last notification of a <<term_history_service>> subscription, the <<vol1_spec_sdpi_p_actor_somds_provider>> shall end the subscription by sending a wse:SubscriptionEnd with wse:Status = "http://schemas.xmlsoap.org/ws/2004/08/eventing/SourceCancelling". | ||
**** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in other comments, I think we need to make this a should for consistency with ws-eventing, absence of retry and consumers are not required to provide an wse:EndTo
address. As I understand it, the wse:Delivery
can't be used for subscription end messages. I might be wrong about that though.
Then this requirement may not be needed, since it seems the same as ws-eventing. Though it does clarify expectations which is always helpful!
☑ Mandatory Tasks
The following aspects have been respected by the pull request assignee and at least one reviewer: