Transcript Slide 1

A Software Engineering Perspective
on Context-Awareness
in Ad Hoc Mobile Networks
Christine Julien
Mobile Computing Laboratory
Washington University in Saint Louis
July 20, 2015
Motivation
• 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
July 20, 2015
Christine Julien
2
Ad 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
July 20, 2015
Christine Julien
3
Computational Model
• Ad hoc network
• Host (mobile or stationary)
— Defines location in physical space
• Agents/Application Components
— Unit of mobility residing on a host
• Data
Host 2
— Owned and generated by each agent
Host 1
Host 3
July 20, 2015
Christine Julien
4
Overview
•
•
•
•
•
Context-aware computing
EgoSpaces conceptual model
EgoSpaces middleware
Network abstractions
Conclusions and future work
July 20, 2015
Christine Julien
5
Context-Aware Computing:
The 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 component’s sensors at a
time
•
Context Toolkit, Context Fabric
— Support only local or symmetric interactions
•
July 20, 2015
MARS, LIME
Christine Julien
6
Context-Aware Computing:
Rethinking Applications (1)
Collision
July 20, 2015
Christine Julien
Traffic
7
Context-Aware Computing:
Rethinking Applications (2)
July 20, 2015
Christine Julien
8
Context-Aware Computing:
Rethinking Applications (3)
Charlie
Angie
July 20, 2015
Christine Julien
9
Context-Aware Computing:
Novel 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
July 20, 2015
Christine Julien
10
Overview
•
•
•
•
•
Context-aware computing
EgoSpaces conceptual model
EgoSpaces middleware
Network abstractions
Conclusions
July 20, 2015
Christine Julien
11
EgoSpaces Conceptual Model:
The 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 application’s individual needs
• Allow agent to control scope of views
— Ease program development
— Minimize performance penalties
Reference
agent’s view:
yellow data
within one hop
July 20, 2015
Host 2
Host 1
Host 3
Christine Julien
12
EgoSpaces Conceptual Model:
Declarative 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 AgentCentered Context-Aware Computing in Ad Hoc Wireless Environments,” Software
Engineering for Large-Scale Multi-Agent Systems, LNCS 2603, April 2003.
July 20, 2015
Christine Julien
13
EgoSpaces Conceptual Model:
View 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.
July 20, 2015
Christine Julien
14
EgoSpaces Conceptual Model:
Consistency 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
July 20, 2015
Christine Julien
15
EgoSpaces Conceptual Model:
Reactive 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
July 20, 2015
Christine Julien
16
EgoSpaces Conceptual Model:
Active Views
• Capture natural context interactions
—
—
—
—
Transparent data migration
Automatic duplication
Event capture
Extensibility
• Simplify programming
— Programming
abstractions
— Reduced code size
Julien, C. and Roman, G.-C., "Active Coordination in Ad Hoc Networks," to appear in
Proceedings of Coordination 2004.
July 20, 2015
Christine Julien
17
EgoSpaces Conceptual Model:
Access 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
July 20, 2015
Christine Julien
18
EgoSpaces Conceptual Model:
Access Control Provision
• Agent specified access control function
— Limits access based on agent properties
— Allows fine-grained access control
— Individualized to particular application’s 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
July 20, 2015
Christine Julien
19
Overview
•
•
•
•
•
Context-aware computing
EgoSpaces conceptual model
EgoSpaces middleware
Network abstractions
Conclusions
July 20, 2015
Christine Julien
20
EgoSpaces Middleware:
Why 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, D’Agents, Code
— Coordination systems
• LIME, MARS, Jedi
July 20, 2015
Christine Julien
21
EgoSpaces Middleware:
EgoSpaces 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
July 20, 2015
Christine Julien
22
EgoSpaces Middleware:
EgoSpaces Architecture
• Application provides
declarative view
specifications
• Middleware
application
EgoSpaces
ELights
network abstractions
— Discovers neighbors
sensor monitoring
— Monitors context
sensors
discovery message sensing
— Provides data contents
of context to
ad hoc physical network
application through
view abstraction
July 20, 2015
Christine Julien
23
EgoSpaces Middleware:
Demo 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
July 20, 2015
Christine Julien
24
EgoSpaces Middleware:
Simplifying 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
July 20, 2015
Christine Julien
25
Overview
•
•
•
•
•
Context-aware computing
EgoSpaces conceptual model
EgoSpaces middleware
Network abstractions
Conclusions
July 20, 2015
Christine Julien
26
Network Abstractions:
Restricting 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
5mi
• 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.
July 20, 2015
Christine Julien
27
Network Abstractions:
Solution Overview
1. Represent the ad hoc network as a graph
2. Abstract properties of nodes and links to
weights on edges in this graph
3. Calculate the cost of paths from the
reference node
4. Determine the shortest path to each node
and build a tree
5. Limit this tree using a bound, D
July 20, 2015
Christine Julien
28
Network Abstractions:
Weight 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.
i
i ij j
j
• Edge weights combine link properties and the
properties of the connected nodes
mij = (i, j, ij)
July 20, 2015
Christine Julien
29
Network Abstractions:
Computing 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
July 20, 2015
Christine Julien
30
Network Abstractions:
Limiting the Scope
• 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
3
1
2
2
1
1
0
2
1
1
2
1
1
Note: All links have a weight of 1
July 20, 2015
Christine Julien
31
Network Abstractions:
Context 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
July 20, 2015
Christine Julien
32
Network Abstractions:
Protocol Example
Query= (source, new cost, …)
State=
[cost, parent, ...]
{(neighbor, cost through neighbor), …}
r
(r, 2, …)
[2, r, …]
{(r,2),
(b,5)} a
{(r,2)}
July 20, 2015
4
[0, null, …]
(r, 4, …)
2 (b,4 5, …)
[4, a,
r, …]
[3,
…]
1
b {(r,4),
{(r,4)}
(a,3)}
{(r,4),(a,3)}
(a,
1 3, …)
(b, 4,
5, …)
5
d
Bound = 6
Cost = additive
c
[5,
[4, b, …]
{(b,5)}
{(b,4)}
Christine Julien
33
Network Abstractions:
Context 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
July 20, 2015
Christine Julien
34
Network Abstractions:
Maintenance Example
Query= (source, source cost, new cost, …)
State=
[cost, parent, …]
{(neighbor, cost through neighbor), …}
r
July 20, 2015
4
[3,
[4, a,
r, …]
…]
b {(r,4),(a,3)}
{(r,4),
{(r,4)}
(a,8)}
6
1
5
d
[0, null, …]
4
2
[2,
[2, r,
r, …]
…]
{(r,2),
(b,5)} a
{(r,2),
(b,10)}
{(r,2)}
Bound = 6
Cost = additive
1
c
(b, 5, …)
[5,
[4, b, …]
{(b,5)}
{(b,4)}
Christine Julien
35
Network Abstractions:
Evaluation
• 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
July 20, 2015
Christine Julien
36
Network Abstractions:
Context Building Consistency (1)
• Good consistency for reasonably sized contexts
one-hop
context
two-hop
context
three-hop
context
four-hop
context
Transmission range (meters)
July 20, 2015
Christine Julien
37
Network Abstractions:
Context Building Consistency (2)
• Consistency >80% with increased network load
five context
definitions
one context
definition
ten context
definitions
Transmission range (meters)
July 20, 2015
Christine Julien
38
Network Abstractions:
Useful Broadcasts
• Efficiency decreases with increasing density
one-hop
context
two-hop
context
three-hop
context
four-hop
context
Transmission range (meters)
July 20, 2015
Christine Julien
39
Conclusions
• 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
July 20, 2015
Christine Julien
40
Contributions (1)
• Algorithms for ad hoc mobile computing
— Network abstractions
— Consistent group membership
R
a
b
R
r
R
a
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.
July 20, 2015
Christine Julien
41
Contributions (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.
July 20, 2015
Christine Julien
42
Contributions (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.
July 20, 2015
Christine Julien
43
Future 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
July 20, 2015
Christine Julien
44
Questions?
http://www.cse.wustl.edu/~julien
[email protected]
July 20, 2015
Christine Julien
45
Publications 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 MultiAgent 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.
July 20, 2015
Christine Julien
46