Com-BIS: A Community-Based Barter Incentive Scheme in Socially Aware Networking

Socially aware networking (SAN) provides a new paradigm for intermittently connected networks which exploits social properties of mobile users to guide the design of protocols. In SAN, data forwarding performance will be degraded dramatically due to the existence of users' selfish behaviors. To address the selfishness problem, barter-based incentive scheme is a fair approach in which two encounter nodes exchange the same amount of data with one another. However, it is a challenging issue for nodes to decide when two nodes contact and how many messages they will exchange for their next contacts. We consider this problem as a resource allocation problem and propose a community-based Barter incentive scheme for SAN paradigm (Com-BIS). In this method, network nodes are grouped into communities and they allocate their forwarding services for different communities optimally using 0-1 knapsack algorithm. The simulation results show that Com-BIS stimulates selfish nodes to cooperate in data delivery for other nodes effectively which improves the forwarding performance considerably.


Introduction
Delay tolerant networks (DTNs) enable intermittent connected mobile devices to communicate via short-range networking interfaces such as Bluetooth and WiFi [1,2]. The broad utilization of mobile devices in our social life brings increasingly close connection between mobile devices and their carriers (human) [3]. Social features of mobile devices such as community, centrality, and similarity, which are more stable than mobility, have been extrapolated to improve the routing and dissemination performance in DTNs [4][5][6]. As a consequence, socially aware networking (SAN) [7] has emerged as a new paradigm to improve network protocol performance by exploiting social properties of mobile users.
Generally, due to nodes' mobility, an end-to-end path between source and destination is difficult to maintain [8]. Consequently, nodes usually follow store-carry-and-forward fashion to share data. This means that nodes have to store messages in their buffer and forward them closer and closer to their destination hop by hop. Obviously, the cooperation of nodes is the basic principle in this fashion. However, in reality, nodes usually adopt selfish behavior in order to save limited resources or protect their private information [9][10][11], which affects the forwarding performance heavily.
In DTNs, nodes have two forms of selfishness: individual selfishness and social selfishness [12]. Nodes with individual selfishness have the same degree of selfishness toward all other nodes while nodes with social selfishness prefer to provide services to others based on their social relationships. For instance, individual selfish nodes do not relay messages even for their friends, whereas social selfish nodes relay messages for those with stronger social ties (i.e., close friends) and refuse to carry messages for strangers.
In order to tackle the selfishness issue, incentive mechanism is necessary to stimulate selfish nodes to cooperate in SAN. Recent incentive mechanisms for DTNs can be classified into four categories: reputation-based, creditbased, game-theoretic, and barter-based [13]. Reputationbased strategy refers nodes' cooperation behavior as reputation and nodes with low reputation will be punished for their 2 International Journal of Distributed Sensor Networks selfishness. Credit-based strategy stimulates nodes to cooperate by awarding virtual credit for message forwarding. Gametheoretic one explores the application of Game Theory to treat selfishness. Barter-based strategy is based on bartering or Tit-For-Tat (TFT) in which two contact nodes exchange the same amount of messages.
In general, a node is willing to forward messages for nodes which can offer same amount of services to itself. From this point of view, barter-based strategy is the most fair and simplest incentive strategy. A selfish node can not get required messages when it does not relay messages for other nodes before. In order to get enough future benefit, nodes will select appropriate messages to carry for other nodes. In this way, nodes' cooperation consciousness will be stimulated. However, in reality, the routing performance will be degraded dramatically in the case that one of the two nodes has fewer messages. For instance, node encounters node and possesses some messages destined to node . These messages may not be delivered successfully due to the insufficient messages of node for exchanging. Only if the two nodes have enough and similar number of messages, the higher routing performance will be achieved.
On the other hand, the storage space of mobile node is limited. Hence, in a fixed time period, a node could only provide restricted forwarding services for several nodes due to the limited number of messages stored in space for exchange. To obtain higher performance, a node should select messages for nodes which it can contact in the future in order to increase the exchange probability. However, it is very difficult to predict when two nodes will contact and how many messages they will exchange. What's more, the number of messages exchanged directly between nodes is usually rarely less. Therefore, the routing performance of barter between nodes is not very satisfied.
In a SAN paradigm, nodes are normally grouped into different communities according to their social relationships such as family and classmates. For instance, there are communities constructed by different families. Suppose that a father in a community provides forwarding services for other person in another community. As a return, the person will give similar forwarding services for the father in future. It is reasonable that the father would like to share these services with his family members. Therefore, nodes can manage their forwarding services according to communities [14,15]. Based on the barter theory, a node gets as many services from a community as the forwarding services it provides for it.
In this paper, we propose the concept of Node-to-Community barter (Node-to-Com barter for simplicity), which considers bartering forwarding services between node and communities [16]. A node makes contribution to a community when it provides forwarding services for nodes in that community, whereas a node gets benefit from a community when it gets forwarding help from nodes in that community. A node balances the contribution and the benefit with a community. The concept of Node-to-Com barter aims at improving the message exchanging probabilities by expanding bartering range.
Following the philosophy of Node-to-Com barter, a barter incentive scheme, called Com-BIS, is presented to stimulate noncooperative nodes for data relaying in community-based SAN. Generally, forwarding services of nodes are limited in a time period. Therefore, how to allocate forwarding resource among communities is a key issue. We model the Com-BIS as a resource optimal allocation problem and obtain approximate optimal solutions using 0-1 knapsack algorithm.
The contributions of this paper are as follows.
(i) To tackle the selfishness issue, we propose the concept of Node-to-Com barter, which exchanges same amount of forwarding services between node and communities. The Node-to-Com barter is beneficial for improving the message exchange probability. (ii) We present a community-based barter incentive scheme, called Com-BIS, which is based on Nodeto-Com barter. Nodes balance their contribution and benefit among different communities. Com-BIS converts stimulation issue to resource optimal allocation problem and obtains approximate optimal solutions by use of 0- The rest of this paper is organized as follows. An overview of incentive mechanisms, especially barter-based strategies, is presented in Section 2. In Section 3, we introduce resource optimal allocation model in Com-BIS and analyze approximate optimal solution. Then, we give a description of Com-BIS in Section 4 and its implementation is outlined in Section 5. Simulation results are presented in Section 6. The paper is concluded in Section 7.

