29.11.2012 Views

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

2nd USENIX Conference on Web Application Development ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Maverick: Providing <strong>Web</strong> Applicati<strong>on</strong>s with Safe and Flexible Access to<br />

Local Devices<br />

Abstract<br />

<strong>Web</strong> browsers do not yet provide <strong>Web</strong> programs with<br />

the same safe, c<strong>on</strong>venient access to local devices that<br />

operating systems provide to native programs. As a result,<br />

<strong>Web</strong> programmers must either wait for the slowly<br />

evolving HTML standard to add support for the device<br />

classes they want to use, or they must use difficult to deploy<br />

browser plug-ins to add the access they need.<br />

This paper describes Maverick, a browser that provides<br />

<strong>Web</strong> applicati<strong>on</strong>s with safe and flexible access to<br />

local devices. Maverick lets <strong>Web</strong> programmers implement<br />

USB device drivers and frameworks, like file systems<br />

or streaming video layers, using standard <strong>Web</strong> programming<br />

technologies such as HTML, JavaScript, or<br />

even code executed in a native client sandbox. These <strong>Web</strong><br />

drivers and <strong>Web</strong> frameworks are downloaded dynamically<br />

from <strong>Web</strong> servers and executed by browsers al<strong>on</strong>gside<br />

<strong>Web</strong> applicati<strong>on</strong>s. Maverick provides <strong>Web</strong> drivers<br />

with protected access to the USB bus, and it provides <strong>Web</strong><br />

drivers and frameworks with event-driven IPC channels<br />

to communicate with each other and with <strong>Web</strong> applicati<strong>on</strong>s.<br />

We prototyped Maverick by modifying the Chrome<br />

<strong>Web</strong> browser and the Linux kernel. Using Maverick, we<br />

have implemented: several <strong>Web</strong> drivers, including a USB<br />

mass storage driver and a <strong>Web</strong>cam driver; several <strong>Web</strong><br />

frameworks, including a FAT16 filesystem and a streaming<br />

video framework; and, several <strong>Web</strong> applicati<strong>on</strong>s that<br />

exercise them. Our experiments show that <strong>Web</strong> drivers,<br />

frameworks, and applicati<strong>on</strong>s are practical, easy to author,<br />

and have sufficient performance, even when implemented<br />

in JavaScript.<br />

1 Introducti<strong>on</strong><br />

<strong>Web</strong> browsers do not yet provide <strong>Web</strong> programs with the<br />

same safe, c<strong>on</strong>venient access to local devices that OSs<br />

provide to native programs. Digital devices like cameras,<br />

David W. Richards<strong>on</strong> and Steven D. Gribble<br />

Department of Computer Science & Engineering<br />

University of Washingt<strong>on</strong><br />

printers, scanners, smartph<strong>on</strong>es, and GPS trackers are increasingly<br />

pervasive, yet browsers currently provide little<br />

support to <strong>Web</strong> applicati<strong>on</strong>s for accessing them. The support<br />

that does exist is limited to a handful of HTML tags<br />

for accessing a small number of comm<strong>on</strong> device classes,<br />

such as <strong>Web</strong>cams or microph<strong>on</strong>es.<br />

Today, <strong>Web</strong> programmers that want to use unsupported<br />

or exotic local devices must either wait for HTML<br />

standards to evolve to include them, or they must implement,<br />

deploy, and support browser plug-ins that users<br />

may be reluctant to install. Such poor choices limit the<br />

functi<strong>on</strong>ality of <strong>Web</strong> applicati<strong>on</strong>s and discourage the development<br />

and adopti<strong>on</strong> of new, interesting local devices.<br />

In this paper, we describe Maverick, an experimental<br />

browser that gives <strong>Web</strong> applicati<strong>on</strong>s safe and flexible<br />

access to local USB devices. Maverick takes the aggressive<br />

approach of removing the resp<strong>on</strong>sibility for managing<br />

devices and device frameworks from the host operating<br />

system and empowering the browser to execute device<br />

drivers and frameworks al<strong>on</strong>gside <strong>Web</strong> applicati<strong>on</strong>s.<br />

Specifically, instead of requiring users to install USB device<br />

drivers into their host OS, Maverick dynamically<br />

finds, downloads, and executes <strong>Web</strong> drivers that are written<br />

with standard <strong>Web</strong> programming technologies like<br />

HTML, JavaScript, or Native Client (NaCl) [24], and that<br />

directly communicate with the USB devices they drive.<br />

Similarly, instead of relying <strong>on</strong> device frameworks<br />

within the host OS, such as file systems or video frameworks,<br />

Maverick finds, downloads, and executes <strong>Web</strong><br />

frameworks to provide <strong>Web</strong> applicati<strong>on</strong>s with c<strong>on</strong>venient<br />

high-level abstracti<strong>on</strong>s. Maverick permits <strong>Web</strong> applicati<strong>on</strong>s<br />

to communicate directly with <strong>Web</strong> frameworks,<br />

which in turn communicate with <strong>Web</strong> drivers.<br />

Maverick’s approach has several advantages. <strong>Web</strong> developers<br />

can add support for new USB devices and make<br />

them immediately accessible to any Maverick user and<br />

<strong>Web</strong> applicati<strong>on</strong> without waiting for updates to slowly<br />

moving standards bodies, browser vendors, or operating<br />

systems. Maverick also inherits many of the safety and<br />

<str<strong>on</strong>g>USENIX</str<strong>on</strong>g> Associati<strong>on</strong> <strong>Web</strong>Apps ’11: <str<strong>on</strong>g>2nd</str<strong>on</strong>g> <str<strong>on</strong>g>USENIX</str<strong>on</strong>g> <str<strong>on</strong>g>C<strong>on</strong>ference</str<strong>on</strong>g> <strong>on</strong> <strong>Web</strong> Applicati<strong>on</strong> <strong>Development</strong> 137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!