[presentation-api] Define behavior when sending a message to a PresentationSession fails

mfoltzgoogle has just created a new issue for 
https://github.com/w3c/presentation-api:

== Define behavior when sending a message to a PresentationSession 
fails ==
The spec does not define the outcome when the UA is unable to send a 
message to a connected PresentationSession.  As the spec includes a 
recommendation that the connection between sessions be treated as a 
reliable channel, it seems that we should notify the application when 
that guarantee cannot not be met.

Here are a few options (some are not mutually exclusive):

1.  Add an `error` event to the PresentationSession to notify the 
application that there is a failure to deliver the message.
2. Close the PresentationSession (which fires the `close` event).
3. Add a return value to (or return a Promise from) `send()` to convey
 the outcome of the message delivery.
4. Queue the message and attempt redelivery in case the underlying 
channel becomes reconnected at a future time.

I am thinking a combination of 1 (to let the application know a 
message was not delivered in a timely manner) and 4 (so that transient
 failures of the channel don't require intervention by the page).

We may want to allow the page to also set a timeout for message 
delivery that would result in outcome 2.


 

See https://github.com/w3c/presentation-api/issues/149

Received on Wednesday, 22 July 2015 18:35:43 UTC