Related Work
Selfishness issue in DTNs has gained much attention recently and a lot of works have been done. The impact of selfishness on the performance of data forwarding protocols is extensively explored [17][18][19], which demonstrates that the performance is degraded seriously if a part of nodes in the network are selfish. To tackle selfishness issue, various incentive mechanisms have been proposed. An overview on state-of-the-art works on selfishness is presented in [13]. The existing incentive mechanisms can be classified into four categories: reputation-based, credit-based, game-theoretic, and barter-based.
In reputation-based incentive mechanisms, the reputation of a node indicates the belief of other nodes about the cooperation degree of it. Clearly, cooperative nodes have high value of reputation in comparison to noncooperative nodes. IRONMAN [20], for example, utilizes preexisting social network information to detect the selfish nodes. In IRONMAN, the sender of a message keeps the records of the encountered nodes and the forwarding records which contain the identifier of the message, the destination of the message, and the forwarding time. However, the performance of a reputation-based strategy is seriously affected when messages lose.
In credit-based mechanisms, a node receives a certain amount of credits as a reward if it cooperates in message relaying for others and can utilize credits later for its own benefit. Practical incentive (Pi) [21] is a hybrid single-copy protocol which stimulates nodes to cooperate in bundle forwarding using credit-based incentive as well as reputationbased incentive. Ning et al. [22] proposed a credit-based incentive scheme based on the assumptions that data fall into a range of interest types and each node may have multiple interests. Content exchange between two nodes is formulated as a two-person cooperative game and a utility function is created for every node to maximize its expected credit reward. Other well-known credit-based incentive strategies include, for example, [23,24].
Some researchers have embedded the game-theoretic techniques to stimulate selfish nodes for message relaying. For instance, Wu et al. [25] proposed a game-theoretic approach based on bargaining. This approach is motivated by the observation that message exchange in probabilistic routing is analogous to commodity exchange in markets.
Barter-based incentive mechanisms, also called pair-wise Tit-For-Tat (TFT) strategy, mean that two encounter nodes exchange the same amount of messages. Buttyán et al. [26] presented barter trade strategy to stimulate cooperation of nodes. The messages are divided into two types according to nodes' interest: primary messages and secondary messages. A message is a primary message for a given node if the node is interested in the content of message. Otherwise, the message is a secondary message for the node. When two nodes are in contact, they select and decide the number of required messages, respectively. Finally, they exchange messages with each other, where is the minimum size of the nodes' required numbers. Thus, a node must relay some number of secondary messages in order to exchange for its primary messages in the future. These barter trade is carried out between nodes. We name this barter strategy as Node-to-Node barter.
Consub [27] is an incentive-based pub/sub scheme which utilizes TFT mechanism to deal with selfish behaviors. Considering the limited storage space, it is a key optimization problem that how nodes should act with TFT mechanism to maximize their own revenues. To answer this question, Consub introduces a content utility to decide the exchange order of content. The content utility is calculated according to contact probability and cooperation level between the current node and neighbors subscribing to this content.
Barter trade strategy and Consub are all presented for data dissemination. A kind of messages may be received by many destination nodes. Therefore, the probability of message exchange between nodes may be higher. In contrast, a message only has one destination in routing scenario. It is uncommon that two encountered nodes happen to have messages destined for each other. Thus, the probability of message exchange between nodes will be degraded largely.
Further, the routing performance will be influenced when nodes do not have enough messages to exchange.
Com-BIS is designed for routing scenario with only one destination. In order to increase the message exchanging opportunities, we expand the exchanging range from Nodeto-Node barter to Node-to-Com barter, which will improve the exchanging probabilities. In addition, we also take limited storage space into consideration. Com-BIS refers forwarding services as resource and allocates them optimally among communities in order to balance nodes' contribution and benefit for each community. Recently, more and more researchers utilize social features especially the concept of community to tackle routing and data dissemination issues, as well as in selfishness area. For instance, SSAR [12] utilizes social selfishness to cope with user selfishness and provides good routing performance. Com-BIS is a social based mechanism and allocates forwarding resource according to different social relationships between nodes and communities.

