On Developing Interest-centric Applications for Ad hoc Networks

3 downloads 25724 Views 323KB Size Report
in Linux-based systems (Ubuntu and Android). Moreover, an. API (REP API) provides basic communication functions that ease the development of ...
On Developing Interest-centric Applications for Ad hoc Networks H´eberte F. Moraes, Nelson R. Perez Benitez, Renato C. Dutra, Claudio L. Amorim Laborat´orio de Computac¸a˜ o Paralela - COPPE/UFRJ, Rio de Janeiro, Brasil Email: brebete, nelsonrp, rcdutra, [email protected]

Abstract—Mobile ad hoc Networks (MANETs) pose significant shared communication medium constraints such as finite memory, number of access channels, and bandwidth, which make Quality of Experience (QoE) a critical issue for the development of applications. Furthermore, the use of multihop for message forwarding multiplies the amount of messages, increasing interference which in turn augments both channel contention and network congestion in the shared communication medium. The REP protocol for MANETs has been developed with these issues in mind. REP is an interest-centric communication protocol that generates minimal disturbance in the shared communication medium, thus enabling resource savings and allowing applications with QoE. REP introduces the Active Prefixes (APs), a new scheme for addressing, message forwarding, and interest-centric communication. An AP is composed of prefix (P) and interest (I), which every device builds P and each running application sets I. A service named REPD, using REP protocol, was implemented in Linux-based systems (Ubuntu and Android). Moreover, an API (REP API) provides basic communication functions that ease the development of interest-centric applications. The use of REPD service by mobile devices together with running applications create an interest-centric ad hoc network, which is called Radnet. As proof of concept for demonstrating the usability we implemented an interest-centric chat application using AP for running in a Radnet.

namely the Radnet, which implements a new communication mechanism based on Active Prefixes (APs). Unlike conventional ad hoc networks, Radnets use APs in the header of messages sent to the network, with double objective: to conserve network resources and provide QoE. In addition, simulated results showed that the use of Active Prefixes by REP reduced channel contention and network congestion, which contributed to Radnet’s support for messages with low latency and high delivery rates. We used REP to develop a service for Linux-based systems, with the following functions: a) management of sending and receiving interest-centric messages at the network layer; b) message transfer to the interested-centric running applications in the node accordingly to its registered interests; and c) multihop message forwarding over the network. Also, we built an API to allow the development of new interest-centric applications for Radnets. To assess the effectiveness of REP, we used REP API to implement a chat application which will be presented in this demo.

Keywords-mobile ad hoc network; interest-centric; Active Prefix;

The shared communication medium suffers from both channel contention and network congestion; besides, these problems are worsened by the use of multihop due to increasing the number of nodes that send messages to the network. Nevertheless, QoE is needed to application works properly and networks have limited resources, such as memory, number of access channels, and bandwidth. This way, there exists a trade-off between maintaining a given QoE and consuming network resources. We developed and evaluated APs as a new mechanism to reduce disturbance of ad hoc networks in a shared communication medium to the minimum level, so that network resources are saved, while providing an environment with QoE for running applications in a mobile ad hoc wireless network. Active prefixes provide Radnets with an effective support to forwarding messages and message delivery in mobile networks by exploiting the AP features. The Radnet [1] is based on the Publisher/Subscriber (Pub/Sub) model in which publishers produce messages registered to a particular interest and only subscribers registered to the same interest will receive them, which differs from conventional approaches (usually inherited from wired networks). Through interest-centric messages, the Radnet

