Скачать презентацию Composing Devices Prasun Dewan Department of Computer Science Скачать презентацию Composing Devices Prasun Dewan Department of Computer Science

d80386b14a2787885b3c6778ce34d024.ppt

  • Количество слайдов: 94

Composing Devices Prasun Dewan Department of Computer Science University of North Carolina dewan@unc. edu Composing Devices Prasun Dewan Department of Computer Science University of North Carolina [email protected] edu 1

Issues raised by UPn. P n Scaling problem of multicast-based discovery u Auto n Issues raised by UPn. P n Scaling problem of multicast-based discovery u Auto n n n Shut off problem Simple-minded search Lack of access and concurrency control No programmer-defined types High programming and maintenance costs Manual, procedural service composition Device-independent UI 2

Declarative Specifications n n Defined by declarations Higher-level than procedural u HTML vs. Toolkits Declarative Specifications n n Defined by declarations Higher-level than procedural u HTML vs. Toolkits F User n Not as general. Domain specific u HTML F F n addresses what rather than how. vs. Toolkits Form-based user interfaces No graphics, incremental feedback. Composition domains for declarative specifications? 3

Databased composition Queries over multiple devices u For each rainfall sensor, average rainfall u Databased composition Queries over multiple devices u For each rainfall sensor, average rainfall u For each sensor in Tompkin county, current rainfall u For next 5 hrs, every 30 minutes, rainfall in Tompkin county 4

Query Kinds Device Queries n Historical u n Snapshot u n For each rainfall Query Kinds Device Queries n Historical u n Snapshot u n For each rainfall sensor, average rainfall For each sensor in Tompkin county, current rainfall Long-running For next 5 hrs, every 30 minutes, rainfall in Tompkin county u New kind of query u n Defining device databases and queries? 5

Cougar Device Model n n n Embedded vs. Attached Stationary vs. Mobile Strongly vs. Cougar Device Model n n n Embedded vs. Attached Stationary vs. Mobile Strongly vs. Intermittently connected Local area vs. wide area Device database work focuses on stationary devices Sensors vs. arbitrary devices? 6

Cougar Device Operations n Operation Model acquire, store, and process data u may trigger Cougar Device Operations n Operation Model acquire, store, and process data u may trigger action in physical world u return result u n Synchronous operation u n returns result immediately Asynchronous operation u result(s) later abnormal rainfall F as event F n Intermittently connected device only asynchronous operations possible u device not guaranteed to be connected when operation invoked u 7

Defining Device Database Device DBMS vs. Traditional Relational DBMS n Device vs. Data collection Defining Device Database Device DBMS vs. Traditional Relational DBMS n Device vs. Data collection u n Computed vs. stored values Solution n Base device relations u n Records partitioned over distributed nodes u Includes results of device operations u n Long-running queries. u Not modelled by traditional DBMS Virtual Relations u Distributed information sources Data needed not available locally u May not even be available remotely for intermittent One record for each device n Extended query language over virtual relations 8

Base Relations ID X Y Collection of devices of a particular type. n one Base Relations ID X Y Collection of devices of a particular type. n one record per device n attributes u device id u X coordinate u Y coordinate 9

Virtual Relations Per device function f(a 1, …, am ): T ID a 1 Virtual Relations Per device function f(a 1, …, am ): T ID a 1 am u Attribute Val TS for F each function argument F result F global timestamp of result F device id u New record added for each new result u Append-only relation u Each device contributes to part of relation 10

RFSensors Device ID X Example Y RFSensor n One function u n Base relation RFSensors Device ID X Example Y RFSensor n One function u n Base relation u n VRFSensors. Get. Rainfall. Level Device ID Value TS get. Rainfall. Level() : int RFSensors Virtual relation u VRFSensors. Get. Rainfall. Lev el 11