Optimal Allocation Model of Com-BIS
In Com-BIS, we suppose that nodes are grouped into several communities according to some social relationship and we do not concern how the communities form. Compared to the huge number of mobile nodes, the information of communities is limited which is easier to maintain. Furthermore, we treat nodes' forwarding services (forwarding behaviors) as forwarding resource. For a given node, it has limited forwarding resource in a unit time period due to the limited buffer space. Then, how to allocate forwarding resource among different communities in a unit time interval is a key problem which influences the forwarding performance. That is a resource allocation problem.
We illustrate the resource allocation problem with an instance, as shown in Figure 1. Figure 1(a) shows that node allocates its forwarding resource among four different communities, where red circle represents node . Figures 1(b)∼1(d) illustrate three different allocation strategies, where gray rectangle represents node 's contribution (forwarding services node provided) and orange rectangle represents node 's benefit (forwarding services node received). In Figure 1(b), node adopts complete cooperation strategy and forwards for other nodes when they are needed. Figure 1(c) is the average allocation strategy which allocates the same forwarding services to different communities. Figure 1(d) adopts barter strategy in which node provides the same amount of forwarding services to a community as it gets from this community. Node usually has different relationship degrees with different communities; therefore, three allocation strategies achieve different revenues of communities.
Com-BIS barters the forwarding services between node and communities. Node forwards the same number of messages for nodes in a community as nodes in this community forward for it. Thus, nodes aim at getting maximum benefit with minimum contribution through an optimal allocation strategy. Therefore, Com-BIS can be modelled as resource optimal allocation problem as follows.
A node has forwarding resource to allocate among communities. Nodes need to pay for the forwarding services using their own forwarding resource. We introduce Con (contribution) and Ben (benefit) to represent the node's forwarding behavior. A node makes contribution to Community (denoted as Com ) when it provides forwarding services to nodes in Com , while a node gets benefit from Com when it gets forwarding services from nodes in Com .
We assume that, in a unit time interval t, node gives Con ( ) contribution to Com and gets Ben ( ) benefit from Com , where Con ( ) and Ben ( ) indicate the amount of contribution and benefit, respectively. For the all running time ( ∈ [0, × ]), the total contribution (resource) node allocates to Com is ∑ =0 Con ( ); then, the total resource node provides to all communities is ∑ =1 ∑ =0 Con ( ).
The total benefit node obtains from Com is ∑ =0 Ben ( ); then, the total benefit node obtains from all communities is ∑ =1 ∑ =0 Ben ( ).
The objective of resource optimal allocation model is to find an allocation strategy with which node can obtain maximum benefit with minimum contribution. For any node, its contribution must be no less than its benefit. Thus, the allocation strategy must satisfy Obviously, it is a optimization variant of an NPcompleteness. We convert the global optimal problem as local optimal problem; that is, in unit time interval t, allocation strategy must satisfy We can see that if node adopts selfish behavior, its contribution to any community is 0, and its benefit is 0, too. No other nodes will forward for it, and node A's routing performance may be decreased. However, if node adopts complete cooperative behavior and provides forwarding services when other nodes need at any time, the performance is also influenced due to unequal relationship degrees of different communities. Therefore, the key problem is to allocate resource appropriately. This optimization problem can be referred to as the following 0-1 knapsack problem, as where Ben ( )/Con ( ) is the ratio of benefit and contribution of node for community in a time interval , and Ben ( )/ C ( ) ∈ [0, 1]. Our objective is getting the maximum value of Ben ( )/Con ( ). Obviously, when Ben ( ) is closer to Con ( ), the value of Ben ( )/Con ( ) is bigger. When the number of forwarding resource is not very large, solving such problems is very fast from a computational standpoint [28]. Such a solution is, therefore, suitable to be implemented in resource constrained mobile devices. Additionally, node's contribution Con ( ) and benefit Ben ( ) are changed dynamically. We assume a range [minSize, maxSize] for Con ( ) − Ben ( ) and minSize > 0. Node takes a barter strategy which decides to adopt selfish or cooperation behavior according to current Con ( ) and Ben ( ). The barter strategy is as follows.
(1) minSize ≤ Con ( ) − Ben ( ) ≤ maxSize. For a community Com , if the value of Con ( ) − Ben ( ) is between minSize and maxSize, the node will continue to allocate resource to Com and forward for nodes in Com .
(2) Con ( ) − Ben ( ) > maxSize. For a community Com , if the value of Con ( )−Ben ( ) is larger than maxSize, the node's contribution to Com is far more than its benefit which represents that the node has allocated enough resource to Com . Therefore, the node does not need to allocate any resource to Com and refuses to forward for nodes in Com .
(3) Con ( ) − Ben ( ) < minSize. For a community Com , if the value of Con ( ) − Ben ( ) is lower than minSize, the node's contribution to Com is fewer, which will be punished by nodes in Com . Thus, nodes in Com will refuse to forward for this node.

