Title: A Software Engineering Perspective on Context-Awareness in Ad Hoc Mobile Networks
1A Software Engineering Perspective on
Context-Awareness in Ad Hoc Mobile Networks
- Christine Julien
- Mobile Computing Laboratory
- Washington University in Saint Louis
- February 8, 2015
2Motivation
- Simplify mobile application development
- Individually address application-specific needs
- Dynamically gather context information from the
network - Seamlessly adapt to environmental changes
- Transparently help programmers cope with problems
inherent in ad hoc networks
3Ad Hoc Network Challenges
- Form opportunistically
- Change rapidly in response to mobility
- Rely on no fixed infrastructure
- Provide transient interactions
- Foster decoupled computing
- Embody open environments with limited guarantees
4Computational Model
- Ad hoc network
- Host (mobile or stationary)
- Defines location in physical space
- Agents/Application Components
- Unit of mobility residing on a host
- Data
- Owned and generated by each agent
Host 2
Host 1
Host 3
5Overview
- Context-aware computing
- EgoSpaces conceptual model
- EgoSpaces middleware
- Network abstractions
- Conclusions and future work
6Context-Aware ComputingThe Need for Context
- Software and hardware constantly move and change
- Applications must opportunistically adapt
- Perception of context varies by application
- Current solutions
- Use basic types of context information in
specific ways - Fieldwork tools, guide tools
- Provide access to only a single components
sensors at a time - Context Toolkit, Context Fabric
- Support only local or symmetric interactions
- MARS, LIME
7Context-Aware ComputingRethinking Applications
(1)
8Context-Aware ComputingRethinking Applications
(2)
9Context-Aware ComputingRethinking Applications
(3)
Charlie
Angie
10Context-Aware ComputingNovel Notion of Context
- Flexible adaptation in dynamic environments
- Scope that extends beyond the local host
- Generalized interaction with context types
- Context needs vary by task and situation
- Asymmetric context interaction
- Multiple contexts evolving over time
- Context computation must be scalable
- Explicit control over the scope, size, and cost
11Overview
- Context-aware computing
- EgoSpaces conceptual model
- EgoSpaces middleware
- Network abstractions
- Conclusions
12EgoSpaces Conceptual ModelThe View Concept
- Maximal context contains all available data
- A view is a projection of the maximal context
- Egocentric abstraction of operating context
- Tailored to an applications individual needs
- Allow agent to control scope of views
- Ease program development
- Minimize performance penalties
Host 2
Host 1
Reference agents view yellow data within one hop
Host 3
13EgoSpaces Conceptual ModelDeclarative View
Specification
- Allows simple yet meaningful view definitions
- Restrict context based on properties of the
network, hosts, agents, and data - All location data owned by collision warning
agents on cars within 100 meters of my current
location - Facilitate transparent context maintenance
- Rely on underlying middleware for context
maintenance tasks
Roman, G.-C., Julien, C., and Murphy, A. L., "A
Declarative Approach to Agent-Centered
Context-Aware Computing in Ad Hoc Wireless
Environments, Software Engineering for
Large-Scale Multi-Agent Systems, LNCS 2603, April
2003.
14EgoSpaces Conceptual ModelView Interaction
- Present view contents as tuple space
- Allows use of traditional Linda-like operations
- Content-based pattern matching for tuple
retrieval - retrieve tuples (rd)
- remove tuples (in)
- Can affect overlapping views
- Atomic blocking and probing operations
Julien, C., and Roman, G.-C., "Egocentric
Context-Aware Programming in Ad Hoc Mobile
Environments," in Proceedings of FSE-10, November
2002.
15EgoSpaces Conceptual ModelConsistency Concerns
- Transactional semantics (e.g., money transfers)
- Strong application guarantees
- Can be expensive
- Use atomic Linda-like operations
- Best-effort semantics (e.g., traffic)
- Variety of implementations
- Application chooses semantics based on its
particular situation - Use scattered probing operations
16EgoSpaces Conceptual ModelReactive Views
- Facilitate behavioral adaptation
- Agents respond to presence of certain tuples
- Associate application-level reaction to the
appearance of a tuple - Scheduling modalities correspond to consistency
requirements - Eager semantics provide transactional guarantees
- Lazy semantics provide fewer guarantees
- Allow more flexible implementation
- Increase performance
17EgoSpaces Conceptual ModelActive Views
- Capture natural context interactions
- Transparent data migration
- Automatic duplication
- Event capture
- Extensibility
- Simplify programming
- Programming
- abstractions
- Reduced code size
migrate
Julien, C. and Roman, G.-C., "Active Coordination
in Ad Hoc Networks," to appear in Proceedings of
Coordination 2004.
18EgoSpaces Conceptual ModelAccess Control
Requirements
- Ad hoc networks are open environments, yet agents
may need to restrict data access - No permanent trusted central server
- Current work
- Administrative domains
- Mobile Ambients, SEAL
- Specialized type systems
- KLAIM
- Fine-grained access control
- SECOS
- Must scale to large systems
- Must address needs of individualized agents
19EgoSpaces Conceptual ModelAccess Control
Provision
- Agent specified access control function
- Limits access based on agent properties
- Allows fine-grained access control
- Individualized to particular applications needs
- Reference agent provides credentials and intended
operations - Access control functions evaluated on a per-tuple
basis to determine inclusion in the view - Can be used to define administrative domains
20Overview
- Context-aware computing
- EgoSpaces conceptual model
- EgoSpaces middleware
- Network abstractions
- Conclusions
21EgoSpaces MiddlewareWhy Middleware?
- Speed up application development in ad hoc
networks - Enhance level of programming abstraction
- Provide generic and flexible context operations
- Shift complex tasks to underlying infrastructure
- Facilitate rapid dissemination and adoption
- Proven solutions for other domains
- Distributed object systems
- CORBA, Jini, DENO
- Mobile agent systems
- Aglets, DAgents, ?Code
- Coordination systems
- LIME, MARS, Jedi
22EgoSpaces MiddlewareEgoSpaces Middleware
- Programming interface simplifies application
development burden - Allows declarative view specification
- Presents view contents as tuple space
- Provides standard Linda tuple space operations on
view definitions - Includes light-weight implementations of tuple
space operations - Provides tailored access control
23EgoSpaces MiddlewareEgoSpaces Architecture
- Application provides declarative view
specifications - Middleware
- Discovers neighbors
- Monitors context sensors
- Provides data contents of context to application
through view abstraction
application
EgoSpaces
ELights
network abstractions
sensor monitoring
discovery
message
sensing
ad hoc physical network
24EgoSpaces MiddlewareDemo Application
- Application-specific view restriction
- Hop-count based metric
- File-size restriction
- Content-based selection from view
- Songs displayed based on desired properties
- Reactive programming allows downloads to resume
25EgoSpaces MiddlewareSimplifying Application
Development
- Abstracts network for application programmer
- Removes concern for low-level network and
communication concerns - Provides high-level, abstract definition of needs
- Maintains contents of views as the environment
changes - Programmer does not have to persistently poll
- Shifts developer focus to key components of
applications - User interface design
- Local data storage and representation
26Overview
- Context-aware computing
- EgoSpaces conceptual model
- EgoSpaces middleware
- Network abstractions
- Conclusions
27Network AbstractionsRestricting the Network
- Defining a view requires limiting participating
hosts - e.g., all hosts within five miles or within three
hops - Consider the overhead in defining such a network
- Deal with volatility of ad hoc networks
- Unannounced disconnection
- Unpredictable reconnection
- Heterogeneous devices
Roman, G.-C., Julien, C., and Huang, Q., "Network
Abstractions for Context Aware Mobile Computing,"
in Proceedings of ICSE, May 2002.
28Network AbstractionsSolution Overview
- Represent the ad hoc network as a graph
- Abstract properties of nodes and links to weights
on edges in this graph - Calculate the cost of paths from the reference
node - Determine the shortest path to each node and
build a tree - Limit this tree using a bound, D
29Network AbstractionsWeight Assignment
- Individualized for an application
- Abstracts varied properties of hosts and links
- Host properties form ?i link properties form ?ij
- ?i includes battery power, CPU power, location,
etc. - ?ij includes physical distance, bandwidth,
throughput, etc. - Edge weights combine link properties and the
properties of the connected nodes - mij ?(?i, ?j, ?ij)
30Network AbstractionsComputing Path Cost
- Assuming each link has a single weight (mij), an
application can define a generalized cost
function - ?v0(Pk) Cost(?v0(Pk-1), mk-1,k)
- ?v0(?v0?) 0
- Cost function must be strictly increasing along a
path
31Network AbstractionsLimiting the Scope
3
- Define a subtree of the network by placing a
bound on the cost of each path - Bound is useful only if shortest path cost is
strictly increasing - Allows reference to restrict computation to a
subnet
1
2
2
1
1
0
1
2
1
1
2
1
Note All links have a weight of 1
32Network AbstractionsContext Calculation Protocol
- Service new queries
- Respond at the application level
- Remember cost, parent, sequence number, and
information about the computation - Propagate the query
- Service shorter distances (same sequence number)
- Remember cost and new parent
- Propagate query
- Disregard longer distances (same sequence number)
- But remember cost and parent if within bound
- Halt when computation reaches boundary
- Based on traditional ad hoc routing protocols
33Network AbstractionsProtocol Example
Query (source, new cost, ) State cost,
parent, ... (neighbor, cost through neighbor),
Bound 6 Cost additive
0, null,
r
4
2
1
a
b
5
1
4
c
d
34Network AbstractionsContext Maintenance Protocol
- Persistent queries require context maintenance
- React to increase in link weight
- If parent, adjust cost and propagate information
- Otherwise, update local information
- React to decrease in link weight
- If non-parent link, recalculate cost for neighbor
on the other end - Handle count-to-infinity problem
- Store entire shortest path at each hop
- Regain resources when context is no longer used
35Network AbstractionsMaintenance Example
Query (source, source cost, new cost,
) State cost, parent, (neighbor, cost
through neighbor),
Bound 6 Cost additive
0, null,
r
4
2
6
1
a
b
5
1
4
d
c
36Network AbstractionsEvaluation
- Simulation using ns-2 network simulator
- 100 node network in 1000x1000m2 space
- Vary network density by changing transmission
range - Using random waypoint mobility model adapted to
avoid speed degradation - Metrics
- Context consistency
- Settling time (at most 35ms)
- Percentage of useful broadcasts
37Network AbstractionsContext Building
Consistency (1)
- Good consistency for reasonably sized contexts
one-hop context
two-hop context
Percentage of context receiving message
three-hop context
four-hop context
Transmission range (meters)
38Network AbstractionsContext Building
Consistency (2)
- Consistency gt80 with increased network load
five context definitions
one context definition
Percentage of context receiving message
ten context definitions
Transmission range (meters)
39Network AbstractionsUseful Broadcasts
- Efficiency decreases with increasing density
one-hop context
two-hop context
Percentage of useful broadcasts
three-hop context
four-hop context
Transmission range (meters)
40Conclusions
- Melding of context-awareness and ad hoc networks
- Novel notion of context
- Individualized declarative specification
- Includes general facets of the environment
- Extended in scope to remote components
- Asymmetric context interactions
- EgoSpaces model and middleware
- Supporting algorithms and protocols
41Contributions (1)
- Algorithms for ad hoc mobile computing
- Network abstractions
- Consistent group membership
R
R
R
a
a
r
b
b
Huang, Q., Julien, C., and Roman, G.-C., "Relying
on Safe Distance to Achieve Strong Partitionable
Group Membership in Ad Hoc Networks," to appear
in IEEE Transactions on Mobile Computing.
42Contributions (2)
- Middleware for context-awareness
- Addressing software engineering concerns of
mobile environments - Facilitating rapid development of mobile
applications - Bringing application development to the hands of
novice programmers
Handorean, R., Payton, J., Julien C., and Roman,
G.-C., "Coordination Middleware Supporting Rapid
Deployment of Ad Hoc Mobile Systems", in
Proceedings of the 1st ICDCS Workshop on Mobile
Computing Middleware (MCM03), May 2003.
43Contributions (3)
- Formal models of context-aware and mobile
computing - Specification and refinement using Mobile UNITY
- Building Context UNITY for direct reasoning about
context-aware systems
- Roman, G.-G., Julien, C., and Payton, J., "A
Formal Treatment of Context-Awareness," (invited
paper) to appear in Proceedings of FASE 2004. - Julien, C., Payton, J., and Roman, G.-C.,
"Reasoning About Context-Awareness in the
Presence of Mobility," in Proceedings of FOCLASA,
September 2003. - Roman, G.-C., Julien, C., and Huang, Q., "Formal
Specification and Design of Mobile Systems," in
Proceedings of FMPPTA'2002, April 2002.
44Future Plans
- Addressing ad hoc network and communication
concerns in software engineering - Transactional programming in ad hoc networks
- Tailored communication and coordination paradigms
for applications in ad hoc networks - Context-aware routing and communication
- Applying formal methods to context-aware
environments - Reasoning about mobile and context-aware
applications through formal notation and proof
logic
45Questions?
- http//www.cse.wustl.edu/julien
- julien_at_wustl.edu
46Publications www.cse.wustl.edu/julien
- Roman, G.-G., Julien, C., and Payton, J., "A
Formal Treatment of Context-Awareness," (invited
paper) to appear in Proceedings of Fundamental
Approaches to Software Engineering 2004. - Julien, C. and Roman, G.-C., "Active Coordination
in Ad Hoc Networks," to appear in Proceedings of
Coordination 2004. - Huang, Q., Julien, C., and Roman, G.-C., "Relying
on Safe Distance to Achieve Strong Partitionable
Group Membership in Ad Hoc Networks," to appear
in IEEE Transactions on Mobile Computing. - Julien, C., Payton, J., and Roman, G.-C.,
"Reasoning About Context-Awareness in the
Presence of Mobility," in Proceedings of the 2nd
International Workshop on Foundations of
Coordination Languages and Software Architectures
(FOCLASA03), September 2003. - Handorean, R., Payton, J., Julien C., and Roman,
G.-C., "Coordination Middleware Supporting Rapid
Deployment of Ad Hoc Mobile Systems", in
Proceedings of the First International ICDCS
Workshop on Mobile Computing Middleware (MCM03),
May 2003. - Roman, G.-C., Julien, C., and Murphy, A. L., "A
Declarative Approach to Agent-Centered
Context-Aware Computing in Ad Hoc Wireless
Environments (extended version)," Software
Engineering for Large-Scale Multi-Agent Systems,
A. Garcia et. al. (editors), LNCS 2603, April
2003. - Julien, C., and Roman, G.-C., "Egocentric
Context-Aware Programming in Ad Hoc Mobile
Environments," in Proceedings of FSE-10, November
2002, pp. 21-30. - Roman, G.-C., Julien, C., and Huang, Q., "Network
Abstractions for Context Aware Mobile Computing,"
in Proceedings of the 24th International
Conference on Software Engineering (ICSE'02),
Orlando, FL (USA), May 2002, pp. 363-373. - Roman, G.-C., Julien, C., and Murphy, A. L., "A
Declarative Approach to Agent-Centered
Context-Aware Computing in Ad Hoc Wireless
Environments," in the 1st International Workshop
on Software Engineering for Large-Scale
Multi-Agent Systems (SELMAS'2002), May 2002. - Roman, G.-C., Julien, C., and Huang, Q., "Formal
Specification and Design of Mobile Systems," in
Proceedings of FMPPTA'2002, April 2002.