the design and implementation of a context-aware file system for ubiquitous computing applications

81
The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications Christopher K. Hess Advisor: Roy H. Campbell Systems Research Group University of Illinois at Urbana- Champaign

Upload: bryar-orr

Post on 04-Jan-2016

26 views

Category:

Documents


0 download

DESCRIPTION

The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications. Christopher K. Hess Advisor: Roy H. Campbell Systems Research Group University of Illinois at Urbana-Champaign. Application Logic. Output. Input. A Room as a Computer. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

The Design and Implementation of a Context-

Aware File System for Ubiquitous Computing

Applications

Christopher K. HessAdvisor: Roy H. Campbell

Systems Research GroupUniversity of Illinois at Urbana-

Champaign

Page 2: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

A Room as a Computer

Output

Input

ApplicationLogic

Activity Oriented Computing

Page 3: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Research FocusSpaces:

• Private work spaces• Public work spaces• Group activity spaces

Applications:• Office apps• Collaborative apps• Activity apps

Page 4: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Outline

• Overview• File System

• mobile users• application types• heterogeneous devices

• Evaluation• Conclusions

Page 5: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

1

application launcher

Scenario

Page 6: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Scenario

2

attendance recorder

Page 7: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Scenario

3

Page 8: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

4

Scenario

Page 9: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Scenario

5

Page 10: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

6

Scenario

6

Page 11: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Scenario

7

Page 12: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Scenario

8

Page 13: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

What is Different?

• Mobile users• Mobile devices• Heterogeneous devices• Many configurations• Scheduled activities• Context

Page 14: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

What is Context?

• Information used to characterize the situation of an entity typically from physical world activity, time, location, etc.

• Decisions made by applications or system

Page 15: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Thesis Statement

Context must be integrated into data access systems in ubiquitous computing environments to support the ways in which the space and its applications are used.

Page 16: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context in Data Access

• Make data available in current location

• Make data valid when conditions are met

• Tag data for later retrieval in a context

• Adapt data to device context

Page 17: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context File System (CFS)

• Context-aware file system has knowledge of environment can present relevant information

• Application level distributed file system

• Core service of Gaia middleware operating system supports application development

Gaia: A Middleware Infrastructure to Enable Active Spaces. Manuel Román, Christopher K. Hess, Renato Cerqueira, Anand Ranganathan, Roy H. Campbell, and Klara Nahrstedt, In IEEE Pervasive Computing, pp. 74-83, Oct-Dec 2002.

Page 18: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Architecture

• Mount server database of data references constructs the namespace

• File server provide access to distributed data

• Containers collection of typed objects

Question: How to support issues in ubiquitous computing?

Page 19: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Issue 1: Mobile Users

• Interact with local resources• Data cloud follows the user

Space A Space B

move

inject personal data reference into local space

Page 20: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Mobile Mount Points• User carries

mount points• Push into local

mount server• System

allocates user directory

File mode

/

bin users

usr1 usr2

ppt mp3 doc

mergeusr3

Building Applications for Ubiquitous Computing Environments. Christopher K. Hess, Manuel Román, and Roy H. Campbell, In International Conference on Pervasive Computing (Pervasive 2002), Zurich, Switzerland, August 26-28, 2002.

Page 21: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Merging Data

Space 3

Space 2Space 1

IR Beacon

merge/extractmounts MS

FS

disk

FS

disk

FS

disk

FS

disk

• PDA• Laptop• Profile

server

Page 22: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Add Personal Data

Page 23: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Issue 2: Application Types

• Public applications direct data to applications

• Scheduled applications prune irrelevant data

• Configurable applications personal configurations

group related material

Page 24: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Program Data• Applications specify what data they are

interested in• File system uses context to determine

when to make it available

• Applications do not know what context they are running in – just open a directory, but contents will change with context

• Applications run unchanged in different contexts – context knowledge is in system

A Context-Aware Data Management System for Ubiquitous Computing Applications. Christopher K. Hess and Roy H. Campbell, In International Conference of Distributed Computing Systems (ICDCS 2003), Providence, Rhode Island, May 19-22, 2003.

Page 25: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

• Activity• Time• Location• Identity• Space

Properties what kind of data

• Type• Sub-type• Category

Group Related Material

Think of shapes and colors…

Context when data is valid

Page 26: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties

• Property = shape• Direct data to applications

