Building Applications for Ubiquitous Computing Environments

Download Report

Transcript Building Applications for Ubiquitous Computing Environments

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
A Room as a Computer
Application
Logic
Output
Input
Activity Oriented Computing
Research Focus
Spaces:
•
•
•
Private work spaces
Public work spaces
Group activity spaces
Applications:
•
•
•
Office apps
Collaborative apps
Activity apps
Outline
• Overview
• File System
•
•
•
mobile users
application types
heterogeneous devices
• Evaluation
• Conclusions
Scenario
1
application launcher
Scenario
2
attendance
recorder
Scenario
3
Scenario
4
Scenario
5
Scenario
6
6
Scenario
7
Scenario
8
What is Different?
•
•
•
•
•
•
Mobile users
Mobile devices
Heterogeneous devices
Many configurations
Scheduled activities
Context
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
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.
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
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.
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?
Issue 1: Mobile Users
• Interact with local resources
• Data cloud follows the user
move
Space A
Space B
 inject personal data reference into local space
Mobile Mount Points
• User carries
mount points
• Push into local
mount server
• System allocates
user directory
/
bin
usr1
users
merge
usr2
usr3
ppt
mp3
doc
 File mode
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.
Merging Data
• PDA
• Laptop
• Profile
Space 1
IR Beacon
Space 2
disk
disk
FS
FS
server
merge/extract
mounts
MS
FS
FS
disk
disk
Space 3
Add Personal Data
Issue 2: Application Types
• Public applications

direct data to applications
• Scheduled applications

prune irrelevant data
• Configurable applications

personal configurations
 group related material
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.
Group Related Material
Properties
what kind of data
• Type
• Sub-type
• Category
Think of shapes and colors…
Context
when data is valid
•
•
•
•
•
Activity
Time
Location
Identity
Space
Properties
• Property = shape
• Direct data to applications
Space
Application
Application
Properties
• Property = shape
• Direct data to applications
Space
Application
Application
?
Properties
• Property = shape
• Direct data to applications
Space
Application
Application
?
Properties
• Property = shape
• Direct data to applications
Space
Application
Application
Context
• Context = color
• Prune irrelevant data
Space
Meeting
Seminar
Classroom
Application
Context
• Context = color
• Prune irrelevant data
Space
Meeting
Seminar
Classroom
Application
?
Context
• Context = color
• Prune irrelevant data
Space
Meeting
Seminar
Classroom
Application
?
Context
• Context = color
• Prune irrelevant data
Space
Meeting
Seminar
Classroom
Application
Properties + Context
• Direct data to applications
• Prune irrelevant data
Space
Application
Application
Properties + Context
• Direct data to applications
• Prune irrelevant data
Space
Application
Application
?
Properties + Context
• Direct data to applications
• Prune irrelevant data
Space
Application
Application
?
Meeting
Properties + Context
• Direct data to applications
• Prune irrelevant data
Space
Application
Meeting
Application
Properties + Context
• Direct data to applications
• Prune irrelevant data
Space
Application
Application
?
Seminar
Properties + Context
• Direct data to applications
• Prune irrelevant data
Space
Application
Seminar
Application
Getting Relevant Data
Application
Give me papers
File System
= paper
Current context:
situation = seminar
date = 08/12/02
Question: How to apply shape and color to data?
Attaching Metadata
•
•
•
•
Metadata = properties + context
Attach metadata to files and directories
Instruct system when data is valid
Specify kind of data – fast searches
type
activity
Data
time
location
Directory Representation
• Metadata  name/value tuples
• Name = property or context
• Paths based on 1 or more tuples
data
name = location
value = 2401

/location:/2401
data
Metadata Directories
+
/type:/ppt
PURPLE
/location:/2401
/type:/ppt/location:/2401
OR
+ ORANGE
/type:/ppt
/location:/2402
/type:/ppt/location:/2402
Virtual Directory
• Constructed from
metadata
• Copy files to
context mode
directory to attach
metadata
• Not ordered
mp3
/
current:
time:
gaia.ppt
location:
2401
2402
 Context mode
