This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Difference between revisions of "Harmonization: add continuationToken to queryAck and queryContinuation"

From HL7Wiki
Jump to navigation Jump to search
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{INM Workitem}}
 
 
Editing of harmonization proposals prior to a harmonization meeting is restricted to the proposal submitter and the co-chairs of the steward comittee. Other changes will be undone. Please add comments to the "discussion" page associated with this proposal.
 
Editing of harmonization proposals prior to a harmonization meeting is restricted to the proposal submitter and the co-chairs of the steward comittee. Other changes will be undone. Please add comments to the "discussion" page associated with this proposal.
  
Line 7: Line 6:
 
|bgcolor="#bbbbff"| '''RECOMMENDATION ID:'''
 
|bgcolor="#bbbbff"| '''RECOMMENDATION ID:'''
 
|-
 
|-
|| Sponsored by: ''Technical Committee name''
+
|| Sponsored by: INM
|| Approval date by committee:
+
|| Approval date by committee: 20061009 (INM Telcon)
 
|-
 
|-
|| Revision (# and date):
+
|| Revision (# and date): 20061009
 
|| Date submitted:
 
|| Date submitted:
 
|-
 
|-
|| Editor/Author: ''person''
+
|| Editor/Author: Rene Spronk
 
|| &nbsp;
 
|| &nbsp;
 
|-
 
|-
|| PROPOSALNAME: ''name of proposal''
+
|| PROPOSALNAME: '''add continuationToken to queryAck and queryContinuation'''
 
|| &nbsp;
 
|| &nbsp;
 
|-
 
|-
Line 29: Line 28:
 
|bgcolor="#aaaaff" align=center| '''AFFECTED ENTITIES OF INTEREST TO TC''' <br/> (responsibility level: S=Steward; I=Interested)
 
|bgcolor="#aaaaff" align=center| '''AFFECTED ENTITIES OF INTEREST TO TC''' <br/> (responsibility level: S=Steward; I=Interested)
 
|-
 
|-
|| ''Comittee1''
+
|| INM
|| ''Unknown/Reviewed/Approved''
+
|| Discussed (see [[Stateless Queries]])
|| ''S or I''
+
|| S
|-
 
|-
 
|| ''Comittee2''
 
|| ''Unknown/Reviewed/Approved''
 
|| ''S or I''
 
 
|-
 
|-
 
|}
 
|}
  
 
== Issue ==
 
== Issue ==
''One paragraph summary of the issue and the solution as detailed in this proposal.''
+
The current query continuation mechanism is based on the fact that the query server maintains the state of the result set. This proposal adds two optional attributes which allow for the support of a query mechanism that is stateless at the server side.
  
 
== Recommendation(s) ==
 
== Recommendation(s) ==
''If the proposal requests RIM structure as well as vocabulary changes then please document them in separate sections. The proposal should be as atomic as possible. It's better to have 5 individual proposals then 1 proposal that attempts to group them.''
+
*Add a new (optional) attribute in the queryAck and queryContinuation classes, called "continuationToken", of datatype ST.
 
+
*Description of queryAck.continuationToken: Contains the the continuation state (the state of the query server). If queryAck.continuationToken is valued by the query server the querying system SHALL populate queryContinuation.continuationToken with that value in any subsequent query continuation/cancel interactions. The structure of the continuationToken is determined by the query server.
 +
*Description of queryContinuation.continuationToken: Contains the continuationToken which contains the continuation state as reported by a stateless server. If a responding system values querAck.continuationToken, a querying system SHALL populate queryContinuation.continuationToken in subsequent query continuation/cancel interactions with that value.  
  
 
=== RIM Recommendation(s) ===
 
=== RIM Recommendation(s) ===
 
+
See above. Two new attributes are introduced: ''queryAck.continuationToken'' and ''queryContinuation.continuationToken''.
  
 
=== Vocabulary Recommendation(s) ===
 
=== Vocabulary Recommendation(s) ===
''Please use the fully specified names when inserting/adding/changing vocabularies, including full parentage of the vocabulary.''
+
None.
  
 
== Rationale ==
 
== Rationale ==
''Any additional information needed to understand, evaluate or implement the recommendation, such as model fragments or other context that demonstrates use of the requested change. Include implications.''
+
A couple of members of HL7 Sweden have brought forward a use-case for a query which is stateless on the server. The current query mechanism is based on the fact that it is assumed that the receiving application maintains the state of the result set. A query continuation message (part of the Query Transmission Pattern) need not contain more than the queryID, the responding system needs to derive everything from that ID.  
  
 +
The argument against a stateful implementation is that the server side query session state would complicate load balancing and fail over (e.g. when using large server farms using SOAP to serve a multitude of clients). The query mechanism in HL7 is essentially 20 years old, which means it has a proven track record, but we also have to realize that 20 years ago issues such as "load balancing" were probably not a design consideration.
 +
 +
The use-case can be supported with the introduction of a new optional attribute. The proposed change is backwards compatible.
  
 
== Recommended Action Items ==
 
== Recommended Action Items ==
 
*Implement the proposed solution
 
*Implement the proposed solution
 +
 +
==Discussion==
 +
*You, obviously, assume responsibility for the declaring in your query conformance statement that the resulting scans might suffer the problem that Lloyd points out: that continuation cookies may result in scans with incomplete or inconsistent data. A continuation query acts on a different (updated) dataset than the original query.
 +