Long running queries For next four hours, retrieve every 30 seconds, rainfall level of Long running queries For next four hours, retrieve every 30 seconds, rainfall level of each sensor IN. . . if it is greater than 50 mm. Query Q: SELECT VR. value FROM RFSensors R, VRFSensors. Get. Rainfall. Level VR WHERE R. ID = VR. ID AND VR. value > 50 AND R. X =. . . AND $every(30) Run Q for 4 hours 200 devices R cardinality = 200 Why Join? VR cardinality = 480 join selection 12

Execution Strategies Q R R. ID = VR. ID R Materialized VR VR Local Execution Strategies Q R R. ID = VR. ID R Materialized VR VR Local rate info, remote Q VR. value > 50 VR VR Val every 3 O min No local knowledge R VR. value > 50 VR Val every 3 O min if R. ID = VR. ID Local Join, Remote Selection R. ID = VR. ID R VR Val every 3 O min if VR. value > 50 Local Selection, Remote Join 13

Performance Metrics n Traditional u Throughput u Response time F Long query running time Performance Metrics n Traditional u Throughput u Response time F Long query running time implementation independent n Sensor specific u Resource usage F network, n power Reaction time u Production to consumption time 14

Power Usage Components CPU n Memory access n Sending message n Sending Nbytes Cost Power Usage Components CPU n Memory access n Sending message n Sending Nbytes Cost in joules = Wcpu*CPU + Wram*RAM + Wmsg*Msg + Wbytes*NBytes n 15

Centralized Warehouse No local knowledge n Single location monitors all sensors n Queries are Centralized Warehouse No local knowledge n Single location monitors all sensors n Queries are sent to site n n Works for historical queries Wastes resources for long running queries u Irrelevant sites u Higher rate than necessary n What to monitor for long running queries u Camera n direction? Centralization u Workload u Bottleneck 16

Distributed Device Database n n All sensors together form a distributed device database system Distributed Device Database n n All sensors together form a distributed device database system Individual nodes sense on demand u do part of query processing u n n n Better resource utilization Know what to monitor Historical? u based on some long -running query 17

Remote Query Evaluation R. ID = VR. ID R VR. value > 50 VR Remote Query Evaluation R. ID = VR. ID R VR. value > 50 VR VR n VR Val every 3 O min n All sensors send data No relations sent to sensors Local rate info, remote Q 18

Local Join VR. value > 50 R VR Val every 3 O min if Local Join VR. value > 50 R VR Val every 3 O min if R. ID = VR. ID Local Join, Remote Selection n n Only joined sensors send value Whole relation send to device u communication overhead 19

Local Selection R. ID = VR. ID R VR Val every 3 O min Local Selection R. ID = VR. ID R VR Val every 3 O min if VR. value > 50 n n Only selected sensors send data Whole relation not send to device u best approach Local Selection, Remote Join 20

Composition Techniques n Query approach u Data n of sensors aggregated together Alternatives u Composition Techniques n Query approach u Data n of sensors aggregated together Alternatives u Operations of devices aggregated u Results of one device affect operations of another 21

Automatic Composition Domains n ICrafter and Local Work u Device pipes F Camera/Scanner u Automatic Composition Domains n ICrafter and Local Work u Device pipes F Camera/Scanner u Proxy to printer based connection F compression u Adapter based connection F transcoding u Composite commands F Do. All • Turn on all VCRs F Do Related • Turn on projector • Dim lights 22

ICrafter Approach Data. Consumer Data. Producer Power. Switch Interface Pattern System selects composer based ICrafter Approach Data. Consumer Data. Producer Power. Switch Interface Pattern System selects composer based on interfaces of components and Power. Switch registered interface patterns “Generic” Composer Data. Producer, Data. Consumer Producer. Consumer. Pipe Power. Switch. All 23

Selecting Composer n Pattern described using “regular expressions” u single producer consumer u multiple Selecting Composer n Pattern described using “regular expressions” u single producer consumer u multiple producer consumers n n n Client requests composer for a set of devices Returns composer for each subset of devices with matching pattern Composer provides user-interface for invoking composite commands u Switch on all lights u Drag producer to consumer or vice versa 24

