Open mbellehumeur opened 4 years ago
Hey @mbellehumeur ,
Wouldn't it make more sense for the hub to follow up a successful subscription with a normal event notification, sent to the new subscriber?
The selection of what events to send, to different subscribers with different subscriptions is tricky. We wouldn't want to send a -close event, for example. Nor an -open for which a -close had occurred.
It does seem that capabilities of Hubs will differ, the amount of time which a Hub caches/remembers these events will naturally vary, therefore this should be an optional feature of a Hub.
What do you think, Martin?
Isaac
Thanks @isaacvetter !
I’m fine with the mechanism but it needs to be in the standard.
I think just sending the last event will cover >80% use cases.
An app should know that if the last event was a “close” then it should do nothing.
It should be an additional parameter of the subscription so that only client that want to receive this “last event” do. Can we have this added?
Eric Martin made the point during our II call this afternoon, that an event notification communicating current context following a successful subscription also persists the problem of potentially stale information. There's will also be timing issues unless the subscription is atomic.
This question of "how to replace get context" doesn't want to go away. My take on it, FWIW, is that we really shouldn't create a Hub standard for getting current context, until we standardize events/workflows and clearly define just "what context is" for any event/workflow. I don't know if that is possible or not, but consider the following:
There are probably other issues to consider, but by far the biggest would be standardizing the event message structure, especially for updates.
@isaacvetter @mbellehumeur ???
To facilitate applications joining an on-going workflow independently, we propose to have the subscription process provide the last event. There are two opportunities in the current protocol to provide that information: in the body of the subscription response itself which is currently empty or as an additional field in the subscription confirmation message.
This would also mitigate the need for a get-context query which was pushed out in the last ballot: https://github.com/HL7/fhircast-docs/issues/143