**(Torbjorn Dahlin) When I think of it an implementation could stuff an "initial query timestamp" in the continuationToken sent to the client. When processing continuation requests the server could return results as if the query had been processed at the initial query time. A common requirement for new systems (at least here in Sweden) is that it should be possible to ask queries like "give me the patients 'current medication list' as it looked on the 1st of august 2006 at 10.30 am". If this requirement is fulfilled it would be possible to guarantee that you would receive exactly the same set of records regardless of if you fetched them all at once or if you used a stateless server and requested a record a day.
  
  
==Discussion==
+
*(Torbjorn)Two additional points that we here in our project talked about enforcing:
 +
** The querying system MUST NOT try to parse the continuationToken.
 +
** The query server SHOULD protect the content from tampering
 +
*The reason for these points were to prevent clever developers from querying systems just by manipulating continuationTokens rather than doing the initial query interaction.
 +
**(Rene) True, but that is application behaviour and as such won't show up as part of the RIM definition of the attribute.
  
 
== Resolution ==
 
== Resolution ==
  
 +
Approved, As is, 12-0-0. November 2006 Harmonization meeting.
  
 +
----
  
''NOTE: This template puts this proposal in the [[:Category:Harmonization Proposal|
+
[[Category:Discussed Harmonization Proposal]]
"Harmonization Proposal"]] Wiki Category. Once the proposal has been discussed and the resolution has been aded, please update the Category statement to put the proposal in the [[:Category:Discussed Harmonization Proposal|
+
{{INM Finalized Workitem}}
"Discussed Harmonization Proposal"]]. The "Harmonization Proposal" Wiki Category is for OPEN non-discussed proposals only.''
+
{{INM Approval|20061009|Moption to approve the harmonization proposal as worded on the Wiki. Rene/Sandy}}
 
 
[[Category:Harmonization Proposal]]
 

Latest revision as of 13:53, 6 December 2006

Editing of harmonization proposals prior to a harmonization meeting is restricted to the proposal submitter and the co-chairs of the steward comittee. Other changes will be undone. Please add comments to the "discussion" page associated with this proposal.

Recommendation for HL7 RIM Change RECOMMENDATION ID:
Sponsored by: INM Approval date by committee: 20061009 (INM Telcon)
Revision (# and date): 20061009 Date submitted:
Editor/Author: Rene Spronk  
PROPOSALNAME: add continuationToken to queryAck and queryContinuation  

Stewards Position

REQUIRED - This table should contain one row for each Steward Committee affected by the recommendation.

TC RECOMMENDATION APPROVAL STATUS AFFECTED ENTITIES OF INTEREST TO TC
(responsibility level: S=Steward; I=Interested)
INM Discussed (see Stateless Queries) S

Issue

The current query continuation mechanism is based on the fact that the query server maintains the state of the result set. This proposal adds two optional attributes which allow for the support of a query mechanism that is stateless at the server side.

Recommendation(s)

  • Add a new (optional) attribute in the queryAck and queryContinuation classes, called "continuationToken", of datatype ST.
  • Description of queryAck.continuationToken: Contains the the continuation state (the state of the query server). If queryAck.continuationToken is valued by the query server the querying system SHALL populate queryContinuation.continuationToken with that value in any subsequent query continuation/cancel interactions. The structure of the continuationToken is determined by the query server.
  • Description of queryContinuation.continuationToken: Contains the continuationToken which contains the continuation state as reported by a stateless server. If a responding system values querAck.continuationToken, a querying system SHALL populate queryContinuation.continuationToken in subsequent query continuation/cancel interactions with that value.

RIM Recommendation(s)

See above. Two new attributes are introduced: queryAck.continuationToken and queryContinuation.continuationToken.

Vocabulary Recommendation(s)

None.

Rationale

A couple of members of HL7 Sweden have brought forward a use-case for a query which is stateless on the server. The current query mechanism is based on the fact that it is assumed that the receiving application maintains the state of the result set. A query continuation message (part of the Query Transmission Pattern) need not contain more than the queryID, the responding system needs to derive everything from that ID.

The argument against a stateful implementation is that the server side query session state would complicate load balancing and fail over (e.g. when using large server farms using SOAP to serve a multitude of clients). The query mechanism in HL7 is essentially 20 years old, which means it has a proven track record, but we also have to realize that 20 years ago issues such as "load balancing" were probably not a design consideration.

The use-case can be supported with the introduction of a new optional attribute. The proposed change is backwards compatible.

Recommended Action Items

  • Implement the proposed solution

Discussion

  • You, obviously, assume responsibility for the declaring in your query conformance statement that the resulting scans might suffer the problem that Lloyd points out: that continuation cookies may result in scans with incomplete or inconsistent data. A continuation query acts on a different (updated) dataset than the original query.
    • (Torbjorn Dahlin) When I think of it an implementation could stuff an "initial query timestamp" in the continuationToken sent to the client. When processing continuation requests the server could return results as if the query had been processed at the initial query time. A common requirement for new systems (at least here in Sweden) is that it should be possible to ask queries like "give me the patients 'current medication list' as it looked on the 1st of august 2006 at 10.30 am". If this requirement is fulfilled it would be possible to guarantee that you would receive exactly the same set of records regardless of if you fetched them all at once or if you used a stateless server and requested a record a day.


  • (Torbjorn)Two additional points that we here in our project talked about enforcing:
    • The querying system MUST NOT try to parse the continuationToken.
    • The query server SHOULD protect the content from tampering
  • The reason for these points were to prevent clever developers from querying systems just by manipulating continuationTokens rather than doing the initial query interaction.
    • (Rene) True, but that is application behaviour and as such won't show up as part of the RIM definition of the attribute.

Resolution

Approved, As is, 12-0-0. November 2006 Harmonization meeting.