Overview of Com-BIS.
In Com-BIS, nodes barter with communities for forwarding services. We suppose that nodes constitute several communities according to some social relationships. They maintain tradeoff between contribution and benefit with each community. Every node records its contribution (Con) and benefit (Ben) for communities in a unit time interval. We suppose that all nodes are honest to record the real Con and Ben. Figure 2 shows an example. Nodes and are in contact and need to decide whether to take cooperative behavior or not. Firstly, they exchange their related Con and Ben information. In Figure 2, node belongs to community 1, while node belongs to community 2. Thus, they should exchange the Con and Ben information related community 1 and 2, respectively. According to these information, two nodes make a cooperation or selfish decision.
From 's perspective, two factors affect 's decision. The first factor is 's Con and Ben related to community 2. Node can check the current Con and Ben related to community 2 in its buffer and computes the value of (Con−Ben). According to the threshold setting of [minSize, maxSize] ( [10,50] in Figure 2), can make a decision. In Figure 2, node 's Con with community 2 is 50, while Ben is 10. The value of (Con − Ben) is 40 which is lower than maxSize. Therefore, decides to cooperate for nodes in community 2 (here, node ) from first factor's aspect. The second factor is 's Con and Ben related to community 1. Node can check the 's Con and Ben related to community 1 from exchanged information and computes the value of (Con − Ben). As seen in Figure 2, the value of (Con − Ben) in is 2 which is lower than minSize. Thus, node should be punished for its selfishness. Thus, node decides to be selfish to node from second factor's aspect and then refuses to forward for it. Integrating the two factors, node can make the final decision. That is, node adopts selfish action for node in this contact. Similarly, we can analyze that node will make cooperative decision for node . In a word, a node takes cooperative action if and only if both factors decide cooperation. Figure 3 depicts the architecture and working process of Com-BIS. Com-BIS consists of five components: C&B, Node-to-Com Barter, Node-to-Node Barter, Forwarding Strategy, and C&B Update.

