A Framework of Mobile Context Management for Supporting Context-Aware Environments in Mobile Ad Hoc Networks* Tzung-Shi Chen
Gwo-Jong Yu
Hsin-Ju Chen
Department of Information and Learning Technology
Department of Computer and Information Science
Department of Information and Learning Technology
National University of Tainan
Aletheia University
National University of Tainan
Tainan 700, Taiwan
Taipei 251, Taiwan
Tainan 700, Taiwan
[email protected]
[email protected]
[email protected]
ABSTRACT In this paper, we propose a framework for supporting contextaware environments in mobile ad hoc networks (MANETs). A virtual overlay network and two novel approaches in this framework are addressed to significantly improve the efficiency of data delivery in MANETs. The surrounding context of mobile nodes is used to determine which scheme, push-based or pullbased approaches, is adopted. When a real-time event happened in a node, push-based approach is adopted to disseminate urgent messages to its neighboring nodes. On the contrary, pull-based approach is adopted by building a virtual backbone, namely segment-tree, for seeking for more contextual information. Finally, the simulation is conducted to illustrate the performance achievements that our methods outperform the existing publish/subscribe approach based on AODV routing protocol.
Categories and Subject Descriptors C.2.1 [Network Architecture and Design]: Network Architecture and Design – network topology, wireless communication.
General Terms Algorithms.
Keywords Context-aware computing, publish/subscribe architecture, mobile ad hoc networks, overlay networks.
1. INTRODUCTION Title A mobile ad hoc network (MANET) is composed of mobile devices or mobile nodes without any centralized management or base stations. The applications of ad hoc networks are widely ranged including the rescue missions in the earthquake or a fire, soldiers in a battlefield communicate with each other, cars in Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. IWCMC’07, August 12–16, 2007, Honolulu, Hawaii, USA. Copyright 2007 ACM 978-1-59593-617-2/07/0003...$5.00.
vehicular ad hoc networks [8][12][14][16], activities in outdoor, meeting in conference rooms etc. Besides, those technologies can help users not only share resources with each others but also provide useful information autonomously. Context [5] is any information that can be used to characterize the situation of an entity. An environment which has been built or embedded intelligent system is certainly possible to support context-aware computing. Context-aware computing not only encompasses a variety of elements from different disciplines but also is necessary to make assessment in many aspects [9]. Chen et al. [4] proposed an agent-oriented infrastructure to support pervasive context-aware systems in smart environments. SOCAM [7] also utilized Ontology technique to build rapid prototype of context-aware services. Related researches lie in the areas of routing, developing model, and discovering resources in mobile ad hoc networks. Reactive routing schemes, such as AODV [11] or DSR [10], are to establish the route paths only when they have data traffic. Although they consume lower resources, the overhead may be high due to connections among nodes frequently broken. Therefore, hybrid (or hierarchical) schemes, such as DOA [1], intend to combine the advantage for both proactive and reactive approaches. PAST-DM [6] proposed a protocol for overlay multicast in MANETs. Each source node must construct its own data delivery tree. Schwan et al. [3] proposed opportunistic overlay approach to manage overlays for mobile nodes and to improve the efficiency of data delivery. Opportunistic overlay approach [3] uses a similar dynamic virtual mesh overlay construction technique as PASTDM [6]. It is not to consider the nodes disconnection or reconnection issues and it also assumes that there are no network partitions in MANETs. The proposed framework bears some different characteristics compared to other methods [3][6]. First, our proposed architecture is to divide nodes into mobile context manager which are organized into an overlay segment-tree virtual network and context providers/service requestors which send/receive contextual information via the segment-tree virtual network. Next, we construct an overlay network with considering the mechanism of network maintenance and reconfiguration. Mobile context manager in our approach is not necessary to update all topology information in the overlay network as [3][6] did. We only periodically update the information of neighboring nodes in the
overlay network. Thirdly, we propose a push-based approach to handle real-time information and combine pull-based approach for supporting context-aware environments in MANETs. Our framework will be more flexible and reasonable in MANETs. The rest of the paper is organized as follows. Section 2 introduces our system model. Section 3 describes how to select mobile context manager, construct segment-tree virtual network, and maintain the virtual network. Section 4 presents the experimental results. Finally, we conclude this paper in Section 5.
approach is developed to improve these shortcomings. Mobile context managers are to analyze and infer contextual information received from context providers and stored in database. When service requestors want to obtain some data, they can query from mobile context managers. Mobile context managers look for the data which service requestors queried through the STNV.
2. SYSTEM MODEL AND BASIC IDEA We assume that all mobile nodes are aware of their location by GPS or through other locating methods and mobile nodes are able to get their neighbors’ information through periodic hello messages. All different kinds of environmental sensors and the part of sensors are embedded in some mobile nodes can help detect something and acquire contextual information. Some of mobile nodes which installed context management can be mobile context manager. Mobile context manager can infer contextual information and transfer them into useful information.
2.1 Overlay Network Architecture Our system model is to construct an overlay network, called Segment-Tree Virtual Network (STVN for short), whose detailed procedure is described in Section 3. Besides, the overlay network is composed of the following nodes: context provider, service requestor, mobile context manager (MCM), and mobile node as shown in Figure 1.
Figure 2. The relationship diagram for our framework.
2.2 Context-Aware System To support context-aware environments, it is important for mobile context manager to analyze and infer contextual information. Figure 3 illustrates a context-aware architecture in our scheme. Context providers are able to acquire contextual information through context acquisition model. Through context-aware application execution, service requestors can obtain their wanted information.
Figure 1. System model. A group of context mobile mangers organize a virtual network. Once the STVN is constructed, the framework of an overlay network is built. In Figure 2, we figure out the relationship among three roles. Mobile nodes deliver contextual information through two approaches. One is called push-based approach, and the other is called pull-based approach. Push-based approach is adopted in real-time situation. Context providers directly broadcast the critical context to service requestors without connection with context mobile manger networks. The advantage of this method can immediately notify the neighbor mobile nodes. Unfortunately, push-based approach must constantly send data in a span, and the received data by service requestors is redundancy. It not only causes heavy overheads but also is not adaptive. For this reason, pull-based
Figure 3. Context-aware architecture. As soon as the information is detected, context model on context providers is to translate this detected information into an XML
schema integrated into XML-based metadata. Based on the research [13], Markup Scheme Models may be suitable to our scheme. Context is necessary for building context-aware system. Here mobile context managers need contextual information received from context providers for judgment and inference. Four classes of contexts are identified, user profile, user location, time for detected event, and activity.
3. CONTEXT MANAGEMENT MECHANISMS 3.1 Pull-based Approach 3.1.1 Dynamic Mobile Context Manager Selection Figure 4 illustrates an example with selecting mobile context managers. Here, we assume that nodes D, E, F, G, I, and J have installed context management system. In Figure 4 (a), context provider A selects node D as a mobile context manager and sends register packet to node D through periodic hello messages. Besides, service requestors H and L broadcast select packet to their neighbor nodes within K hops. After receiving select packet from service requestors H and L, nodes being mobile context managers such as G, I, J, E, and F send sreply packet to H and L.
manager, nodes A, H, and L store their mobile context manager information in a mobile management table as (D, D(x, y), Seqno, 40), (G, G(x, y), Seqno, 30), and (F, F(x, y), Seqno, 30), respectively. Then service requestors H and L are to send query packets to the respective nodes G and F through a series of intermediate nodes. Once node owns the contextual information to meet the demand of service requestor, it sends context packet back to its requestor after inferring.
3.1.2 Segment-Tree Virtual Network Construction After a node is selected as a mobile context manager, it broadcasts request packet within K hops to seek for other context mobile mangers when they are nearby. When the neighboring nodes, which are not mobile context managers, receive request packet, they attach their paths information to request packet and broadcast it like DSR [10]. Once mobile context managers within K hops receive the request packet, they traverse rreply packet to source mobile context manager according to path information. The path information is stored in the routing table. When the source mobile context manager receives rreply packet, it is to select a mobile context manager with shortest path as its parent node and dispatch connection packet included demand contextual information to it. Once other mobile managers receive connection packet, they reply ack packet and consider it as a child node. The connection between two mobile context managers is considered as a segment and its parent node is likely to become a child node in the other segments. All parent nodes in a segment send connection packet attached in their children nodes’ information in order to avoid the construction loop and to connect with other mobile context managers. Therefore, the STVN is built through the connection of all segments and mobile context manager can seek for more contextual information through STVN.
Figure 4. Dynamic mobile context manager selection. When service requestors H and L receive sreply packe, they are aware of neighbor nodes’ information within K hop count as shown in Figure 4 (b). Service requestors H and L are to select nodes G and F as mobile context managers based on measurement of distance between nodes and resource capability, respectively. Here dist(A, B) denotes the Euclidean distance between nodes A and B. A(x, y) denote the position of coordinate (x, y) of node A. For node H, although nodes G, I and J both have the capacity to be mobile context managers, it selects node G as the mobile context manager because the dist(H, G) is smaller than dist(H, I) and dist(H, J). For node L, although nodes E and F have the capacity to be a mobile context manager, it selects node F as the mobile context manager because the residual energy of node E is greater than that of node F. After selecting mobile context
Figure 5. Segment-tree virtual network construction. Figure 5 illustrates an example of a STVN construction. In Figure 5 (a), node A is selected as a mobile context manager and it then broadcasts request packet to adjacent nodes within K hop count. All paths where node A reaches to C and B, such as A→I→C,
Each node is to use a timer, called check_leave, to know the mobility of nodes. If nodes in STVN detect connection broken and are unable to maintain, they then will try to reconnect with other nodes and to reconstruct the network.
A→Q→R→C, A→P→H→B, and A→I→H→B, are recorded in the routing table. When two mobile context managers B and C receive request packet, they traverse rreply packet to node A. Node A is to consider node C as its parent node and to send connection packet to node C through node I because the dist(A,C) is smaller than dist(A,B)as shown in Figure 5 (b). Once node C receives connection packet, it sends ack packet to node A to confirm connection with each other. The connection between nodes A and C is considered as a segment.
3.2 Push-based Approach Real-time contextual information will be used in push-based approach. This method broadcasts contextual information to neighbor nodes when context event happened in emergency. But it is not practicable for context providers to broadcast contextual information constantly. Thus, we will discuss two dimensions which are hop and distance, respectively, to control contextual information dispatch. Besides, the transmitted range is divided into three areas: hot area, warm area, and cold area based on hop count and distance. Hot area stands for an emergency area and warm area stands for a warning area whereas cold area stands for safe area. Hop count and distance are criterions to decide if context providers proceed to broadcast. The distance or restricted hops will be calculated to prevent duplicated contextual information delivery. Once mobile nodes move a distance away from the location of context event or the number of hops is greater than threshold, they stop broadcasting the contextual information. These parameters within push-based approach are able to make message overhead decreased. Although the application of pushbased approach is to focus on real-time circumstances, contextual information can be stored in mobile context manger. Once service requestors need some information, they can query mobile context manager to acquire contextual information.
In Figure 5 (c), because nodes A and B are children of C, node C selects node D as its parent node even that dist(A,C) is smaller than dist(C,D). Node C sends connection packet attached their children node A and B to its parent node D. When node D receives connection packet from node C, it can know that nodes A and B is the children of node C. Therefore, node D is to select node E as its parent node to avoid looping. The STVN is built as shown in Figure 5 (d). Mobile context managers B, C, and D can look for more contextual information through the STVN. If they find the wanted contextual information, other mobile context managers send their corresponding context packets to them.
3.1.3 Node Joint and Leaving When STVN is constructed, other mobile nodes may be possible to join in or leave from the STVN. Q
Q N
F A
R
L A
D
I
D J
P
K
C
R I
J
P
N
F
L
M hop
K
C
Event E
H
O
B
M
G
E
H
O
B
M
G
S
A
S
Mobile Node T
T
(a) Context provider Services requestor Context mobile manager
Service Requestor
Select packet
N hop
SReply packet
Context Provider
Register packet
F
Query packet
Real-time contextual information
Context packet Mobile nodes
(a)
Connection
C
(b)
Event
B
E
Hot Area
Figure 6. Node joint in segment-tree virtual network. Nodes may join into the STVN as shown in Figure 6. In Figure 6 (a), service requestor Q and mobile context manger S intend to join the STVN. Service requestor Q first broadcasts select packet to adjacent nodes and adjacent nodes send sreply packet to node Q. After receiving sreply packet, service requestor Q select a nearest mobile context manager A and send query packet to it just like dynamic mobile context manager selection. Furthermore, mobile context manager S connects with the nearest mobile context manager C just like STVN construction as shown in Figure 6 (b). Mobile context manager S is considered as a children node by mobile context manager C. Once nodes connected to mobile context managers go away, they may cause network topology change and disconnection with other nodes. Therefore, three circumstances which are handoff mechanism, STVN maintenance and reconstruction have to be considered in our protocol when nodes moving. Handoff mechanism and STVN maintenance are important, but omitted here due to space limitation. Here network reconstruction is stated.
Cold Area
Warm Area
G A D
(b)
Figure 7. Examples of the push-based approach. Two situations of push-based approach are shown in Figure 7. In Figure 7 (a), context event happened and context provider A detected, it would send real-time contextual information to neighbor nodes within M hops by means of broadcasting. The hot area would form based on M hops or the distance away from context event. In Figure 7 (b), all nodes in hot area continued to broadcast. Warm area also formed within N hops and the range of warm area would cover the hot area. When nodes in the warm area received real-time contextual information, they still broadcasted as well as nodes in the hot area. Until nodes moved out the warm area and entered the safe area, they would stop broadcast to avoid flooding. Therefore, nodes were going to enter warm area such as F, G, and E being aware of the information of event in advance.
method still outperforms P/S. Figure 9 (b) shows that the success ratio of our method raises slightly with the increase of the number of mobile context managers. But the success ratio of P/S seems to not increasing obviously. Besides, the success ratio of our method is increasing as time went by because of the STVN construction as shown in Figure 9 (c). Constructed STVN can help requestors to obtain much contextual information. The numbers of mobile context managers also have the influence on success ratio. Success ratio (%)
100 80 60 40
ST VN P/S
20 0
100 80 60 40 ST VN P/S
20 0
5
10
15
20
25
5
(a) Mobility (m/s)
Success ratio (%)
We conduct the simulations to evaluate the performance of our method. The simulations are implemented in NS-2 simulator [15]. In addition, we compare our proposed method with publish/subscribe architecture based on AODV routing protocol. The network consists of 100 mobile nodes that randomly deployed in 1000mx1000m field. And then we also randomly choose 20 mobile context manager, 10 context providers, and 30 service requestors from 100 mobile nodes. The mobility models are random way-point with 1000mx1000m and Manhattan [2] with 1000mx1000m. The maximum speed is from 1 to 25 m/s and the pause time is set zero. Two-ray ground is used as the radio propagation model and an omni-directional antenna having unity gain in the simulation. Each communication range is with a 250 meter radius and simulated result is an average over 5 simulation runs and simulation lasts for 100 or 200 seconds. We use some metrics to show the effect of our method in below: delivery ratio, the number of received query divided by total numbers of query when selecting mobile context manager, success ratio, the number of received contextual information divided by the total numbers of query; average delay time, the necessary time of received contextual information; overhead, the total numbers of transmitted packets, including the control packets.
Success ratio (%)
4. EXPERIMENTAL RESULTS
10
15
20
25
(b) Number of mobile context managers
100 80 60 40
ST VN P/S
20 0 40
80
120
160
200
240
(c) T ime (sec)
Figure 9. Success ratio of data delivery.
4.1 Simulation Results
Distance Resource 1
2 3 4 (a) Hop count
5
1
1
Delay time (sec)
100 80 60 40 20 0
In Figure 10 (a), the delay time is increasing when the mobility speed is more and more fast gradually. The faster mobility causes node connection broken easily so rebuilding routing path and path maintenance are necessary. The result shows that our method has less delay time than P/S. However, the delay time of ours is also lower than P/S when time increasing as shown in Figure 10 (b). Once STVN has constructed, the delay time of contextual information delivery is decreased apparently, e.g. from 80 to 200 second, the delay time reduce from 0.71 second to 0.57 second. But the delay time of P/S trend to increase little by little. Figure 10 (c) shows that delay time is also reducing when more much nodes are chosen as mobile context manager. STVN still have less delay time than P/S because it is able to seek for contextual information through STVN. ST VN P/S
0.8 0.6 0.4 0.2
Disatnce Resource
5 10 15 20 25 (b) Number of mobile context managers
Figure 8. Packet delivery ratio.
4.1.2 Success Ratio Here we compare our method based on pull-based approach with publish/subscribe architecture based on AODV routing protocol. In the following, we denote our method as “STVN” and publish/subscribe architecture based on AODV routing protocol as “P/S”. In Figure 9 (a), we can observe the success ratios of two methods are both decreasing with the increase of mobility. Although the success ratio of STVN is also decreasing, our
ST VN P/S
0.8 0.6 0.4 0.2 0
0 5
10 15 20 (a) Mobility (m/s)
5
25
10
15
20
25
(b) Number of mobile context managers
1 Delay time (sec)
100 80 60 40 20 0
Delivery ratio (%)
Delivery ratio (%)
Two methods for mobile context manager (MCM) selection are based on distance and node resource respectively. In this experiment, simulation time is 100 seconds and maximum node speed is 20 m/s. We use two parameters, hop count and number of mobile context managers, to evaluate the packet delivery ratio. In Figure 8 (a), we find the delivery ratio decreasing with the increase of transmit range (hop count) especially selection based on resource. It is possible for selection based on resource to select a farther node as mobile context manager and cause failure delivery due to node mobility. Besides, the packet delivery ratio also increases by degree with the increase of mobile context manager as shown in Figure 8 (b). However, we observe that selection based on distance still outperforms the resource method. Because all nodes based on resource method may choose the same node as mobile context manager and cause single point failure, we use the distance selection in the rest of our study.
4.1.3 Delay Time
Delay time (sec)
4.1.1 MCM Selection based on Distance vs. Resource
0.8 0.6 0.4
ST VN
0.2
P/S
0 40
80
120
160
200
240
(c) T ime (sec)
Figure 10. Delay time.
4.1.4 Overhead In Figure 11 (a), the overhead of two methods are both increasing
80000
Overhead (packets)
Overhead (packets)
while the node mobility speed is increased. Our methods have higher overhead than that of P/S because of extra work for STVN construction and maintenance. When nodes move faster, it is easy to cause the connection broken for the virtual overlay network. STVN maintenance and reconfiguration is to deal with node mobility. The similar results are shown in Figure 11 (c). As time passed, our scheme does not outperform P/S due to virtual overlay network construction and maintenance. Figure 11 (b) shows that the overhead of two methods are still increasing when the number of mobile context managers is increasing. But the differences of overhead between two methods are decreasing gradually. Although the overhead of our method is not better than that of P/S, our scheme still improves the performance of success ratio and delay time. STVN P/S
60000 40000 20000 0
10
Overhead (packets)
5
15 20 Mobility (m/s) (a)
80000
80000
STVN P/S
60000
[4]
[5]
[6]
40000 20000 0
25
40
80
120 160 200 240 Time (sec) (b)
STVN P/S
60000
[3]
[7]
[8]
40000 20000
[9]
0 5 10 15 20 25 Number of mobile context managers (c)
Figure 11. Overhead.
[10]
5. CONCLUSIONS In this paper, we proposed a virtual overlay network, STVN, based on publish/subscribe architecture. Our proposed framework can efficiently support context-aware environments in MANETs. Furthermore, we proposed two approaches: push-based and pullbased to handle emergency and services supporting, respectively. In pull-based method, we compared two different methods for mobile context manager selection. The experimental results showed that our approach has higher success ratio and less delay time than publish/subscribe architecture based on AODV routing protocol.
[11]
[12]
[13]
6. ACKNOWLEDGMENTS This work is supported in part by National Science Council under grants NSC-95-2221-E-024-012 and NSC-95-2524-S-156-001, Taiwan.
[14]
7. REFERENCES [1] R. Bai and M. Singhal, “DOA: DSR over AODV Routing for Mobile Ad Hoc Networks,” IEEE Transactions on Mobile Computing, Vol. 5, No. 10, pp. 1403-1416, October 2006. [2] Fan Bai, Narayanan Sadagopan, and Ahmed Helmy. “IMPORTANT: A Framework to Systematically Analyze the Impact of Mobility on Performance of Routing Protocols for Ad Hoc Networks,” Proceedings of the 22nd Annual Joint Conference of the IEEE Computer and Communications
[15] [16]
Societies (Infocom 2003), Vol.2, pp. 825-835, San Francisco, California, USA, April 2003. Y. Chen and K. Schwan, “Opportunistic Overlays: Efficient Content Delivery in Mobile Ad Hoc Networks,” Proceedings of the 6th ACM/IFIP/USENIX International Middleware Conference (Middleware 2005), pp. 354-374, Grenoble, France, November 2005. H. Chen, T. Finin, and A. Joshi, “A Mobile Broker for Building Smart Meeting Rooms,” Proceedings of the Knowledge Representation and Ontology for Autonomous Systems Symposium, 2004 AAAI Spring Symposium, pp. 116123, Stanford CA, March 2004. A. K. Dey, “Distributed Mediation of Ambiguous Context in Aware Environments,” Proceedings of the 15th Annual Symposium on User Interface Software and Technology (UIST 2002), pp. 121-130, Paris, France, October 2002. C. Gui and P. Mohapatra. “Efficient Overlay Multicast for Mobile Ad Hoc Networks,” Proceedings of IEEE Wireless Communications and Networking Conference, Vol. 2, pp. 1118-1123, New Orleans, Louisiana, USA, March 2003. T. Gu, “A Service-Oriented Middleware for Building Context-Aware Services,” Journal of Network and Computer Applications, Vol. 28, No. 1, pp. 1-18, January 2005. Q. Huang, C. Julien, and G.-C. Roman, “Relying on Safe Distance to Achieve Strong Partitionable Group Membership in Ad Hoc Networks,” IEEE Transactions on Mobile Computing, Vol. 3, No. 2, pp. 192-205, April-June 2004. C. Julien and G.-C.Roman, “EgoSpaces: Facilitating Rapid Development of Context-Aware Mobile Applications,” IEEE Transactions on Software Engineering, Vol. 32, No. 5, pp. 281-298, May 2006. D. B. Johnson and D. A. Maltz, “Dynamic Source Routing in Ad Hoc Wireless Networks,” Mobile Computing, edited by T. Imielinski and H. Korth, Chapter 5, pp. 153-181, Kluwer Publishing Company, 1996. C. E. Perkins and E. M. Royer, “Ad-Hoc On-Demand Distance Vector Routing,” Proceedings of 2nd IEEE Workshop on Mobile Computing Systems and Applications, pp. 90-100, New Orleans, Louisiana, USA, Feb. 1999. M. Raya, A. Aziz, and J.-P. Hubaux, “Efficient Secure Aggregation in VANETs,” Proceedings of the 3rd international workshop on Vehicular ad hoc networks (VANET 2006), pp. 67-75, Los Angeles, California, USA, September 2006. T. Strang and C. L.-Popien, “A Context Modeling Survey,” Proceedings of the Sixth International Conference on Ubiquitous Computing - Workshop on Advanced Context Modeling, Reasoning and Management (UbiComp 2004), Nottingham/England, September 2004. D. Sormani, G. Turconi, P. Costa, D. Frey, M. Migliavacca, and L.Mottola, “Towards Lightweight Information Dissemination in Inter-Vehicular Networks,” Proceedings of the 3rd international workshop on Vehicular ad hoc networks, pp. 20-29, Los Angeles, California, USA, September 2006. VINT Project, “Network Simulator version 2 (NS-2),” Technical report, http://www.isi.edu/nsnam/ns, June 2001. J. Zhao and G. Cao, “VADD: Vehicle-Assisted Data Delivery in Vehicular Ad Hoc Networks,” Proceedings of the 25th Conference on Computer Communication, Barcelona, Spain, April 2006.