ICrafter: A Service Framework for Ubiquitous Computing Environments Shankar Ponnekanti, Brian Lee, Armando Fox, ICrafter: A Service Framework for Ubiquitous Computing Environments Shankar Ponnekanti, Brian Lee, Armando Fox, Pat Hanrahan, Terry Winograd (Stanford Univ. ) 25

Aggregation n May seem individual UI’s can be combined. However …. 26 Aggregation n May seem individual UI’s can be combined. However …. 26

UI(S 1+S 2) != UI(S 1)+UI(S 2) n n Good for individual operations Clumsy UI(S 1+S 2) != UI(S 1)+UI(S 2) n n Good for individual operations Clumsy for compound operation: snap-and-display 27

UI(S 1+S 2) != UI(S 1) + UI(S 2) n Transfer = snap and UI(S 1+S 2) != UI(S 1) + UI(S 2) n Transfer = snap and display in one click 28

Where We Stand n Suppose n services, m appliances and w workspaces u O( Where We Stand n Suppose n services, m appliances and w workspaces u O( F(n) × m × w ) UI’s u F(n) is some combinatorial function of n n n Existing ad-hoc interaction systems: Jini, UPn. P, Hodes et al (Mobicom 97, USITS 99), Roman et al (WMCSA 00) Mostly focus on appliance heterogeneity 29

Generators: Handling Aggregation n Generators for multiple services u Eg. {Camera, Display}, {Camera, Display} Generators: Handling Aggregation n Generators for multiple services u Eg. {Camera, Display}, {Camera, Display} n Generators for service patterns u Eg. n {Camera, Display+}, {Projector* } Generators for service interface patterns u Eg. {Data. Producer, Data. Displayer+} 30

Simplified Example n n Request for {Camera, Display} Matches Camera generator, Display generator, and Simplified Example n n Request for {Camera, Display} Matches Camera generator, Display generator, and {Data. Producer, Data. Displayer} generator 31

Simplified Example n Aggregated using panels 32 Simplified Example n Aggregated using panels 32

Outline n n n What? Why? How? 33 Outline n n n What? Why? How? 33

Bootstrapping 34 Bootstrapping 34

Future Work n n Authentication and synchronization Aggregation: more intelligent generator set selection: u Future Work n n Authentication and synchronization Aggregation: more intelligent generator set selection: u Eg. Eliminate a {Data. Producer, Data. Displayer} generator if a {Camera, Display} generator exists 35

Interactive Workspaces Project Info n n n Some software already available Major release (including Interactive Workspaces Project Info n n n Some software already available Major release (including ICrafter) due this month For software and other info: http: //iwork. stanford. edu/ 36

Problems of ICrafter n Must manually connect devices select from a list u drag Problems of ICrafter n Must manually connect devices select from a list u drag and drop u Automatic continuous like Unix pipes? u F n Equivalent of standard input and output? Interface/Class-based composition u rather than programming pattern F Getter/setter 37

Problems of Interface-based Approach n Type of Data in Interfaces? u Generic Object F Problems of Interface-based Approach n Type of Data in Interfaces? u Generic Object F Truly generic composer possible F One composer for all producer/consumer pairs • Rather than camera/printer, temperature sensor/aggregator pairs F Errors possible • Temperature piped to printer u Programmer-defined F Type checking possible F Need programmer-defined composers. 38

Problems of Interface-based Approach n Number of Do. All Composers u At n least Problems of Interface-based Approach n Number of Do. All Composers u At n least one for each interface Number of Interfaces Implemented? u One of for every operation F power, play F can share composers for different devices • can turn on all cameras and VCRs F too u One many interfaces and associated composers of each service F limited sharing of composers F need one for each combination of device types 39

Summary of Problems of Interface-based Approach n Explosion of # of composers u In Summary of Problems of Interface-based Approach n Explosion of # of composers u In F u In producer/consumer connections for each consumer/producer data type do-all composition F if interface = operation • for every operation F if interface = service • for every service combination with overlapping operations n n n No automation really supported in composing Automation only in looking up and “composing”composers No support for proxy and adapters. 40

Alternate: Pattern-based approach n n Pattern-based vs. interface- based protocols Pattern-based u must follow Alternate: Pattern-based approach n n Pattern-based vs. interface- based protocols Pattern-based u must follow conventions 41

Do. All Composition capture() on() n capture() n Do all: on() Do all: capture() Do. All Composition capture() on() n capture() n Do all: on() Do all: capture() on() 42

Method-based do. All algorithm n n Find operation headers of all component devices For Method-based do. All algorithm n n Find operation headers of all component devices For each operation header create a do. All operation that invokes device-specific implementation of header on each device providing it. n Accidentally combining unrelated commands with same signature u n Not combining related commands with different signatures u n foo(), compute(), do. It(), mutate() power. VCR() and on() non combinable commands() u serialize() 43

Overriding Default do. All() Access methods on = power. Device. () serialize = serialize() Overriding Default do. All() Access methods on = power. Device. () serialize = serialize() Disable do. ALL serialize() do. All on(): vcr. power. VCR(), tv. power. TV() and camera. turn. On() Access methods on = turn. On() serialize = serialize() Disable do. ALL serialize() 44

do. All Access-Method Algorithm n n Find access-method headers of all component devices For do. All Access-Method Algorithm n n Find access-method headers of all component devices For each header create a do. All operation that invokes an implementation of header on each device providing it that does not disable its compositions 45

Producer-Consumer Composition n Much harder problem u n how to regularize producers and consumers? Producer-Consumer Composition n Much harder problem u n how to regularize producers and consumers? Enumerate and Generalize Examples u Continuous vs. discrete through composer F u Continuous direct connection F u push-pull based continuous adapter based connection F u push-pull based continuous proxy based connection F u Unix pipes of continuous data vs. ICrafter connection of discrete data push-pull based Direct connection vs. connection through composer 46

Discrete: Single producer, single consumer interface Picture. Producer { Image capture(); . . . Discrete: Single producer, single consumer interface Picture. Producer { Image capture(); . . . } interface Picture. Consumer { void print (Image p); … } Connect (camera, printer) new operation: print. And. Capture 47

Discrete: Multiple producer, single consumer interface Picture. Producer { Image capture(); . . . Discrete: Multiple producer, single consumer interface Picture. Producer { Image capture(); . . . } interface Picture. Consumer { void print (Image p); … } Connect (cameras, printer) new operation: capture. All. And. Print 48

Discrete: Single producer, multiple consumers interface Picture. Producer { Image capture(); . . . Discrete: Single producer, multiple consumers interface Picture. Producer { Image capture(); . . . } interface Picture. Consumer { void print (Image p); … } Connect (camera, printers) new operation: capture. And. Print. All 49

Continuous Push-based Connection interface Picture. Producer { Image capture(); void set. Picture. Destination(Picture. Consumer Continuous Push-based Connection interface Picture. Producer { Image capture(); void set. Picture. Destination(Picture. Consumer c); void send. To. Picture. Destination(); . . . } interface Picture. Consumer { void print (Image p); … } Connect (camera, printer): camera. set. Picture. Destination(printer); 50

Pushing to multiple destinations interface Picture. Producer { void capture(); void add. Picture. Destination(Picture. Pushing to multiple destinations interface Picture. Producer { void capture(); void add. Picture. Destination(Picture. Consumer c); void send. To. Picture. Destinations(); . . . } interface Picture. Consumer { void print (…); … } Connect (camera, printer): camera. add. Picture. Destination(printer); 51

Direct Pull-based Continuous Connection interface Picture. Producer { void capture (…); … } interface Direct Pull-based Continuous Connection interface Picture. Producer { void capture (…); … } interface Picture. Consumer { void set. Picture. Source(Picture. Producer c); void get. From. Picture. Source(); . . . } connect(camera, printer): printer. set. Picture. Source(camera); 52

Pulling from multiple sources interface Picture. Producer { void capture (…); … } interface Pulling from multiple sources interface Picture. Producer { void capture (…); … } interface Picture. Consumer { void add. Picture. Source(Picture. Producer c); void get. From. Sources(); . . . } connect(camera, printer): printer. add. Picture. Source(camera); 53

Proxy based connection interface Picture. Producer { void add. Picture. Destination(Picture. Consumer c) void Proxy based connection interface Picture. Producer { void add. Picture. Destination(Picture. Consumer c) void capture (…); } interface Picture. Compresser extends Picture. Consumer { void add. Picture. Destination(Picture. Consumer c); void compress(); . . . } register. Proxy(ACompressor) interface Picture. Consumer { connect(camera, printer): void print(); compresser new ACompresser(); . . . compresser. add. Picture. Destination(printer); } camera. add. Picture. Destination(printer); 54

Proxy-based pull connection register. Proxy(ACompressor) interface Picture. Producer { connect(camera, printer): void capture (…); Proxy-based pull connection register. Proxy(ACompressor) interface Picture. Producer { connect(camera, printer): void capture (…); compresser new ACompresser(); … compresser. add. Picture. Source(camera); } printer. add. Picture. Source(camera); interface Picture. Compresser extends Picture. Producer { void add. Picture. Source(Picture. Producer c); void compress(); . . . } interface Picture. Consumer { void add. Picture. Source(Picture. Producer c); void get. From. Sources(); . . . } 55

Proxy vs. Adapter: Proxy interface Picture. Producer { void add. Picture. Destination(Picture. Consumer c) Proxy vs. Adapter: Proxy interface Picture. Producer { void add. Picture. Destination(Picture. Consumer c) void capture (…); } interface Picture. Compresser extends Picture. Consumer { void add. Picture. Destination(Picture. Consumer c); void compress(); . . . } register. Proxy(ACompressor) interface Picture. Consumer connect(camera, printer): { void print(); compresser new ACompresser(); . . . compresser. add. Picture. Destination(printer); } camera. add. Picture. Destination(printer); 56

Proxy vs. Adapter: Adapter interface Color. Picture. Producer { void add. Picture. Destination(Color. Picture. Proxy vs. Adapter: Adapter interface Color. Picture. Producer { void add. Picture. Destination(Color. Picture. Consumer c) void capture (…); } interface Picture. Transcoder extends Color. Picture. Consumer { void add. Picture. Destination(BWPicture. Consumer c); void transcode(); . . . } connect(camera, printer): interface BWPicture. Consumer { transcoder new APicture. Transcoder(); void print(); camera. add. Picture. Destination(transcoder); . . . transcoder. add. Picture. Destination(printer); } 57

Implementation of Continuous Connection n n Motivated by composition of components of Collaboration Infrastructure Implementation of Continuous Connection n n Motivated by composition of components of Collaboration Infrastructure called Collaboration Bus Direct, Proxy based, and Adapter based continuous connections Integration of registration/discovery and composition Based on notion of facets (like pins on a chip) Munson and Sunku 58

Facets public void add<Facet. Name>(<Facet. Type>) {. . . } [public remove<Facet. Name>(<Facet. Type>) Facets public void add() {. . . } [public remove() {. . . }] [public Enumeration enumerate() {. . . }] public void set () {. . . } [public get () {. . . }] public ; Facet. Name object (Facet. Type) Assign (source, facet, destination) source. add. Facet(destination) source. set. Facet(destination) source. facet = destination 59

Bi Directional Connect Picture. Destination (Picture. Consumer) camera (Picture. Producer) Picture. Source connect (camera, Bi Directional Connect Picture. Destination (Picture. Consumer) camera (Picture. Producer) Picture. Source connect (camera, picture. Destination, printer, picture. Source) assign (camera, picture. Destination, printer) assign( printer, picture. Source, camera); printer 60

Uni Directional Connect camera (Picture. Producer) Picture. Source connect (camera, null, printer, Picture. Source) Uni Directional Connect camera (Picture. Producer) Picture. Source connect (camera, null, printer, Picture. Source) assign (printer, picture. Source, camera) printer 61

Uni Directional Connect Picture. Destination (Picture. Consumer) camera printer connect (camera, picture. Destination, printer, Uni Directional Connect Picture. Destination (Picture. Consumer) camera printer connect (camera, picture. Destination, printer, null) camera. set. Picture. Destination(printer) 62

Multiple Communication Primitives n May wish to pass reference to u Object u Socket Multiple Communication Primitives n May wish to pass reference to u Object u Socket u Multicast n channels Pattern u get. Reference. For() u If this method exists return value used instead of object defining the facet 63

Multiple Communication Primitives Picture. Destination (Picture. Consumer) camera (Picture. Producer) Picture. Source printer connect Multiple Communication Primitives Picture. Destination (Picture. Consumer) camera (Picture. Producer) Picture. Source printer connect (camera, Picture. Destination, printer, Picture. Source) assign (camera, Picture. Destination, printer. get. Reference. For. Picture. Source()) assign( printer, Picture. Source, camera. get. Reference. For. Picture. Destination()); 64

Integrating connection and discovery Connect (printer, Picture. Destination) Integrate discovery and connection u Discover Integrating connection and discovery Connect (printer, Picture. Destination) Integrate discovery and connection u Discover an object whose type can be assigned to facet u Discovered objects must have been registered F Registries distributed and connected to each other F u Must now find peer facet F u public Facet getDestination. Facet(). Make bi-directional connect if such a facet exists, else unidirectional connect 65

Integrating registration and connection Register(camera) u For each auto connect facet, f F Connect Integrating registration and connection Register(camera) u For each auto connect facet, f F Connect u Facet is auto connect if F member u Or (camera, f) of Auto. Connect. Facet. Names property if class of object F Implements Auto. Connect. All interface 66

Proxy-based Connect Picture. Destination (Picture. Consumer) camera (Picture. Producer) Picture. Source Picture. Destination (Picture. Proxy-based Connect Picture. Destination (Picture. Consumer) camera (Picture. Producer) Picture. Source Picture. Destination (Picture. Cosnumer) Proxy (Picture. Producer) Picture. Source printer 67

Proxy-based connect register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2”) connect (s, fs, d, fd) Proxy-based connect register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2”) connect (s, fs, d, fd) p = find. Proxy(“Proxy/fd/type. Of(s)]/fs/type. Of(d)”) If (p != null) connect (s, fs, p, fd), connect (p, fs, d, fd) else if not (direct_connect(s, fs, d, fd)) adapter. Connect(s, fs, d, fd) ; 68

Adapting the Type Picture. Destination (Color. Picture. Consumer) camera Picture. Source (Color. Picture. Producer) Adapting the Type Picture. Destination (Color. Picture. Consumer) camera Picture. Source (Color. Picture. Producer) Picture. Destination Adapter (BWPicture. Producer) (BWPicture. Consumer) Picture. Source printer 69

Adapting the Facet Color. Picture. Destination (Color. Picture. Consumer) camera Color. Picture. Source (Color. Adapting the Facet Color. Picture. Destination (Color. Picture. Consumer) camera Color. Picture. Source (Color. Picture. Producer) BWPicture. Destination (BWPicture. Consumer) Adapter BWPicture. Source (BWPicture. Producer) connect (camera, Color. Picture. Destination, printer, BWPicture. Source) Cannot derive adapter facet names from connect. printer 70

Unidirectinal: Adapting the Facet Color. Picture. Destination (Color. Picture. Producer) camera BWPicture. Destination Adapter Unidirectinal: Adapting the Facet Color. Picture. Destination (Color. Picture. Producer) camera BWPicture. Destination Adapter connect (camera, Color. Picture. Destination, printer, BWPicture. Source) Can derive adapter from connect, but not opposite facet (BWPicture. Producer) printer 71

Adapting the Type register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2”) adapter. Connect (s, fs, Adapting the Type register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2”) adapter. Connect (s, fs, d, fd) p = find. Proxy(“Proxy/fd/*/fs/*”) connect (s, fs, p, fd), connect (p, fs, d, fd) 72

Adapting the Facet register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2/pfacet 1/pfacet 2”) adapter. Connect Adapting the Facet register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2/pfacet 1/pfacet 2”) adapter. Connect (s, fs, d, fd) p = find. Proxy(“Proxy/fd/*/fs/*/pf 1/pf 2”) connect (s, fs, p, pf 1), connect (p, pf 2, d, fd) 73

Creating proxies register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2/pfacet 1/pfacet 2”) register. Proxy(p. Class, Creating proxies register. Proxy(p, “Proxy/facet 1/type 1/facet 2/type 2/pfacet 1/pfacet 2”) register. Proxy(p. Class, “Proxy/facet 1/type 1/facet 2/type 2/pfacet 1/pfacet 2”) p. Class instantiated automatically register. Proxy(p. Factory, “Proxy/facet 1/type 1/facet 2/type 2/pfacet 1/pfacet 2”) special method in p. Factory to create proxy 74

Hybrid of Discrete and Continuous n Example u set time of newly turned on Hybrid of Discrete and Continuous n Example u set time of newly turned on vcr to that of clock F composite command: replicate clock time F system calls getter method for clock property and then setter method for vcr property when vcr service registered n Can generalize to arbitrary properties u synchronize TV channels in a bar F user enters synchronize channel mode F composer listens for channel properties and synchronizes them F Roussev’s coupler research valid here 75

Domain-specific Device Composition n Example u Compose multiple devices, possibly of different users, so Domain-specific Device Composition n Example u Compose multiple devices, possibly of different users, so that they work together to show a multimedia web presentation. n Websplitter u Based on XML 76

Web. Splitter: A Partial-View XML Framework For Multi. Device Collaborative Web Browsing Professor Rick Web. Splitter: A Partial-View XML Framework For Multi. Device Collaborative Web Browsing Professor Rick Han Department of Computer Science University of Colorado at Boulder [email protected] colorado. edu 77

Outline n n A High-Level View of Pervasive Computing Web. Splitter Motivations u Per-Device Outline n n A High-Level View of Pervasive Computing Web. Splitter Motivations u Per-Device Partial Views u Per-User Partial Views n n Web. Splitter’s XML Framework Demo Prototype 78

Motivation: Enabling A Pervasive Computing World 79 Motivation: Enabling A Pervasive Computing World 79

Web. Splitter Motivation #1: Generate Partial Views Per Device n Scenario: Web presentation in Web. Splitter Motivation #1: Generate Partial Views Per Device n Scenario: Web presentation in lecture hall controlled by a wireless PDA Lecturer • Each device receives partial view • device’s capability • intended function • Leverage other dev’s • Composite view 80

Web. Splitter Motivation #2: Partial-View Collaborative Presentations n Scenario: Online Web presentation to audience Web. Splitter Motivation #2: Partial-View Collaborative Presentations n Scenario: Online Web presentation to audience – what you see is ~ what I see Lecturer Participant 1 Participant 2 81

Partial Views Per User n Web. Splitting generates subsets of a Web page for Partial Views Per User n Web. Splitting generates subsets of a Web page for each user, i. e. partial views • Partial views limit access to components – To hide information – To prevent misdirection of a presentation • Partial view scenarios: – Teacher giving presentation to students (distributed) • Customized learning based on individual skill levels, i. e. (teacher, pupil 1, pupil 2, …), not merely (teacher, students) – Adversarial collaboration, e. g. lawyers 82

Web. Splitter: Joint Multi-User Multi-Device Presentations n Scenario: Web presentation to online audience and Web. Splitter: Joint Multi-User Multi-Device Presentations n Scenario: Web presentation to online audience and a lecture hall via a remote control PDA Lecturer Participant 1 Participant 2 83

Web. Splitter’s Architecture Web. Splitter Middleware Multiple devices --------------------- Policy File Multiple users 84 Web. Splitter’s Architecture Web. Splitter Middleware Multiple devices --------------------- Policy File Multiple users 84

XML Framework: How does Web. Splitter use XML? n Web pages are authored in XML Framework: How does Web. Splitter use XML? n Web pages are authored in XML Tags correspond to components on Web page u Easy to manipulate tags & groups of tags – nested hierarchy u F n use XSL to filter/insert/delete tags “Policy file” implements partial views defines tag mapping policies: which users and which devices have access to which XML tags u Written in XML u External annotation file containing authorization u 85

Example: Splitting an XML Web page The online Shopping company The most reliable and the best prices online Web. Splitter

HTML to Pocket. PC The online Shopping company XML to laptop The most reliable and the best prices online
WAV Music and GIF Logo Title, Description, and GIF Logo 86

XML Policy File: Filtering Tags by User Groups n Define user privilege groups u XML Policy File: Filtering Tags by User Groups n Define user privilege groups u n Each privilege group receives a subset of tags u presentation, head, title, nav_bar, slide, picture presentation, slide, picture 87

XML Policy File: Filtering Tags by Devices n Within a group, map subsets of XML Policy File: Filtering Tags by Devices n Within a group, map subsets of tags to devices u Standardizing names u presentation, head, title, nav_bar, slides, picture presentation, head, title, nav_bar, notes 88

XML Policy File: Filtering Tags By User & By Device n n n Define XML Policy File: Filtering Tags By User & By Device n n n Define user privilege groups Each privilege group receives a subset of tags Within a group, map subsets of tags to devices presentation, head, title, nav_bar, slides, picture presentation, head, title, nav_bar, notes 89

Implementation: Web. Splitter Demo Laptop 1 Web. Splitter proxy Laptop 2 XML Source & Implementation: Web. Splitter Demo Laptop 1 Web. Splitter proxy Laptop 2 XML Source & Policy File Web Server Ethernet LAN Eudora. Web Bluetooth LAN Access Point 2 privilege groups in policy file 90

Web. Splitter Prototype Demonstrates: n Splitting to different browsers on different devices XML source Web. Splitter Prototype Demonstrates: n Splitting to different browsers on different devices XML source Web page u XML policy file u F 2 privilege groups Client-side component on Palm, Win. CE, Netscape u Static service discovery u 91

Issues raised by Web. Splitter n Integrate with Producer-Consumer Notion u Splitting an output Issues raised by Web. Splitter n Integrate with Producer-Consumer Notion u Splitting an output ~ connection to multiple consumers u Splitting an input ~ connection to multiple producers n Automatic vs. Declarative 92

Composition Techniques n Fully automatic do. All command u pipes u false positives/negatives possible Composition Techniques n Fully automatic do. All command u pipes u false positives/negatives possible u n Semi-automatic disabling/enabling do. All composition u Specifying proxies u n Declarative u Web. Splitter XML file 93

Semi-Automatic vs. Declarative n n n Fine line between semi-automatic and declarative Simple parameters Semi-Automatic vs. Declarative n n n Fine line between semi-automatic and declarative Simple parameters (forms) rather than specification language. Semi-automatic overrides fully automatic 94