Architecture of Com-BIS.
C&B is a data structure which records node's contribution and benefit associated with each community in current time interval. Every community is mapped to a record with a structure of (Com ID, Con, Ben). Com ID records communities' ID. Con indicates nodes' contribution for a community. When a node provides forwarding services for nodes in one community, the corresponding community's Con is increased. Ben indicates nodes' benefit for a community. When the node gets forwarding help from other nodes in one community, the Ben of corresponding community is increased.
Both Node-to-Com Barter module and Node-to-Node Barter module are barter strategy modules which are responsible for deciding whether to adopt cooperative behavior or not. Node-to-Com Barter is responsible to barter forwarding services between node and communities. The services are treated as contribution or benefit of nodes. In addition, Com-BIS also takes message exchange between nodes into consideration, which is Node-to-Node Barter. For two contact nodes, Node-to-Node Barter exchanges same amount of messages destined to other side directly. Thus, the exchanging services under Node-to-Node Barter are fairly for two node, which will not be included in nodes' contribution and benefit.
When a node decides to cooperate to forward for others, it is Forwarding Strategy that selects appropriate messages to exchange from message list in order to improve routing efficiency. Many recent utility-based forwarding strategies can be used here. We utilize PROPHET algorithm [29] as forwarding strategy in this paper.
The C&B Update module updates and maintains the information of contribution and benefit of node in current time interval after messages are successfully forwarded.  Figure 3, the working process of Com-BIS consists of 6 steps as follows.

Workflow of Com-BIS. As shown in
(1) When two nodes contact with each other, they exchange their information firstly including node's ID, community, and C&B.
(2) Then Node-to-Node Barter works and decides the message list between the two nodes according to node's ID.
(3) Next, Node-to-Com Barter decides whether to adopt cooperative action or not. That is, whether a node forwards messages for the other side.
(4) If a node decides to adopt cooperate behavior and forward for the other side, it will form forwarding list from message list according to Forwarding Strategy.
(5) If the forwarding list is not empty, messages in forwarding list will be transmitted.
(6) Nodes update their contribution and benefit values according to their forwarding services after transmission ends.

Implementation of Com-BIS
This section describes the implementation of Com-BIS. Table 1 summarizes the notations for ease of reference.

