W3C home > Mailing lists > Public > public-device-apis@w3.org > February 2013

Re: [discovery-api] Consolidated comments and questions

From: Rich Tibbett <richt@opera.com>
Date: Fri, 08 Feb 2013 15:27:30 +0100
Message-ID: <51150B52.8070902@opera.com>
To: public-device-apis@w3.org
Jean-Claude Dufourd wrote:
> A related question: section 6.2 says " */whether the service is
> reporting itself as being either online [...] or offline/*".
> In my understanding of the word "offline", the service cannot report
> itself as "offline". That would be a contradiction.
> So your definition of "offline" is different than mine.
> Can you please clarify this ?

I've removed /reporting itself as being either/ from this sentence in 
the spec.

>
> And also, my question about polling boils down to: what is the practical
> difference between "available" and "online" ?

'available' means that the service is present on the local network but 
not yet shared with any web page.

'online' means the the service is present on the local network and 
shared with a web page.

We settled on these terms for lack of a better naming suggestion.

>
> Available is something that UPnP or Bonjour report with various degrees
> of reliability in my practical experience:
> - available is reported by UPnP quickly.
> - unavailable is reported by UPnP relatively quickly, with some
> occasional long delays.
> - available is reported by Bonjour relatively quickly.
> - unavailable is reported by Bonjour after a few seconds of delay (3 to
> 5s).
> So this is not so usable, but very clear in terms of implementation: the
> underlying libraries report "service added" or "resolved" for
> availability, and "service removed" for unavailability.
>
> What is "online" ? A response to ping is characteristic of the device,
> not of the service.
> Is there anything standard in Bonjour and UPnP that can be used as a
> test of online-ness ?

'online' is a concept specific to this specification when a 
NetworkService object is provided to a web page. At that point the 
service is either online or offline for that web page to interact with.

> Should the implementation poll for that ?
> Should the online attribute and events not be optional (SHOULD or MAY,
> rather that MUST now) ?

There is some use to receiving these events for a web page. There is the 
option for the web page to check the online-ness of a shared 
NetworkService object by querying its .url attribute via an e.g. XHR 
call. If that fails with a 4XX then they may be able to assume that the 
service is no longer responding and hence offline.

Since we're aware of general registration/deregitration/expiry of 
Local-networked Services in the network at the underlying implementation 
level we provide any status updates we can through the 'online' 
attribute of the corresponding NetworkService object as a convenience 
feature.

> If it is too similar to "available", should it not be removed altogether ?

It seems there's enough of a difference to warrant both events. One is a 
generic notifier of the state of the network relating the requested 
service types fired against NetworkServices. The other is a specific 
notifier of the state of the service fired against its corresponding 
NetworkService object.

Thanks,

Rich
Received on Friday, 8 February 2013 14:27:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:58 UTC