W3C home > Mailing lists > Public > public-device-apis@w3.org > December 2012

Network Information API

From: Yoav Weiss <yoav@yoav.ws>
Date: Thu, 6 Dec 2012 09:42:38 +0100
Message-ID: <CACj=BEhOao30xwq4L4rc7pZM+XwgLMi=36VKjWxt1S9zsJYQDA@mail.gmail.com>
To: public-device-apis@w3.org
Hi,

I have a few comments on the current draft of Network Information API.
The current draft exposes a couple of properties: `bandwidth` and
`metered`, both of which are  described in the specification as hard to
implement.

I have looked into the current implementation of `bandwidth` in Firefox for
Android, and summed up the parts I found relevant at:
https://gist.github.com/4206150
Basically, the application gets the network type from the OS, and
translates it to an arbitrary bandwidth value which is the maximum such a
network can achieve.

I believe that the name `bandwidth` for such a property is misleading, and
will lead to confusion among Web developers. Maybe a name along the lines
of `maxRadioNetworkBandwidth` would make more sense.

As far as I understand it, the actual bandwidth between the browser and the
Web server is not known to the OS layer. It is something that if we want to
(unreliably) measure, it should be done in the browser's socket layer
(while taking slow-start and multiple TCP connections into consideration),
and will probably be highly variable depending on the radio network *and*
the destination host. So by definition, a `bandwidth` property in
unreliable and therefore, of little value.

As a Web developer, I'd much rather know the `networkType` and draw my
conclusions from there. To my understanding, the `networkType` property was
removed from the specification because of privacy concerns. Could someone
elaborate on these concerns?

Since `networkType` is forbidden, wouldn't it be wise to replace it with a
few properties such as: `maxRadioNetworkBandwidth` (which we have under the
name `bandwidth`), `avgRadioNetworkBandwidth`, `AvgRadioNetworkRTT` and
possibly `receptionPrecentage`  and `radioState` (I'm not sure that is
information that the OS exposes)

These properties will give developers more information regarding the actual
radio conditions they are facing, rather than an inherently inaccurate
`bandwidth` property.

Thanks for reading so far,
Yoav Weiss
Received on Thursday, 6 December 2012 12:59:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 6 December 2012 12:59:01 GMT