Node-to-Node Barter Strategy.
In Com-BIS, we take barter strategy between nodes into consideration. Node-to-Node barter strategy is that two contact nodes exchange the same amount of messages directed to the other side. It will improve the successful delivery ratio when messages meet their destination nodes. For instance, node and node meet each other; node can check the number of messages directed to node B, expressed as . Similarly, node can check the number of messages destined to node A, expressed as . Then, A and can exchange at most min{ , } messages. The corresponding number of exchange messages are selected and added into the forwarding list waiting for transmission. The principle of Node-to-Node barter strategy is borrowed from [26].
Obviously, nodes exchange the same amount of forwarding services in Node-to-Node barter. This kind of forwarding behaviors do not need to be included into the contribution and benefit. To distinguish messages exchanged from Nodeto-Node barter, a property direct is assigned to message. All messages' direct is initialized as 0 when they are created. If a message is delivered to its destination through Node-to-Node Barter module, its direct is set as 1. If the message's direct is 1, the C&B Update module will exclude the message from the process.

Node-to-Com Barter
Strategy. Node-to-Com barter strategy balances contribution and benefit between node and communities. Nodes make cooperative or selfish decisions according to their current contribution and benefit associated with the community of other side.
We assume node belongs to Com and node belongs to Com . Con( , Com ) and Ben( , Com ) represent node A's contribution and benefit corresponding to Com , while Con( , Com ) and Ben( , Com ) represent node B's contribution and benefit corresponding to Com . Node and exchange Con( , Com ), Ben( , Com ) and Con( , Com ), Ben( , Com ), respectively, and make decisions according to these information. Without loss of generality, we only describe the decision process from node A's aspect, as the same process happens to . The minSize and maxSize are the thresholds and the main strategy is as follows.
(1) Con( , Com ) − Ben( , Com ) > maxSize. If the value of Con( , Com )−Ben( , Com ) is larger than maxSize, the contribution of node to Com is far larger than its benefit, which represents that the node has allocated enough resource to Com . In order to guarantee its own benefit, node will save its forwarding resource and refuse to forward for node . Thus, node will make a selfish decision.
(2) Con( , Com ) − Ben( , Com ) ≤ maxSize. If the value of Con( , Com ) − Ben( , Com ) is not larger than maxSize, node A's contribution matches with its benefit. And node is willing to continue to allocate more forwarding resource to Com . In this condition, we need to further consider node B's situation.
(a) Con( , Com ) − Ben( , Com ) < minSize. If the value of Con( , Com ) − Ben( , Com ) is lower than minSize, it represents that node has adopted more selfish behaviours to Com . Thus, nodes in Com will refuse to forward for node B, which is a punishment strategy for the selfish node. Node decides to refuse forwarding for node . Thus, node will make a selfish decision. (b) Con( , Com ) − Ben( , Com ) ≥ minSize. If the value of Con( , Com ) − Ben( , Com ) is not lower than minSize, it represents that node has adopted more cooperative behaviours to Com . Thus, it should get benefit as a return from nodes in Com , and node will make a cooperative decision to forward for node B.
Algorithm 1 illustrates the Node-to-Com barter strategy. If node decides to forward for node according to Node-to-Com barter strategy, it will select forwarding messages from 's message list by using forwarding strategy and add them to the forwarding list. Otherwise, if node refuses to forward for node , no messages will be added to the forwarding list. If the forwarding list is not empty, the messages on it will be transmitted one by one.

C&B Update.
After a message is transmitted successfully, nodes will update contribution or benefit according to nodes' behavior and messages' property. Obviously, two kinds of messages appear in forwarding list, which are identified by property direct. One kind is selected from Node-to-Com barter strategy with direct of 0, while the other kind is chosen by Node-to-Node barter strategy with direct of 1. Messages selected from Node-to-Node barter strategy will be not included in the process of C&B Update. C&B Update only involves messages chosen by Node-to-Com barter strategy.
Generally, there are three relationships between nodes and messages. That is, a node may be source node, destination node, or intermediate node for a message. We discuss the update process from four different situations according to these relationships. We suppose that node receives messages and C&B Update module is triggered. Note that, for the received messages, A should not be their source node due to the PROPHET forwarding strategy.
(1) For a message, neither node nor node is its source node or destination node. That is, both and are intermediate nodes. In this case, node forwards message for Com which implies that makes contribution to Com . Node gets forwarding help from Com which represents that gets benefit from Com . Therefore, Con( , Com ) and Ben( , Com ) will be increased, respectively.
(2) For a message, node is an intermediate node and node is its source node. The update process is similar to (1). Con( , Com ) and Ben( , Com ) will be increased, respectively.
Com . Therefore, Ben( , Com ) and Con( , Com ) will be increased, respectively. (4) For a message, node is the destination node and node is the source node. Two nodes provide services with each other. The contribution and benefit of them are counteracted. None of them will be increased.
We assign and as increment value of contribution and benefit, respectively. That is, contribution is increased by when forwarding one message for other node, whereas benefit is increased by when one message forwarded by other node. Algorithm 2 illustrates the process of C&B Update.