mp3
gaia.ppt
time:
Metadata Augmented Mounts
Directories
aggregate
Mounts
link
Data
Accessing Data
• Applications unaware of current context
• Applications explicitly specify properties
• Context is determined implicitly
/type:/pdf/current:
properties
context
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
type = pdf
time = 3/3/03
MS
FS
FS
mount table database
FS
FS
type = pdf
time = 2/3/03
situation = seminar
Relevant Data Algorithm
Relevant data ≠ properties + context
weather is wildcard
situation
Data
type
location
properties
context
Current context:
location = 2401
situation = meeting
weather = sunny
Search for valid mounts:
1. Match all properties exactly
2. Match tagged context only
Public Applications
/type:/mp3/current:
Scheduled Applications
/current:/attendance.att
Tag file with situation metadata.
situation = meeting
situation = seminar
Configurable Applications
Tag configuration:
Browser opens:
acd = ppt
location = 2401
/acd:/ppt/current:
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
Transform Data
Pixels to Bitmaps
Bytes
GIFs
Context File System
Native File
System
Bitmaps
GIFs to Pixels
Bytes to GIFs
Bytes
PowerPoint
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.
Container Chains
Interface Map
BitmapContainer
PixelContainer
GIFContainer
TextContainer
DirectoryContainer
ByteContainer
File
Containers
Converter
Containers
.gif
bitmap
pixel
mpeg
gif
text
MPEGContainer
PowerPointContainer
TextContainer
dirent
byte
.mpg
.ppt
.txt
.doc
ByteContainer
*
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.
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();
Evaluation
• Ubiquitous computing environments are
difficult to evaluate
• Goals: programmable and usable


Development  programmable
Performance  usable
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
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
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
Related Work
•
•
•
•
•
•
•
ParcTab
Stick-e Notes
TACC
Odyssey
Symantec
Presto
Needed support for
applications in ubiquitous
CAR
computing spaces
Questions?
Thank you!
Context-Aware Mount Points
• Attach attributes – create mount point.
<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>
<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>
/type:/pdf/location:/2401
Container Wrappers
ContainerBase
C*
int
Attr
C, O
_container;
_position;
_attrs;
int get(O &buf, int count);
int put (O &buf, int count);
void satt(char *type, char *value);
<<bind>>
<GIFContainer, GIF>
GIFContainer
GaiaFS::Container::GetResult result;
result = _container->
getObjects(buf, _position, _attrs);
_position = result.position;
return result.count;
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>
Experimental Setup
1.5 GHz Pentium-4
256 MB RAM
Windows 2000
1 Gbps Ethernet
shell
FS
MS
module
FS
FS
FS
module
module
module
PPT – GIF
PowerPoint to GIF (sec)
Dimension
Text
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
PPT – GIF – Pixmap – Bitmap
PowerPoint to Bitmap (sec)
Dimension
Text
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
Mount Server Queries
• Scales linearly.
• Scale bounded by space and activity.
Single Tuple Query
0.25
Time (ms)
0.2
0.15
1 match
0.1
2 matches
3 matches
0.05
4 matches
0
10
20
30
Num ber of Mounts
40
50
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, OctDec 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
File System API
• File system and container wrappers.
• Combination of template classes and C++
wrappers provides simple interface.
• Apply generic programming to distributed
objects.
Container Wrapper
Data
Objects
Container Template
Specific Methods
Distributed
Container
Future Work
Application advertisements.
More powerful syntax?
Fault tolerance.



retry indefinitely
retry for period of time
fail immediately
Traditional OS issues.

reliability, consistency, locks
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?
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
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
What is Different?
• Mobile users
• Heterogeneous devices
• Context
Gaia Data Browser
File Mode
Context Mode
Data Transformation
GIFContainer
ByteContainer
Context File System
Native File
System
PowerPoint
Data Grouping
Data with same
metadata are:



related
grouped
distributed
Implementation
File server.
Mount server.
Catalog of containers (13).
File system wrappers.
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.
Application of CFS
•
•
•
•
•
•
Gaia Data Browser.
Mobile mounts with PDA.
Add data from laptop.
Adding personal configurations.
Auto-launched attendance.
Handheld GIF viewer.