W3C home > Mailing lists > Public > public-device-apis@w3.org > April 2011

Re: local device discovery - api, demo and source code

From: Tyler Close <tyler.close@gmail.com>
Date: Wed, 13 Apr 2011 13:40:34 -0700
Message-ID: <BANLkTi=W3NnAHSbLWREGrnY=ahxYo=y7wA@mail.gmail.com>
To: Dave Raggett <dsr@w3.org>
Cc: public-device-apis@w3.org
On Wed, Apr 13, 2011 at 2:16 AM, Dave Raggett <dsr@w3.org> wrote:
> I think this will depend on the applications. I see opportunities for
> third party component providers to create libraries designed for the
> needs of particular kinds of applications. Web Introducer is essentially
> a design pattern that 3rd parties can implement. This involves access to
> specific discovery mechanisms, and to the establishment of P2P messaging
> channels. These won't always be HTTP based or even IP based, depending
> on the interconnect technology involved.

That's one of the main reasons why the Powerbox -> Introducer redesign
used MessagePorts instead of XHR requests: communication between the
Customer web page and the selected device never needs to be expressed
as an HTTP request. The Customer page can send raw data to the device
via a local MessagePort. The device Provider can then dump that raw
data into a USB port or send it out over BlueTooth, whatever. The
network never needs to be involved. By using MessagePorts, we've
abstracted away from the underlying interconnect technology. You can
think of a MessagePort as like a Unix pipe that you can dump raw
binary data into, but they also have built-in support for structured
JSON data.

--Tyler

>
> On Tue, 2011-04-12 at 12:48 -0700, Tyler Close wrote:
>> Hi Dave,
>>
>> I'm wondering if these local device scans could done whenever a
>> Customer page makes an Introducer request. The browser would create a
>> corresponding Provider for each attached device that it finds. If this
>> was done, then a Customer page could make an Introducer request for a
>> file-service. The Provider selection menu shown to the user would
>> include both cloud-based services and USB and other devices attached
>> to the local computer at that moment. The user could then select one
>> of these local devices to service the Customer's request. In either
>> case, the Customer page would then communicate with the user selected
>> service via a MessageChannel and so could exchange arbitrary data with
>> a local device. By doing this via the Introducer, we get a secure
>> click from the user that indicates consent for the Customer page to
>> access the selected local device.
>>
>> Does that sound appealing?
>>
>> --Tyler
>>
>> On Tue, Apr 12, 2011 at 8:10 AM, Dave Raggett <dsr@w3.org> wrote:
>> > I have been working with Samsung in the EU webinos project and have
>> > developed a demo of enabling browsers to discover local devices and
>> > services via the local area network, Bluetooth and USB. The demo
>> > involves a JavaScript object that allows you to invoke a variety of
>> > discovery services (multicast DNS, SSDP, SLP, Bluetooth and USB). These
>> > call back to methods on the object with information on each
>> > device/service they discover.  The demo is available as open source
>> > under the Apache2 license, but is currently limited to Linux based
>> > systems, for more details, please see:
>> >
>> >      http://www.w3.org/2011/04/discovery.html
>> >
>> > In case you are wondering how this relates to Web Introducers[1], the
>> > above work is about discovering local devices and services. What devices
>> > do you have at home? What devices are there when you visit a friend's
>> > house? Devices can be switched on or off, and many are portable, so the
>> > availability of devices is time dependent. By contrast, Web Introducer
>> > is essentially a brokering mechanism for web page scripts to locate
>> > cloud based services and as such the two are complementary.
>> >
>> > Consumer electronics embed low level discovery protocols, and as a
>> > result support for these protocols is very widely deployed. The aim is
>> > to expose these protocols in an easy to use way for web page scripts, so
>> > that web developers can create applications that span devices.
>> >
>> > [1] http://web-send.org/introducer/
>> >
>> > --
>> >  Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
>> >
>> >
>> >
>> >
>>
>>
>>
>
> --
>  Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
>
>
>



-- 
"Waterken News: Capability security on the Web"
http://waterken.sourceforge.net/recent.html
Received on Wednesday, 13 April 2011 20:41:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:20 GMT