Evaluation
In this section, we conduct simulations to evaluate the performance of Com-BIS as compared with three other incentive mechanisms. Simulations are carried out to analyze the influence of impact factors on Com-BIS, such as history data of contribution and benefit, threshold, and message generation frequency.

Simulation Setup.
The simulations are carried out in the Opportunistic Network Environment (ONE) simulator [30] based on real trace dataset of INFOCOM2006 [31]. The dataset is collected during IEEE INFOCOM2006. Seventyeight participants are asked to keep a iMotes with them during the conference period in order to collect the opportunistic contact data and mobility statistics in experiment. Participants are specially selected who belong to four subgroups according to academic affiliations, so we divide nodes of INFOCOM2006 into four communities based on the affiliations. The simulation time is set to 14 hours which is active and continuous time period selected from the dataset.
We compare the performance of Com-BIS with three other mechanisms which are Non-Incentive, Social Selfishness, and Cooperation. All incentive mechanisms adopt PROPHET as forwarding strategy.
(i) Non-Incentive mechanism. Nodes are all selfishness which refuse to forward for any other nodes. That is, there is no incentive mechanism. (ii) Social Selfishness incentive mechanism. Nodes are social selfishness which forward for other nodes in same community and refuse to forward for outsiders.
(iii) Cooperation mechanism. Nodes are willing to forward for all the others. That is, all nodes are cooperative.
We run the simulation 30 times and calculate the average values. Table 2 summarizes the basic simulation parameters.
In each simulation, we compare the protocols based on the following four metrics.
(i) Delivery Ratio: the ratio of successfully delivered messages to the total number of unique messages created (with the redundant messages excluded) in a given period.
(ii) Overhead: the ratio of relayed messages (delivered messages excluded) and delivered messages, reflecting the ratio of message replicas propagated into the network.
(iii) Average Latency: the average time between the time a message is generated and the time it is delivered successfully (including buffering delays).
(iv) Average Hop Count: the average hop-counts when messages are received successfully. higher delivery ratio, less overhead, shorter average latency, and more average hop count.
For the delivery ratio in Figure 4(a), Com-BIS is higher than other mechanisms. For instance, at the 8th hour, the delivery ratio of Com-BIS is 84.9%, which is 2.7% higher than Cooperation (82.2), 13.9% higher than Social Selfishness (71%), and 28.9% higher than Non-Incentive (56%). In Non-Incentive, nodes deliver messages by themselves. When the source node contacts destination node, the message will be delivered successfully. It's delivery ratio is lowest. In Social Selfishness mechanism, there are parts of nodes participating in forwarding (in community). Therefore, its delivery ratio is higher than Non-Incentive mechanism. Cooperation mechanism in which all nodes are cooperative induces higher delivery ratio than Non-Incentive and Social Selfishness incentive mechanisms. However, message replications will be increased when nodes help forward for others, which causes higher overhead. Further more, the network congestion will be serious, which degrades the forwarding performance.
On the contrary, in Com-BIS, nodes do not take blind cooperation strategy, but take optimal allocation strategy according to social relationships between nodes and communities by using Node-to-Com barter strategy. Com-BIS provides effective cooperation for messages which have more successful delivery probabilities and improves resource utilization. Consequently, Com-BIS allocates the forwarding resource effectively and obtains highest delivery ratio.
For the overhead in Figure 4(b), Cooperation mechanism generates highest overhead followed by Com-BIS, Social Selfishness, and Non-Incentive mechanism. Non-Incentive mechanism does not generate any message copies and gets lowest overhead (0). For instance at the 6th hour, Com-BIS generates highest overhead (49.2), which is still 4.2 lower than Cooperation (53.4), 34.9 higher than Social Selfishness (14.3), and 49.2 higher than Non-Incentive.
For average latency Figure 4(c), Com-BIS and Cooperation are similar, and both of them are shorter than Social Selfishness and Non-Incentive. The average latency of Social Selfishness is higher than Non-Incentive.
Non-Incentive delivers the least number of messages and these few successful ones are delivered through one-hop transmission, whereas the higher message delivery ratio in Social Selfishness is implemented by multihop transmission due to part cooperation. Therefore, the average latency of Non-Incentive is shorter than Social Selfishness.
For average hop count in Figure 4(d), Com-BIS has more hop counts than other three mechanisms. At the 10th hour, the average hop count of Com-BIS is 4.3, while Cooperation, Social selfishness, and Non-Incentive are 4, 2.2, and 1, respectively. On the forwarding path, it is the Com-BIS that has the most number of intermediate nodes, which means that more nodes take cooperative behaviors to participate in message forwarding.
In a word, Com-BIS not only stimulates selfish nodes to cooperate successfully, but also allocates the forwarding resource rationally, which improves the forwarding performance effectively.