I. I NTRODUCTION In recent years, the large spread use of smartphones and mobile devices has stimulated the development of suitable applications for ad hoc networking using nearby mobile equipments in local urban areas, aka mobile social networks. However, current ad hoc networking solutions do not provide adequate support for efficient implementation of these new applications since that they do not consider to a sufficient degree the key issues of location, mobility, and amount of mobile equipments in local environments, nor the sharing of communication medium. In wireless networks, device mobility produces high churn rates and nodes with dynamic neighborhoods; besides, portable equipments either can consume all of its energy or switch off. Moreover, current protocols need to know the network structure or the neighborhood before sending a message, which the above issues point out, make difficult for applications based on these protocols to work properly. As an alternative, we developed the REP protocol proposed in [1] to build an interest-centric ad hoc network, c 978-1-4673-1239-4/12$31.00 2012 IEEE

II. M OTIVATION

implements the Pub/Sub model in a completely distributed way. Active Prefix (AP) }|

z Prefix (P)

B C

{

A

Interest (I) D

Figure 1.

Active Prefix (AP)

In a Radnet, each node defines an Active Prefix (AP) which is used for two main purposes: ad hoc networking and communication of distributed applications. Figure 1 shows the AP structure which consists of two parts: node prefix (P) and application interest (I), where P consists of multiple fields, each of which set to a value of a distribution variable, and I serves as a communication means for a distributed application running in Radnet nodes. The P fields are built to perform two networking functions: probabilistic message forwarding and node addressing, using the bit sequence of P fields altogether. Specifically, the header of a Radnet message contains the AP of its source node, which is evaluated at every intermediate node that receives the message along the path until the message reaches its destination node(s). An intermediate node decides whether to forwarding a received message using a matching filter described below. The interest (I) enables nodes running the same application to communicate by sending messages whose APs share the same interest. Note that the use of I for message forwarding is unsuitable, because a popular interest will lead to message flooding easily. In the other hand, an interest that is uncommon can make associate messages undeliverable. Therefore, we use P for message forwarding with nodes working cooperatively. In [1] we proposed and developed the REP protocol for ad hoc mobile networks using the concept of APs. REP uses a matching filter that makes a field-by-field comparison between the prefix P of an incoming message and the prefix P of a receiver node. If at least one field of both Ps matches, then the message is forwarded, otherwise discarded. Also, REP controls message replication by storing in a local table at each node information from the last messages a node received, so that nodes can discard duplicate messages, reducing the message overheads in the network considerably. Hereafter, we illustrate the operation of a Radnet. Assume a wireless network composed of four nodes arranged as in Figure 2, where the transmission range of each node device is insufficient to reach every other node device in the network. Table I introduces the AP of every network node, built when join the network. Assuming a prefix composed of two fields with five possibilities each, it can be observed that node D shares the same interest as node A. This way, messages issued by A will be accepted by D, since A is unable to directly reach D there is a need for other network

Figure 2.

A Radnet with four nodes Table I PARTICIPANT AP S AP

Node A

Prefix P1 P2 1

5

B C D

3 1

3

5 4 4

Interest Concert Car Lift Lunch Concert

nodes to cooperate, if messages from A are to arrive at D. In this example, node A sends a message whose header contains its AP. Because it is located within A coverage area, node B receives the message and after analizing the message header with the matching filter, B concludes that they both share a common prefix field “P2 ”. Then, B decides to forwarding the message and sends it to the network. After, node C applies the matching filter and verifies the existence of a prefix field in common “P1 ”, thus forwarding the message. Finally, node D transfers the message to the application because an interest matching occurred. On the other hand, D discards the message after cheking that both APs have no common prefix field. Note that B and C could cooperate with the network by forwarding a message from A to its destination D despite of both were not interested in the message. REP protocol is the tool we introduce in this work, since REP supports the development of interest-centric applications for ad hoc networks. III. REPD S ERVICE To demonstrate the practical use and effectiveness of REP protocol, we implemented the REPD service, which is responsible for handling the messages received by a node and transferring them to running applications that have registered their interests. The REPD service runs in the background at each node. REPD includes basic functionalities to support interest-centric distributed applicatons such as register and unregister interests, sending messages, and querying the prefix value of host device via the REP API. REPD service (Figure 3) connects all running interestcentric applications in a Radnet. REP API (Figure 3(4))



repa recv(interest, data, src prefix): receive messages for previously registered interest; V. R ELATED W ORK

Figure 3.

REPD Service

enables applications to send and receive messages according to the application interests. Specifically, REPD builds REP packets which encapsulate the messages an application sends, and tagging messages with the specific interests defined by the application. After, REPD encapsulates the interest message using an Ethernet frame (Figure 3(1)) which is sent to the network. The REPD service is deviceindependent and works on either wireless or wired networks, provided that the communication device uses the Ethernet protocol. REP protocol forwards a packet received by a node only if the node prefix matches the message prefix. The REPD checks all received messages using the matching filter (Figure 3(2)) and disassembles the Ethernet frame first and then the interest-centric message, delivering the message payload to interested applications according to their registered interests (Figure 3(3)) by applications App1· · · AppN (Figure 3(4)). The REPD service was developed for Linux based systems (Ubuntu 10.04+ e Android) and requires root privileges to start execution. To set the root mode on Android is necessary to unblock root privileges using trustful software that is available in the Internet. IV. REP API REP API is a basic tool for developing Radnet applications. REP API creates sockets for each application, which are managed by REPD and through which applications can send and receive interest-centric messages. To create sockets, applications use a communication library that was implemented using REP protocol. The library provides the following function calls: • repa open(): create a communication channel with REPD service; • repa close(): close the communication channel with REPD service; • repa register interest(interest): register a new application interest to receive incoming interest messages; • repa unregister interest(interest): unregister a previously registered interest; • repa unregister all(): unregister all interests previously registered; • repa send(interest, data, dst prefix): send a message (“data”) for an interest group (if “dst pref ix” == 0) or for one destination equipment (setting the destination prefix “dst pref ix”);

Recent works on naming [2] are the closest to ours as they are not IP-based but data-centric. In one study [3], nodes communicate by sending messages based on user’s interests and utilize the Direct Diffusion method to reach destinations. Direct Diffusion generates a new gradient for each new piece of information, which is stored in network nodes even if a network node has no interest in the message. They use a list of < attribute, value > operation tuples, and cache data. By contrast, Radnets not caches any data and they use active prefixes for addressing and forwarding and use AP interest attributes for communication between nodes sharing the same application. Also, their work does not support node addressing, and thus no end-to-end addressing is possible; in contrast, Radnets use APs as node addresses and provide source - to - destination addressing. VI. D EMONSTRATION The attendees with Smartphones (Android 2.1/2.2 and upward) will be able to exchange messages using their own chosen interests evaluating QoE. Software of both REPD service and interest-centric Chat demo application will be available locally for installation; the chat application communicate via WiFi (802.11) in ad hoc mode. Several interests channels can be created and communication flows enable people nearby to gather and exchange information on shared interests. During the demonstration, we will provide the Chat application source code, with the objective of illustrating the use of REP API. From the technical point of view, this demonstration will showcase REP potentials for developing new applications that run in ad hoc mode, and main functionalities of Radnet´s new interest-centric communication model applied to practical mobile networks. R EFERENCES [1] R. C. Dutra, H. F. Moraes, and C. L. Amorim, “Active prefixes for mobile ad-hoc networks,” ES-739/11 – PESC/COPPE/UFRJ, Tech. Rep., June 2011. [2] M. Meisel, V. Pappas, and L. Zhang, “Ad hoc networking via named data,” in Proceedings of the fifth ACM international workshop on Mobility in the evolving internet architecture, ser. MobiArch ’10. New York, NY, USA: ACM, 2010, pp. 3–8. [3] C. Intanagonwiwat, R. Govindan, and D. Estrin, “Directed diffusion: a scalable and robust communication paradigm for sensor networks,” in Proceedings of the 6th annual international conference on Mobile computing and networking, ser. MobiCom ’00. New York, NY, USA: ACM, 2000, pp. 56– 67.