Application

Space

Application

Page 27: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties

• Property = shape• Direct data to applications

Application

Space

?

Application

Page 28: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties

• Property = shape• Direct data to applications

Application

Space

?

Application

Page 29: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties

• Property = shape• Direct data to applications

Application

Space

Application

Page 30: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context

• Context = color• Prune irrelevant data

Space

MeetingSeminarClassroom

Application

Page 31: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context

• Context = color• Prune irrelevant data

Space

?

MeetingSeminarClassroom

Application

Page 32: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context

• Context = color• Prune irrelevant data

Space

?

MeetingSeminarClassroom

Application

Page 33: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context

• Context = color• Prune irrelevant data

Space

MeetingSeminarClassroom

Application

Page 34: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties + Context

• Direct data to applications• Prune irrelevant data

Application

Space

Application

Page 35: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties + Context

• Direct data to applications• Prune irrelevant data

Application

Space

?

Application

Page 36: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties + Context

• Direct data to applications• Prune irrelevant data

Application

Space

?Meeting

Application

Page 37: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties + Context

• Direct data to applications• Prune irrelevant data

Application

Space

Meeting

Application

Page 38: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties + Context

• Direct data to applications• Prune irrelevant data

Application

Space

?Seminar

Application

Page 39: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Properties + Context

• Direct data to applications• Prune irrelevant data

Application

Space

Seminar

Application

Page 40: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Getting Relevant Data

File System

Application

Current context:situation = seminardate = 08/12/02

= paper

Give me papers

Question: How to apply shape and color to data?

Page 41: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Attaching Metadata• Metadata = properties + context• Attach metadata to files and directories• Instruct system when data is valid• Specify kind of data – fast searches

Datatype

time location

activity

Page 42: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Directory Representation

• Metadata name/value tuples• Name = property or context• Paths based on 1 or more tuples

name = locationvalue = 2401

/location:/2401data

data

Page 43: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Metadata Directories

PURPLE

/type:/ppt

/location:/2401

/type:/ppt/location:/2401

+

ORANGE

/type:/ppt

/location:/2402

/type:/ppt/location:/2402

+

OR

Page 44: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Virtual Directory

• Constructed from metadata

• Copy files to context mode directory to attach metadata

• Not ordered

Context mode

/

current: time:

mp3 gaia.ppt 2401

mp3 gaia.ppt time:

location:

2402

Page 45: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Metadata Augmented Mounts

Data

Mounts

Directories

link

aggregate

Page 46: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Accessing Data

• Applications unaware of current context

• Applications explicitly specify properties

• Context is determined implicitly

/type:/pdf/current:properties context

Page 47: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

How to Find Relevant Data?

• Mount server maintains current context

• Directory path converted into query

• Aggregate relevant data into directory

/type:/pdf/current:

current context

FS FS FS FS

mount table database

type = pdftime = 2/3/03situation = seminar

type = pdftime = 3/3/03

MS

Page 48: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Relevant Data AlgorithmRelevant data ≠ properties + context

1. Match all properties exactly2. Match tagged context only

Current context:location = 2401situation = meetingweather = sunny

Datatype location

situation

properties context

weather is wildcard

Search for valid mounts:

Page 49: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Public Applications

/type:/mp3/current:

Page 50: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Scheduled Applications/current:/attendance.att

Tag file with situation metadata.

situation = meeting situation = seminar

Page 51: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Configurable Applications

Browser opens:

/acd:/ppt/current:

Tag configuration:

acd = pptlocation = 2401

Page 52: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Issue 3: Heterogeneous Devices

• Devices have different characteristics• Applications specify how to access

data• Type of data changes based on how

data is accessed

dynamic types

Page 53: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Transform Data

Context File System

BitmapsGIFsGIFs to Pixels

Pixels to Bitmaps

Bytes to GIFs

Bytes

Bytes

PowerPoint

Native File System

Design and Performance of MPEG Video Streaming to Palmtop Computers.  Christopher K. Hess, David Raila, Roy H. Campbell, and Dennis Mickunas.  In Multimedia Computing and Networking 2000 (MMCN00), San Jose, CA, January 25-27 2000.

Page 54: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Container ChainsInterface Map

Converter Containers

bitmap

pixel

BitmapContainer

GIFContainer

PixelContainer

ByteContainer

DirectoryContainer

