Post on 03-Jan-2016
Context-aware Computing Context-aware Computing (Chapter 4)(Chapter 4)
2
Context-aware ComputingContext-aware Computing
Beyond application-aware adaptation Instead of adapting only to resource
levels, adapt to contextsContext:
– Enumeration-based (categories)– Role-based (roles of context in building
mobile applications)
3
Types of ContextTypes of Context
Computing context includes network connectivity, communication costs, communication bandwidth, and local resources, such as printers, displays, and workstations
User context includes user profiles, location, and people in the vicinity of the user
Physical context includes lighting and noise levels, traffic conditions, and temperature
Temporal context includes time of day, week, month, and season of the year
Context history is the recording of computing, user, and physical context over time
4
The 5 W’s…The 5 W’s…
Who is the user? Who are the people with which the user is interacting, or who is nearby?
What is the user doing? Where is the user? Home? Work?
Bathroom? Familiar coffee shop? When? What time is it? Why? Why is the user performing a certain
task? What is the task’s priority in the “grand scheme”?
Low-level vs. High-level details
5
Context OverviewContext Overview
6
Context-aware RequirementsContext-aware Requirements
Contextual sensing– detection of environmental states
Contextual adaptation – capability of the system to adapt its behavior by using
contextual information Contextual resource discovery
– capability to discover available resources in an environment Contextual augmentation
– capability to associate contextual information with some digital data
– Example: association of a particular meeting place and attendees with a set of minutes
– Example: association of a digital photo with a specific location
7
Designing CA ApplicationsDesigning CA Applications
Build list of relevant contexts– e.g., “home”, “office”, “traveling”, “sleeping”, …
Specify context-aware behaviors– Presentation of context-sensitive information– Automatic discovery of relevant objects (e.g.,
nearby people for transmission of business cards)– Modification of the physical and digital
environments Integration of application with methods for
sensing context
8
Simple Example: stick-e notesSimple Example: stick-e notes
Context-aware Post-it notes Build list of relevant contexts
– Based on location (latitude/longitude via GPS)– Temperature, whatever else can be sensed
Specify context-aware behaviors– stick-e notes “pop up” on a PDA when contextual info is
appropriate– Reminder to return a library book when near the library– Reminder to buy a new winter jacket when temperature
drops below 60F Integration of application with methods for sensing
context– Most difficult part– Ubiquitous sensing of environmental characteristics, such as
location, temperature, number of human beings nearby, the cat is near, not widespread
9
Where Does Context Come From?Where Does Context Come From?
Returning to the “difficulty” point on the previous slide
Environmental sensors– Temperature, humidity, location, noise, motion– Cat sensor– Potential need for multiple types of sensors– GPS vs. indoor location sensors
History– Recording user actions and previous contexts
User’s personal computing environment– Schedules, notes, address books, financial info
Need real-time analysis to provide context
10
Example: LocationExample: Location
Indoor locating systems – e.g., infrared or ultrasound
Wireless nanocell communication activity– Association with short-range base stations
GPS Associations with nearby computers Motion sensors and cameras, computer
vision Ask the user!
11
Service-oriented ArchitectureService-oriented Architecture
Provide services to context-aware applications Context subscription and delivery service
– Delivers contextual information as available Context query service
– Delivers contextual information on-demand Context transformation and synthesis services
– Transforms low-level contextual information (location, temperature, lighting levels) into high-level (“YOU’RE IN THE CLOSET IN YOUR BEDROOM”)
Service discovery– Discovery of nearby services– We’ll examine service discovery protocols next!
Paper: Out of Context: computer Paper: Out of Context: computer systems that adapt to, and learn systems that adapt to, and learn
from, contextfrom, context(authors H. Lieberman & T. Selker)(authors H. Lieberman & T. Selker)
13
Key PointsKey Points
Context-Sensitive (Aware) computing is antithetical to traditional computer science (search for context-independent abstractions)– Black box approach
Model of Context Aware application: Context as implicit input – System boundary decides what’s implicit and
what’s explicit
Context-Abstraction trade-off
14
Key Points (Cont.)Key Points (Cont.)
Models of context:– System model: description of the system – User model: User’s state, history and
preferences– Task model: goals and actions intended to
be performed by the userTo create context-aware applications
these models should be dynamic and have ability to explain themselves.
15
Context from other fieldsContext from other fields
Mathematics and AI– Statistical data mining techniques: knowledge
discovery by analyzing large amount of data HCI
– Ambient interfaces Sociology and Behavior Studies
– Situated action – stresses the effect of shared social context on human behavior
– Activity Theory: agent strategies for successful behaviour
– Nass and Reeves work on understanding how context affects human interaction with computers
Mobile Middleware (Chapter 5)Mobile Middleware (Chapter 5)
17
What is Mobile Middleware?What is Mobile Middleware?
Software that supports mediation between other software components, fostering interoperability between those components across heterogeneous platforms and varying resource levels.
18
Key AspectsKey Aspects
Adaptation (Chapter 1) Software Agents (Chapter 6):
– Put actions where data is!– Enable disconnected operations– Use infrastructure resources– Dynamic expansion of server/client functionality
Service Discovery (Chapter 7)– Dynamic discovery of services and enable
dynamic interaction between Clients and Services– Main issue is framework standardization to help
developers quickly build and deploy dynamic plug-and-play apps.
Mobile Agents (Chapter 6)Mobile Agents (Chapter 6)
20
Mobile Agents: MotivationMobile Agents: Motivation
Mobile agent systems support dynamic migration of bits of software
These “bits of software” are agents, and perform tasks remotely in support of some local computation
Some advantages:– Disconnected operation– Customized, “do once” operations without
customizing server software– Attacks resource-poverty problem for mobile
computing• Less bandwidth, power, CPU needed
21
Searching Tech Reports: No AgentsSearching Tech Reports: No Agents
Tech report server
Queries, responses, transfer of documents
MH
22
Searching Tech Reports: AgentsSearching Tech Reports: Agents
Tech report server
MH
Mobile agent
localqueries
<<creation of document summaries orChanges in format, e.g. PDF TXT>>
23
Mobile Agents: Another ExampleMobile Agents: Another Example
AGENT
Box office PLACE
MEETINGDrugstore PLACE
Music store PLACE
Shopping center server
Theater server
AUTHORITY/PERMIT evaluation
Tom
Daryl
24
Mobile Agents: RoadblocksMobile Agents: Roadblocks
Security Users’ trust in mobile code has been badly
damaged– Applets, Javascript, other scripting languages are
far less sophisticated than agents, but…
Infrastructure Lack of a “killer” application Standardization (Security)
25Mobile Agents: Technical IssuesMobile Agents: Technical Issues
Security! Implementation language for agents
– Interpreted languages easier– Don’t want to insist on homogeneous architectures!
Migration strategy– Again, easier with languages like Java– Otherwise, becomes a process checkpointing problem
Communication strategy– Temporal locality: must communicate with other agents
while they’re around, or not?– Spatial locality: must be able to name and locate other
agents to communicate
26
Agent Communication: TraditionalAgent Communication: Traditional
Sockets, RMI, …Strong temporal localityOther guy must be around to
communicateOther guy’s “name” reveals his location
27Agent Communication: Meeting PlacesAgent Communication: Meeting Places
A “meeting room” (aka service points) for agents
Agents must migrate to the meeting room to communicate
Temporal locality—other agents must be present to communicate
Spatial locality—communicate with other agents in the meeting place, can dynamically determine who’s there
28Agent Communication: Tuple SpacesAgent Communication: Tuple Spaces
Communicate by dropping objects into a shared space
Relaxes temporal and spatial locality Can drop objects for other agents whether
they’re around or not Don’t have to know their names or locations Simpler to use local tuple spaces (one per
place?) Can use reactions, which cause code to be
executed when a certain type of object (e.g., a “cash” object) is dropped into the space
Ad hoc / sensor networks (Ch 8Ad hoc / sensor networks (Ch 8))
30
Mobile Ad Hoc NetworksMobile Ad Hoc Networks
May need to traverse multiple links to reach a destination
31
Mobile Ad Hoc NetworksMobile Ad Hoc Networks
Mobility causes route changes
32
Mobile Ad Hoc NetworksMobile Ad Hoc Networks
Formed by wireless hosts which may be mobile Don’t need a pre-existing infrastructure
– ie, don’t need a backbone network, routers, etc. Routes between nodes potentially contain
multiple hops Why MANET?
– Ease, speed of deployment– Decreased dependence on infrastructure– Can use in many scenarios where deployment of a wired
network is impractical or impossible– Lots of military applications, but there are others…
,
33
Many ApplicationsMany Applications
Personal area networking– cell phone, laptop, ear phone, wrist watch
Civilian environments– meeting rooms– sports stadiums– groups of boats, small aircraft (wired REALLY impractical!!)
Emergency operations– search-and-rescue– policing and fire fighting
Sensor networks– Groups of sensors embedded in the environment or
scattered over a target area
34
Many VariationsMany Variations
Fully Symmetric Environment– all nodes have identical capabilities and responsibilities
Asymmetric Capabilities– transmission ranges and radios may differ – battery life at different nodes may differ– processing capacity may be different at different nodes– speed of movement different
Asymmetric Responsibilities– only some nodes may route packets – some nodes may act as leaders of nearby nodes (e.g.,
“cluster head”)
35
Many VariationsMany Variations
Traffic characteristics may differ– bandwidth– timeliness constraints– reliability requirements– unicast / broadcast / multicast / geocast
May co-exist (and co-operate) with an infrastructure-based network
36
Many VariationsMany Variations
Mobility patterns may be different– people sitting at an airport lounge (little mobility)– taxi cabs (highly mobile)– military movements (mostly clustered?)– personal area network (again, mostly clustered?)
Mobility characteristics– speed– predictability
• direction of movement• pattern of movement
– uniformity (or lack thereof) of mobility characteristics among different nodes
37
ChallengesChallenges
Limited wireless transmission range Broadcast nature of the wireless medium Packet losses due to transmission errors Environmental issues (“chop that tree!!”) Mobility-induced route changes Mobility-induced packet losses Battery constraints Potentially frequent network partitions Ease of snooping on wireless transmissions (security
hazard) Sensor networks: very resource-constrained!
38
Hidden Terminal ProblemHidden Terminal Problem
B CA
Nodes A and C cannot hear each other
Transmissions by nodes A and C can collide at node B
On collision, both transmissions are lost
Nodes A and C are hidden from each other
39
First Issue: RoutingFirst Issue: Routing
Why is Ad hoc Routing Different? Host mobility
– link failure/repair due to mobility may have different characteristics than those due to other causes
– traditional routing algorithms assume relatively stable network topology, few router failures
Rate of link failure/repair may be high when nodes move fast
New performance criteria may be used– route stability despite mobility– energy consumption
40
Routing ProtocolsRouting Protocols
Proactive protocols– Determine routes independent of traffic
pattern– Traditional routing protocols for wired
networks are proactive
Reactive protocols– Discover/maintain routes only if needed
41
Trade-Off: Proactive vs. ReactiveTrade-Off: Proactive vs. Reactive
Latency of route discovery– Proactive protocols may have lower latency since routes are
maintained at all times– Reactive protocols may have higher latency because a route
from X to Y will be found only when X attempts to send to Y Overhead of route discovery/maintenance
– Reactive protocols may have lower overhead since routes are determined only if needed
– Proactive protocols can (but not necessarily) result in higher overhead due to continuous route updating
Which approach achieves a better tradeoff depends on the traffic and mobility patterns, but most ad hoc routing protocols are reactive