C&B Value Analysis.
In order to trace and analyze the changing of contribution and benefit value, we record the history value of ∑ =0 (Con ( ) − Ben ( )) for different communities. Figure 5 shows the value changing curves of Node 2 and Node 22. Four communities are represented as community 1∼community 4, respectively. Both of Node 2 and Node 22 belong to community 1. As we can see, two nodes have different closeness of relationships with community 1∼community 4. Node 2 has closer relationships with communities 1 and 3, while Node 22 more closely relates to communities 3 and 2. It is proved again that optimal allocation of forwarding resource is very necessary to stimulate nodes' selfish behaviors and improve forwarding performance.

Influences of Impact Factors
6.3.1. Influence of History Data. In previous simulations, we only consider node's contribution and benefit in current time interval and exclude the impact of history data. In a new time interval; the new round of balance starts and the remaining values of last time interval are ignored. To evaluate the impact of history contribution and benefit, we perform a set of simulations. The Node-to-Com barter strategy is decided by jointing history value and current value, as illustrate by (4), where is an efficient factor which decides the current values' influence. We set to 0.5, 0.7, and 1 in simulations: Con ( ) = Con cur ( ) × + Con history ( ) × (1 − ) , Ben ( ) = Ben cur ( ) × + Ben history ( ) × (1 − ) .

Influence of Message Generation Frequency.
We evaluate the impact of Com-BIS with different message generation frequencies which are 20-40 seconds, 50-70 seconds, 100-120 seconds, 180-200 seconds, and 100-200 seconds, respectively. The smaller the message generation frequency, the more messages will be generated in network. Figure 8 shows the simulation results. We have seen that the performance of Com-BIS degrades with the increasing number of messages. The reason is that huge number of messages increase the buffer replacement and decrease the time nodes carried, which decreases the delivery opportunities. For example, at the 10th hour in Figure 8

Conclusion
In this paper, we have presented a community-based barter incentive scheme for SAN paradigm (Com-BIS) which barters forwarding services between nodes and communities. A node makes contribution to a community when it provides forwarding services for nodes in this community, whereas a node obtains benefit from a community when it gets forwarding services from nodes in this community. Nodes balance their contribution and benefit with communities and allocate forwarding services optimally to communities by using 0-1 knapsack algorithm. The simulation results demonstrate that Com-BIS not only stimulates selfish nodes to cooperate in data delivery for other nodes effectively but also improves the forwarding performance considerably.
In this paper, we discuss Com-BIS in routing scenario and concentrate on the relationships between two contact nodes and messages. In future work, we will continue to examine the efficiency of Com-BIS in data dissemination scenario.

Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.