TextContainer

FileContainers

dirent

byte

.ppt

*

.mpg

.gif

gif

mpeg

.txt

.doc

text

ByteContainer

DirectoryContainer

TextContainer

WordContainer

GIF2PixelContainerPixel2BitmapConverter

MPEGContainer

GIF2PixelConverterPowerPointContainer

An Adaptable Data Object Service for Pervasive Computing Environments. Christopher K. Hess, Francisco Ballesteros, Roy H. Campbell, and M. Dennis Mickunas.  In 6th USENIX Conference on Object-Oriented Technologies and Systems (COOTS'01), San Antonio, TX, January 29-February 2, 2001.

Page 55: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Interface Example

ImageViewer viewer;GIFs gifs;GIFContainer c(“gaia.ppt“, GaiaFS::Read);c.satt(“width”, “352”);c.satt(“height”, “240”);

while (!c.eof()) { c.get(gifs, 1); viewer.display(gifs); // … wait for user input …}

c.close();

Page 56: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Evaluation

• Ubiquitous computing environments are difficult to evaluate

• Goals: programmable and usable

Development programmable Performance usable

Page 57: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Simple Interface

• Not counting headers, generated code, path resolution, mount table lookup, etc.

• PPT – GIF ~270 lines of code to 10 lines

• PPT – GIF – Pixel – Bitmap ~460 lines of code to 10 lines

• Context mode directory ~500 lines of code to 10 lines

Page 58: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context Mode Operations

Operation Time (msec)

List root 0.711

List directory (1 fs) 1.720

List directory (2 fs) 2.825

Create directory 8.948

Remove directory 36.669

Copy file to directory 11.303

Remove file from directory 9.021

Page 59: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Contributions

• Integrated environmental context into the file system design

• Enabled new types of applications• Developed mechanisms for users to

inject data references into the local environment (data cloud)

• Developed an interface and framework for supporting dynamic types

Page 60: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Related Work

• ParcTab• Stick-e Notes• TACC• Odyssey• Symantec• Presto• CAR

Needed support for applications in ubiquitous computing spaces

Page 61: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Questions?

Thank you!

Page 62: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Context-Aware Mount Points

<CFS:Storage> <CFS:Owner>ckhess</CFS:Owner> <CFS:Host>srg181.cs.uiuc.edu</CFS:Host> <CFS:Path>C:\Temp\15687</CFS:Path> <CFS:Context> <CFS:Type>type</CFS:Type> <CFS:Value>pdf</CFS:Value> </CFS:Context> <CFS:Context> <CFS:Type>location</CFS:Type> <CFS:Value>2401</CFS:Value> </CFS:Context></CFS:Storage>

/type:/pdf/location:/2401

• Attach attributes – create mount point.

<CFS:Storage> <CFS:Owner>mroman</CFS:Owner> <CFS:Host>barna.cs.uiuc.edu</CFS:Host> <CFS:Path>C:\Temp\34981</CFS:Path> <CFS:Context> <CFS:Type>type</CFS:Type> <CFS:Value>pdf</CFS:Value> </CFS:Context> <CFS:Context> <CFS:Type>location</CFS:Type> <CFS:Value>2401</CFS:Value> </CFS:Context></CFS:Storage>

Page 63: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Container Wrappers

GIFContainer

ContainerBase

C * _container;int _position;Attr _attrs;

int get(O &buf, int count);int put (O &buf, int count);void satt(char *type, char *value);

C, O

<GIFContainer, GIF>

<<bind>>

GaiaFS::Container::GetResult result;result = _container-> getObjects(buf, _position, _attrs);_position = result.position;return result.count;

Page 64: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

XML Container Description <CFS:Container> <CFS:File/> <CFS:Interface>GIFContainer</CFS:Interface> <CFS:Name>PowerPointContainer</CFS:Name> <CFS:Extension>.ppt</CFS:Extension> <CFS:Output>gif</CFS:Output></CFS:Container>

<CFS:Container> <CFS:Converter/> <CFS:Interface>PixmapContainer</CFS:Interface> <CFS:Name>GIF2PixmapContainer</CFS:Name> <CFS:Input>gif</CFS:Input> <CFS:Output>pixmap</CFS:Output></CFS:Container>

Page 65: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Experimental Setup

1.5 GHz Pentium-4256 MB RAMWindows 20001 Gbps Ethernet

MS

FS

module

shell

FS

module

FS

module

FS

module

Page 66: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

PPT – GIF

PowerPoint to GIF (sec)Dimensio

nText Graphic Picture

80x80 0.0200 0.0450 0.0630

160x160 0.0251 0.0541 0.1041

240x160 0.0281 0.0631 0.1181

352x240 0.0360 0.0831 0.1943

640x480 0.0771 0.1812 0.4797

800x600 0.1101 0.2434 0.6099

Page 67: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

PPT – GIF – Pixmap – Bitmap

PowerPoint to Bitmap (sec)Dimensio

nText Graphic Picture

80x80 0.0210 0.0491 0.0641

160x160 0.0311 0.0471 0.1162

240x160 0.0400 0.0641 0.1342

352x240 0.0681 0.0771 0.2303

640x480 0.2043 0.3025 0.6069

800x600 0.3054 0.4369 0.8132

Page 68: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Mount Server Queries

Single Tuple Query

0

0.05

0.1

0.15

0.2

0.25

10 20 30 40 50

Number of Mounts

Tim

e (m

s)

1 match

2 matches

3 matches

4 matches

• Scales linearly.• Scale bounded by space and

activity.

Page 69: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Selected Publications• A Context-Aware Data Management System for Ubiquitous

Computing Applications.  Christopher K. Hess and Roy H. Campbell, In International Conference of Distributed Computing Systems (ICDCS 2003), Providence, Rhode Island, May 19-22, 2003.

• Building Applications for Ubiquitous Computing Environments. Christopher K. Hess, Manuel Román, and Roy H. Campbell, In International Conference on Pervasive Computing (Pervasive 2002), Zurich, Switzerland, August 26-28, 2002.

• Gaia: A Middleware Infrastructure to Enable Active Spaces. Manuel Román, Christopher K. Hess, Renato Cerqueira, Anand Ranganathan, Roy H. Campbell, and Klara Nahrstedt, In IEEE Pervasive Computing, pp. 74-83, Oct-Dec 2002.

• An Adaptable Data Object Service for Pervasive Computing Environments. Christopher K. Hess, Francisco Ballesteros, Roy H. Campbell, and M. Dennis Mickunas.  In 6th USENIX Conference on Object-Oriented Technologies and Systems (COOTS'01), San Antonio, TX, January 29-February 2, 2001.

• 2 more under review. Personal and Ubiquitous Computing Journal (ACM) IEEE Pervasive Computing

Page 70: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

File System API

• File system and container wrappers.• Combination of template classes and

C++ wrappers provides simple interface.

• Apply generic programming to distributed objects.

DistributedContainer

Container Wrapper

DataObjects

Container Template

Specific Methods

Page 71: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Future Work

Application advertisements.More powerful syntax?Fault tolerance. retry indefinitely retry for period of time fail immediately

Traditional OS issues. reliability, consistency, locks

Page 72: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Scenarios

• Shared work space• How to dynamically add data?

• Seminar space• How to support scheduled

applications?

• Presentation space• How make data available?• How to incorporate personal devices?• How support heterogeneous devices?

Page 73: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

How CFS Uses Context

• Used to make data available to local resources

• Used to adapt data to device characteristics

• Used to tag data for later retrieval

Page 74: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

What Does CFS Support?

• Based on experiences, need to:

• Allow data to follow users• Prune irrelevant information• Direct data to running applications• Adapt to heterogeneous devices

Page 75: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

What is Different?

• Mobile users• Heterogeneous devices• Context

Page 76: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Gaia Data Browser

Context Mode

File Mode

Page 77: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Data Transformation

Context File System

GIFContainer ByteContainer

PowerPoint

Native File System

Page 78: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Data Grouping

Data with same metadata are:

related grouped distributed

Page 79: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Implementation

File server.Mount server.Catalog of containers (13).File system wrappers.Applications.

Page 80: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

What was Learned?

• What support an infrastructure for ubiquitous computing must provide.

• Ways in which users interact with ubiquitous computing spaces.

• Ways in which systems must change to support these interaction styles.

Page 81: The Design and Implementation of a Context-Aware File System for Ubiquitous Computing Applications

Application of CFS

• Gaia Data Browser.• Mobile mounts with PDA.• Add data from laptop.• Adding personal configurations.• Auto-launched attendance.• Handheld GIF viewer.