Skip to content

add sdpi p history service option#452

Open
d-gregorczyk wants to merge 96 commits into
masterfrom
360-add-sdpi-p-history-service-option
Open

add sdpi p history service option#452
d-gregorczyk wants to merge 96 commits into
masterfrom
360-add-sdpi-p-history-service-option

Conversation

@d-gregorczyk

@d-gregorczyk d-gregorczyk commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

☑ Mandatory Tasks

The following aspects have been respected by the pull request assignee and at least one reviewer:

  • Changelog update (necessity checked and entry added or not added respectively)
    • Pull Request Assignee
    • Reviewer

@d-gregorczyk d-gregorczyk linked an issue Jun 19, 2025 that may be closed by this pull request
@JavierEspina JavierEspina added this to the SDPi 2.2 Review milestone Jun 20, 2025
@PaulMartinsen

PaulMartinsen commented Jun 27, 2025

Copy link
Copy Markdown
Collaborator

Suggest changing R0512 to something like:

The provider shall transmit hm:HistoricMdib before transmitting each contiguous MDIB Sequence of Changes in the range requested by a consumer.
Note: this allows a provider to skip over gaps in its historical record while providing a MDIB Configuration for the consumer to apply changes to.

Possible need to tweak R0514 to something like:

For an MDIB Sequence of Changes that is requested from a SOMDS Provider, the SOMDS Provider shall provide exactly one MDIB Configuration in hm:ChangeSequence/hm:HistoricMdib for each contiguous MDIB sequence of changes.

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:

  1. the consumer requests all (or most) of the history available, and
  2. the provider has limited memory and must discard old history records to make room for new changes to the mdib.

Some available options :

  1. End subscription:
  • The provider ends the history subscription, possibly with a (new) fault message.
  • The consumer starts a new history subscription and gets the next lot of data.
  • Repeat above steps each time items are lost from this history.
  1. Send with gaps:
  • The provider skips over the missing data and continues with what it has.
  • This is (probably?) useless to the consumer who doesn't have a mdib starting point to apply changes to.
  1. Send with gaps and starting mdib
  • The provider sends a full mdib snapshot (if this was requested by the original subscription)
  • Provider continues with change reports.

I quite like option 3 because:

  • it avoids multiple subscriptions (with potential race conditions) and doesn't require any special handling of fault messages on the consumer end.
  • the provider does its best to provide the information requested and while still letting the consumer create coherent mdib state.
  • its more likely to avoid lost history than if the consumer has to re-subscribe. The consumer can unsubscribe if it doesn't want any more data following a gap.

If the consumer didn't request a baseline mdib, we could sensibly fallback to option 1: end the subscription.

Note

Added to review.

@PaulMartinsen

PaulMartinsen commented Jun 27, 2025

Copy link
Copy Markdown
Collaborator

I would quite like to be able to omit waveform streams from the history because:

  1. they use up a lot of memory,
  2. an hour old waveform stream may often not be relevant anymore, and
  3. a deeper history of states other than waveform streams may be more relevant than a shallow history with waveform streams.

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:

  1. without disclosing this to the consumer (except perhaps in the documentation), or
  2. by sending RealTimeSamleArrayMetricState with @Off.

Or maybe there is no value in waveform streams in the historic record and they could just be omitted completely? That is, remove msg:WaveformStream from the HistoricReportType in HistoryModel.xsd

The main problem seems to be missing state versions (R1005), although I think we need to get rid of that one anyway.

Note

This is addressed in R0516 now

Comment thread asciidoc/listings/vol2-clause-appendix-a-mdpws-dev-32-subscribe.xml
Comment thread asciidoc/listings/vol2-clause-appendix-a-mdpws-dev-32-subscribe.xml Outdated
Comment thread asciidoc/volume2/dev-32/tf2-ch-a-mdpws-dev-32.adoc
Comment thread sources/history-service/HistoryModel.xsd
@PaulMartinsen

PaulMartinsen commented Jul 5, 2025

Copy link
Copy Markdown
Collaborator

The sequence diagrams weren't showing up for me. It looks like the action isn't copying them into the supplement from .ci\asciidoc-converter\images when it makes the zip file I downloaded from https://github.com/IHE/DEV.SDPi/actions/runs/15761385158

Note

Works now.

Comment thread asciidoc/plantuml/vol2-figure-dev-32-usecase-one-sequence-id.puml
Comment thread asciidoc/listings/vol2-clause-appendix-a-mdpws-dev-32-subscribe.xml Outdated
Comment thread asciidoc/volume2/history-service/tf2-ch-a-mdpws-history-service.adoc Outdated
Comment thread asciidoc/volume2/history-service/tf2-ch-a-mdpws-history-service.adoc Outdated
@d-gregorczyk d-gregorczyk marked this pull request as ready for review June 12, 2026 12:53
@PaulMartinsen PaulMartinsen linked an issue Jun 16, 2026 that may be closed by this pull request
@d-gregorczyk d-gregorczyk requested a review from alex-pe1 June 17, 2026 06:27

@PaulMartinsen PaulMartinsen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've focused on changes to improve clarity and provide a good starting point for trial implementation.

Comment thread asciidoc/volume2/history-service/tf2-ch-a-mdpws-history-service.adoc Outdated

NOTE: A <<vol1_spec_sdpi_p_actor_somds_provider>> may respond with data that exceed the interval of ++[hm:VersionRange/@StartVersion, hm:VersionRange/@EndVersion]++.

NOTE: A <<vol1_spec_sdpi_p_actor_somds_provider>> may respond with a subset of data from the interval ++[hm:VersionRange/@StartVersion, hm:VersionRange/@EndVersion]++, e.g., if it cannot fully serve the request due to discarded historic information or filter request that point into the future.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity:

… or filter request that point into the future.

… or the filter requests reports from the future.

****
[NORMATIVE]
====
If it is intended for a <<vol1_spec_sdpi_p_actor_somds_provider>> to include <<term_historic_localized_text>>s in hm:ChangeSequenceReport elements, for an <<term_mdib_sequence_of_changes>> that is requested from a <<vol1_spec_sdpi_p_actor_somds_provider>>, the <<vol1_spec_sdpi_p_actor_somds_provider>> shall transmit filtered <<term_historic_localized_text>>s before transmitting the hm:HistoricMdib or hm:HistoricReport elements that reference the <<term_historic_localized_text>>s.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplify for clarity:

The <<vol1_spec_sdpi_p_actor_somds_provider>> transmitting <<term_historic_localized_text>> shall transmit filtered <<term_historic_localized_text>>s before transmitting hm:HistoricMdib or hm:HistoricReport elements that reference the <<term_historic_localized_text>>s.

Note:
This ensures the localized text is available to the <<vol1_spec_sdpi_p_actor_somds_consumer>> before it is used by other elements.

Comment thread sources/history-service/HistoryModel.xsd
Comment thread asciidoc/volume2/history-service/tf2-ch-a-mdpws-history-service.adoc Outdated
Comment thread asciidoc/volume2/history-service/tf2-ch-a-mdpws-history-service.adoc Outdated
Comment thread asciidoc/volume2/dev-32/tf2-dev-32.adoc Outdated
Comment thread asciidoc/volume2/dev-32/tf2-dev-32.adoc Outdated
d-gregorczyk and others added 2 commits June 19, 2026 15:01
Co-authored-by: Alexander Pentzel <89145096+alex-pe1@users.noreply.github.com>
Co-authored-by: Alexander Pentzel <89145096+alex-pe1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Add SDPi-P History Service Option to TF-1 History: add LastReport attribute to simplify processing Add SDPi-P History Service Option

5 participants