# The Social Relationship Based Adaptive Multi-Spray-and-Wait Routing Algorithm for Disruption Tolerant Network

Authors: Jianfeng Guan; Qi Chu; Ilsun You
Journal: Mobile Information Systems
 (2017)

---

## Abstract

The existing spray-based routing algorithms in DTN cannot dynamically adjust the number of message copies based on actual conditions, which results in a waste of resource and a reduction of the message delivery rate. Besides, the existing spray-based routing protocols may result in blind spots or dead end problems due to the limitation of various given metrics. Therefore, this paper proposes a social relationship based adaptive multiple spray-and-wait routing algorithm (called SRAMSW) which retransmits the message copies based on their residence times in the node via buffer management and selects forwarders based on the social relationship. By these means, the proposed algorithm can remove the plight of the message congestion in the buffer and improve the probability of replicas to reach their destinations. The simulation results under different scenarios show that the SRAMSW algorithm can improve the message delivery rate and reduce the messages’ dwell time in the cache and further improve the buffer effectively.


---

## Body

## 1. Introduction

DTN (Disruption Tolerant Network) [1] can be used in challenging environments such as wireless sensor network, wildlife tracking, military network, and space communication [2] due to its intermittent connectivity feature. However, this feature also results in long transmission delay which makes it difficult to satisfy the basic requirement of TCP/IP networks. Therefore, the traditional routing protocols, even the MANET routing protocols [3], fail to efficiently work in DTN.Different from the traditional routing which is based on the predefined end-to-end path from source to destination, DTN routing adopts a store-carry-forward manner [4] to spray messages to the destinations. Lots of DTN routing protocols were proposed in the past few years, which can be classified into message-ferry-based, opportunity-based, and prediction-based protocols according to [5]. Furthermore, Cao and Sun [6] also presented detailed taxonomy of DTN routing by investigating the related work which includes the unicast routing, multicast routing, and anycast routing. The unicast routing is divided into naive replication, utility forwarding, and hybrid methods. The naive replication includes the flooding and coding methods which replicate the message without considering candidate node selections, and then they can reduce the delivery delay but consume more buffer, bandwidth, and energy. Utility forwarding adopts gradient forwarding by introducing various updated utility metrics without additional message copies; the overhead is low but the delivery delay is large and hence it is less reliable. The hybrid method takes advantage of naive replication and utility forwarding to make tradeoffs between delivery probability and resource consumption.Among these routing protocols, spray-and-wait has been analyzed and proven as an efficient method [6]; however, it does not consider the limitations of real mobility characters such as the local mobility and social relationship. Therefore, some variants have been proposed by introducing various metrics to reduce copies and improve delivery effectiveness, which can be divided into two kinds: controlling the number of message copies and selecting suitable relay nodes. These metrics consist of mobility-related ones such as encounter frequency or history, mobility pattern, residence time, and social related metrics such as contact popularity/association, friendship, social community, social centrality, and interest similarity. However, based on a single metric may result in blind spots and dead end problems [7]. A blind spot means that it is hard for the current node to determine the next node based on the given metric, while dead end means that the message copies are stuck in a high utility node which is not delivered further.So, in this paper, we propose a social relationship based adaptive multi-spray-and-wait routing algorithm (called SRAMSW) to improve the routing performance by considering the buffer management and social relationship among nodes. The main contributions of this work are summarized as follows:(i)
We investigated the related improvement solutions of the spray-based schemes and the applications of social characters in DTN routing and analyzed their main ideas and shortcomings.(ii)
We propose a timeout detection mechanism based on the ACK message to solve the blind spot problem.(iii)
We propose a buffer management mechanism to adaptively adjust the lifetime of message copies to reduce the overload of the node.(iv)
We use the social relationship to select the next hop node to optimize the forwarding performance and to avoid the dead end problem.The rest of this paper is organized as follows. Section2 introduces the related work of spray-based routing protocols. Section 3 describes the proposed scheme in detail. Section 4 evaluates the proposed scheme and compares it with existing routing schemes. Finally, Section 5 concludes this paper.


## 2. Related Work

The spray-based method adopts the store-carry-forward paradigm to deliver data in which the node stores the messages in the buffer, carries them during the movement, and forwards them to the encountered nodes till the destination. So, the first problem that it has to solve is the number of message copies delivered to the network, and the second one is the selection of nodes to which the message will be replicated.


### 2.1. Basic Spray-Based Methods

Direct delivery (DD) [8] is the simplest method, in which messages are only forwarded to their destinations without any additional intermediate nodes forwarding. Therefore, it has the smallest overhead but a large delivery delay. In contrast to DD, Epidemic routing [9] floods messages to each encountered node that does not have messages so that messages will reach their destinations after repeated exchanges. During the exchanges, none of the nodes perform any routing decisions, and they just directly carry and forward all messages to their neighboring nodes to keep messages delivering as soon as possible to their destinations at the end. The Epidemic routing does not need to know about network topology, network status, and other information. However, lots of message copies in the network will occupy large node caches and consume more network resources and increase the network load. Therefore, Epidemic routing is not suitable for resource-constrained mobile nodes. Lots of schemes have been proposed to improve Epidemic routing including finding the best next hop via a utility function [10].PropHet [11, 12] adopts the delivery predictability metric to select the nodes that are often encountered as forwarders to reduce unnecessary message copies. However, the decision is still uncertainty for the given case in DTN since the probability routing uses the previous encountered situation of nodes to predict the prospective probability of those nodes’ encounter. MaxProp [13] schedules the packets transmission by introducing the estimation of delivery likelihood as the metric to calculate the path to the destination and deletes existing copies of delivery packets via acknowledgement, aiming to support those resource-limited nodes. RAPID [14] formulates the routing as a resource allocation problem. Multispreader routing [15] adopts the Markovian model to analyze the impact of the number of spreaders and to manage tradeoff between message delivery delay and resource consumption effectively.Another significant work is spray-and-wait (SaW) [16, 17] which absorbs the simplicity of DD and the diffusion speed of Epidemic, and it sprays a given number of copies L into the relays (the number of relays is M) and then waits until one of them reaches the destination. In fact, SaW can also be viewed as an extension of two-hop relay [8], and it can reduce the total number of message copies and network load by limiting the number of copies of each message in the network. SaW does well in message delivery rate. However, it requires a node with global high mobility scale, with no message copy delivery in the waiting phase, which causes the message copies to passively wait. For that, spray-and-focus (SaF) [18] was proposed, changing the passive waiting of SaW. Messages in spay-and-focus are continuously transmitted to the nodes with higher utility value, thereby improving the performance of the algorithm. Moreover, considering the energy of the receiving node, the transmission rate, and speed and other factors’ effect on the forwarding policy, algorithms such as R-ASW [19] and others appeared to optimize and improve the spray routing algorithm.In this kind of solution, the selections of suitableL and M have a significant impact on the routing performance. Optimum value of L depends on nodes density, their distribution, and mobility profile. Analysis of determining appropriate L for different network situations is still an open issue. Therefore, Adaptive Spraying [20] exploits the mobility pattern and encounters history to predict the number of copies disseminated. This way, each node dynamically chooses the number of copies instead of a specific number given by the source node for each node. It therefore can lower resource consumption. However, it only analyzes the performance under the epoch-based mobility model such as RWP, and it also has a similar problem during the waiting phase. Similarly, Density-based Adaptive Spray-and-Focus (DASF) [21] considers the node density to adjust the number of copies in SaW in the spray phase, and it selects an active node to get more message copies in the waiting phase. Multiperiod spraying [22] partitions the time to predefined deadline into several variable-length periods, and it first sprays a smaller number of copies than necessary to guarantee the requirement of delivery, and then it sprays some additional copies if the delivery does not finish in the given time period. To do so, it introduces a time-dependent copying scheme by considering the remaining time constraint to forward the copies. However, this scheme requires carefully choosing the allowed number of copies for the given period.To further improve its effectiveness, several schemes adopt the fuzzy-to-manage buffer. Fuzzy spray [23] adopts fuzzy logic to prioritize buffered messages based on the forwarding transmission count and message size which can be locally acquired and then selects the appropriate messages for next forwarding. However, it introduces more overhead due to the lack of limitation on the number of message copies and also does not consider the buffer management. Therefore, Adaptive Fuzzy Spray-and-Wait (AFSnW) [24] integrates the adequate buffer prioritization and random dropping policies according to the network conditions to limit the overhead. Nabhani and Bidgoli [25] proposed to adopt the number of message replicas, size, and TTL, but they did not provide a drop policy. After that, Jain et al. [26] enhanced this solution by aggregating the number of message replicas, message size, and remaining time to live to schedule the messages priorities. And they also provided an estimation method to determine the number of message replicas.Besides, some schemes integrate with other methods, such as SFMS [27], a three-phase method including a spray phase, a utility-based forwarding phase, and message forwarding with priority scheduling phase, which integrates the flooding-based and forwarding-based methods and periodically predicts the contact popularity and contact association among nodes to schedule the message forwarding. GeoSpray [28] performs routing decisions based on geographical location data and combines a hybrid approach between multiple-copy and single-copy schemes. In addition, there are some schemes considering the security enhancement such as TB-SnW [29] which is concerned with mitigating the black hole that attacks SaW by maintaining the trust levels for encountered nodes based on the message exchange history to distribute the message copies. And some schemes consider the complementary communication support, such as Select-and-Spray [30], as a complementary support network to the existing network infrastructure which can enable stationary-to-mobile transfers where destinations can be reached either directly through the infrastructure or opportunistically via other nodes. In particle, Select-and-Spray exploits space syntax concepts by interacting with the prebuilt environment in order to better guide forwarding decisions.The above researches of spray-based schemes show their importance in DTN routing. However, they have the following problems. First, they lack the subsequent processing of messages stranded in the network due to the delivery failure. Second, the initial number of message copies in the SaW or SaF is fixed and cannot adapt to dynamic network state changes. Once it is set, it cannot be changed, which may result in a low delivery rate. Furthermore, all these schemes cannot integrate their corresponding mobility models and thus fail to fully utilize the encounter probability and the topology of the network to enhance routing [31].


### 2.2. Social Relationship Methods

Aiming to solve these problems, some solutions introduce some social features. A recent research [32] shows that social-based routing can be a potential substitute of the traditional location-based routing, and the social-based routing strategy is more safe and effective since in the location-based routing it is difficult to collect location information due to the privacy issue. Therefore, some work focused on the social relationship among nodes and human mobility features [33].SimBet routing [34] adopts the betweenness centrality and similarity metrics to determine the forwarders and introduces a tunable parameter to adjust the relative importance of two metrics. Bubble Rap forwarding [35] is based on community and centrality to select forwarders, and it first bubbles the message up based on the global centrality to forward the message to the community of destination, and then it bubbles the message up based on the local centrality till the message reaches the destination. Homophily based data diffusion [36] adopts the homophily phenomenon in social networks, diffuses the most similar data items between friends, and diffuses the most different data items between strangers. Friendship-Based Routing (FBR) [37] introduces the friendship relations as the metric to improve the DTN routing performance. It uses friendship to aid delivery by introducing the social pressures metric based on the estimation from the encounter history. However, FBR does not distinguish the distribution characterization of the connection length which has an important impact on the selection of links with better quality. It does not consider the buffer management, which is vital for routing design in opportunistic networks. Therefore, NFCU (New Friendship-based routing with buffer management based on Copy Utility) [38] considers the buffer management to delete the message timely. SANE [39] is an interest-based method, which considers the notion that individuals with similar interests tend to meet more often, and proposed social-aware and stateless approaches, which adopts the interest profile similarity to realize the routing. Besides, some social features such as proximity are also adopted by WSN routing [40].In terms of mobility model, PARP [31] utilizes the features of the primate mobility to assist routing and determines the number of message copies and routing strategy based on the walking length of the mobility model. Besides, based on the observation of several real DTN traces that the user movements appear locally and they tend to form communities correlated to geographic locations, SMART [7] proposes a social- and mobile-aware routing strategy, which exploits a distributed community partitioning algorithm and introduces a decayed routing metric based on the social similarity and social centrality to decide forwarding node efficiently while avoiding the blind spot and dead end problems.These researches show that the adoption of social and mobility features can improve the routing performance. Therefore, in this paper, we propose SRAMSW routing algorithm, which adopts timeout retransmission mechanism based on ACK message, optimizes the message delivery and SaW effectively by handling the messages that were not delivered successfully to improve its message delivery rate, and reduces the messages’ residence time in the buffer by buffer management mechanism.


## 2.1. Basic Spray-Based Methods

Direct delivery (DD) [8] is the simplest method, in which messages are only forwarded to their destinations without any additional intermediate nodes forwarding. Therefore, it has the smallest overhead but a large delivery delay. In contrast to DD, Epidemic routing [9] floods messages to each encountered node that does not have messages so that messages will reach their destinations after repeated exchanges. During the exchanges, none of the nodes perform any routing decisions, and they just directly carry and forward all messages to their neighboring nodes to keep messages delivering as soon as possible to their destinations at the end. The Epidemic routing does not need to know about network topology, network status, and other information. However, lots of message copies in the network will occupy large node caches and consume more network resources and increase the network load. Therefore, Epidemic routing is not suitable for resource-constrained mobile nodes. Lots of schemes have been proposed to improve Epidemic routing including finding the best next hop via a utility function [10].PropHet [11, 12] adopts the delivery predictability metric to select the nodes that are often encountered as forwarders to reduce unnecessary message copies. However, the decision is still uncertainty for the given case in DTN since the probability routing uses the previous encountered situation of nodes to predict the prospective probability of those nodes’ encounter. MaxProp [13] schedules the packets transmission by introducing the estimation of delivery likelihood as the metric to calculate the path to the destination and deletes existing copies of delivery packets via acknowledgement, aiming to support those resource-limited nodes. RAPID [14] formulates the routing as a resource allocation problem. Multispreader routing [15] adopts the Markovian model to analyze the impact of the number of spreaders and to manage tradeoff between message delivery delay and resource consumption effectively.Another significant work is spray-and-wait (SaW) [16, 17] which absorbs the simplicity of DD and the diffusion speed of Epidemic, and it sprays a given number of copies L into the relays (the number of relays is M) and then waits until one of them reaches the destination. In fact, SaW can also be viewed as an extension of two-hop relay [8], and it can reduce the total number of message copies and network load by limiting the number of copies of each message in the network. SaW does well in message delivery rate. However, it requires a node with global high mobility scale, with no message copy delivery in the waiting phase, which causes the message copies to passively wait. For that, spray-and-focus (SaF) [18] was proposed, changing the passive waiting of SaW. Messages in spay-and-focus are continuously transmitted to the nodes with higher utility value, thereby improving the performance of the algorithm. Moreover, considering the energy of the receiving node, the transmission rate, and speed and other factors’ effect on the forwarding policy, algorithms such as R-ASW [19] and others appeared to optimize and improve the spray routing algorithm.In this kind of solution, the selections of suitableL and M have a significant impact on the routing performance. Optimum value of L depends on nodes density, their distribution, and mobility profile. Analysis of determining appropriate L for different network situations is still an open issue. Therefore, Adaptive Spraying [20] exploits the mobility pattern and encounters history to predict the number of copies disseminated. This way, each node dynamically chooses the number of copies instead of a specific number given by the source node for each node. It therefore can lower resource consumption. However, it only analyzes the performance under the epoch-based mobility model such as RWP, and it also has a similar problem during the waiting phase. Similarly, Density-based Adaptive Spray-and-Focus (DASF) [21] considers the node density to adjust the number of copies in SaW in the spray phase, and it selects an active node to get more message copies in the waiting phase. Multiperiod spraying [22] partitions the time to predefined deadline into several variable-length periods, and it first sprays a smaller number of copies than necessary to guarantee the requirement of delivery, and then it sprays some additional copies if the delivery does not finish in the given time period. To do so, it introduces a time-dependent copying scheme by considering the remaining time constraint to forward the copies. However, this scheme requires carefully choosing the allowed number of copies for the given period.To further improve its effectiveness, several schemes adopt the fuzzy-to-manage buffer. Fuzzy spray [23] adopts fuzzy logic to prioritize buffered messages based on the forwarding transmission count and message size which can be locally acquired and then selects the appropriate messages for next forwarding. However, it introduces more overhead due to the lack of limitation on the number of message copies and also does not consider the buffer management. Therefore, Adaptive Fuzzy Spray-and-Wait (AFSnW) [24] integrates the adequate buffer prioritization and random dropping policies according to the network conditions to limit the overhead. Nabhani and Bidgoli [25] proposed to adopt the number of message replicas, size, and TTL, but they did not provide a drop policy. After that, Jain et al. [26] enhanced this solution by aggregating the number of message replicas, message size, and remaining time to live to schedule the messages priorities. And they also provided an estimation method to determine the number of message replicas.Besides, some schemes integrate with other methods, such as SFMS [27], a three-phase method including a spray phase, a utility-based forwarding phase, and message forwarding with priority scheduling phase, which integrates the flooding-based and forwarding-based methods and periodically predicts the contact popularity and contact association among nodes to schedule the message forwarding. GeoSpray [28] performs routing decisions based on geographical location data and combines a hybrid approach between multiple-copy and single-copy schemes. In addition, there are some schemes considering the security enhancement such as TB-SnW [29] which is concerned with mitigating the black hole that attacks SaW by maintaining the trust levels for encountered nodes based on the message exchange history to distribute the message copies. And some schemes consider the complementary communication support, such as Select-and-Spray [30], as a complementary support network to the existing network infrastructure which can enable stationary-to-mobile transfers where destinations can be reached either directly through the infrastructure or opportunistically via other nodes. In particle, Select-and-Spray exploits space syntax concepts by interacting with the prebuilt environment in order to better guide forwarding decisions.The above researches of spray-based schemes show their importance in DTN routing. However, they have the following problems. First, they lack the subsequent processing of messages stranded in the network due to the delivery failure. Second, the initial number of message copies in the SaW or SaF is fixed and cannot adapt to dynamic network state changes. Once it is set, it cannot be changed, which may result in a low delivery rate. Furthermore, all these schemes cannot integrate their corresponding mobility models and thus fail to fully utilize the encounter probability and the topology of the network to enhance routing [31].


## 2.2. Social Relationship Methods

Aiming to solve these problems, some solutions introduce some social features. A recent research [32] shows that social-based routing can be a potential substitute of the traditional location-based routing, and the social-based routing strategy is more safe and effective since in the location-based routing it is difficult to collect location information due to the privacy issue. Therefore, some work focused on the social relationship among nodes and human mobility features [33].SimBet routing [34] adopts the betweenness centrality and similarity metrics to determine the forwarders and introduces a tunable parameter to adjust the relative importance of two metrics. Bubble Rap forwarding [35] is based on community and centrality to select forwarders, and it first bubbles the message up based on the global centrality to forward the message to the community of destination, and then it bubbles the message up based on the local centrality till the message reaches the destination. Homophily based data diffusion [36] adopts the homophily phenomenon in social networks, diffuses the most similar data items between friends, and diffuses the most different data items between strangers. Friendship-Based Routing (FBR) [37] introduces the friendship relations as the metric to improve the DTN routing performance. It uses friendship to aid delivery by introducing the social pressures metric based on the estimation from the encounter history. However, FBR does not distinguish the distribution characterization of the connection length which has an important impact on the selection of links with better quality. It does not consider the buffer management, which is vital for routing design in opportunistic networks. Therefore, NFCU (New Friendship-based routing with buffer management based on Copy Utility) [38] considers the buffer management to delete the message timely. SANE [39] is an interest-based method, which considers the notion that individuals with similar interests tend to meet more often, and proposed social-aware and stateless approaches, which adopts the interest profile similarity to realize the routing. Besides, some social features such as proximity are also adopted by WSN routing [40].In terms of mobility model, PARP [31] utilizes the features of the primate mobility to assist routing and determines the number of message copies and routing strategy based on the walking length of the mobility model. Besides, based on the observation of several real DTN traces that the user movements appear locally and they tend to form communities correlated to geographic locations, SMART [7] proposes a social- and mobile-aware routing strategy, which exploits a distributed community partitioning algorithm and introduces a decayed routing metric based on the social similarity and social centrality to decide forwarding node efficiently while avoiding the blind spot and dead end problems.These researches show that the adoption of social and mobility features can improve the routing performance. Therefore, in this paper, we propose SRAMSW routing algorithm, which adopts timeout retransmission mechanism based on ACK message, optimizes the message delivery and SaW effectively by handling the messages that were not delivered successfully to improve its message delivery rate, and reduces the messages’ residence time in the buffer by buffer management mechanism.


## 3. The Proposed Algorithm

### 3.1. Overview of SRAMSW

SRAMSW algorithm introduces the timeout retransmission mechanism by using the relay nodes that only have one message copy to perform the spraying. This way, these relay nodes can be viewed as the sources. The ACK message is introduced to confirm whether message copy is delivered successfully and each message copy has a timeout threshold to determine the retransmission. If one message copy stays in the network (in the buffer of relevant nodes) for a longer time than the threshold, it is considered to be timeout which means that this message copy neither reaches its destination node nor receives an ACK message. Once it becomes timeout, this message copy will be sprayed to the adjacent node. The adjacent node selection is based on social relationship and on comprehensively considering three positive features, that is, centrality, similarity, and friendship, to avoid unnecessary spray. This way, it can solve the dead end problem.To prevent broadcast storms caused by repeated spray, SRAMSW set a restriction of the maximum number of sprays. Besides, to reduce the useless copies, it also introduces a buffer management mechanism to handle the message copies that have been sprayed many times and the copies of the message that have been successfully delivered.


### 3.2. ACK Message

SRAMSW uses ACK message to confirm successful message deliveries. Each node maintains a list of ACK to record those successfully delivered messages. When the destination node receives a message successfully, it will add a corresponding entry to its ACK list which contains the message name (or message ID) and its creation time. After that, this ACK message information will be exchanged between two encounter nodes, and this ACK information will be combined. Every entry in the ACK list has a TTL (time to live) value, which can be calculated based on the messages’ creation time and the current time. When the TTL value is zero, the entry will be deleted from the list. This way, the ACK message will quickly spread to the network to prevent the spray and diffusion of other copies of this message. And when a message reaches its destination after a very long time or cannot reach its destination, the copies of this message will continue to spray and diffuse in the network and the number of copies increases, raising the probability that the message reaches its destination.


### 3.3. Timeout Detection

To save the buffer space, only one message copy will be delivered to relay node with a number to record the total message copies during the spray stage. The number of total message copies will reduce by one after each delivery. Once the number reduces to one, it will stay in the node until it meets the destination or is discarded.To detect the timeouts more effectively, each node maintains a red-black tree which uses the timeout of message copy as the key and uses the message ID as the value.Once a message with a number of copies of one is received, a node will use its timeout time as the key and the message ID as value and add it to the red-black tree. The node will process the redundant message through periodical polling. To be specific, a default timeout point is set to the timeout of the message in the current node which has the shortest lifespan. Then, for each time of polling, compare the current time with this default time to detect timeout messages. If there exists a timeout message, then it looks up the first key whose timeout point is less than or equal to the current time, and then all the messages stored in this node and its left subtree will be deleted due to the timeout. So, the next timeout point will happen after the timeout which is the smallest value in this tree. By this method, the timeout detection will be more effective and its maintenance cost will be reduced.


### 3.4. Buffer Management

The current DTN buffer management strategies are mainly to solve the congestion problem. They are effective in management and optimization of the node buffer when congestion occurs, not suitable for scenarios in this situation. To delete message copies, to optimize node buffer management, and to consider a smaller impact on the delivery rate after repeated spray, we propose the following buffer management rules:(1)
Delete the TTL expired message.(2)
Delete the message that has been successfully transmitted and release the buffer in time. Each node holds an ACK list that contains the information of those message that have already been delivered successfully. After the list is updated, the message in the list will be deleted from the node. And the TTL expired entries will be deleted from the ACK list as well.(3)
After the above operations, if the buffer size is still smaller than the size of the message to be received, messages in the buffer will be deleted in accordance with their spray times and residence time. The messages with larger spray times and longer residence times have a higher priority to be deleted.


### 3.5. Social Relationship Selection

SRAMSW uses the social relation to select the next potential hop, which mainly contains three positive features, that is, centrality, similarity, and friendship.


#### 3.5.1. Similarity

Similarity is calculated by the number of common neighbors between a node (the current node or the next hop node) and the destination node, and it can be calculated as follows [34]:(1)Si=Nj∩Nk,where N(j) and N(k) are the respective number of neighbors of node j and node k. Si represents the same neighbors of these two nodes. The number of intersections is obtained through reading the connections history of every possible next hop and destination node.


#### 3.5.2. Betweenness Centrality

Betweenness centrality measures the number of the shortest paths through a lot of given nodes to the destination node. However, the calculation of betweenness centrality requires the global information of the network, which is difficult to obtain in practice. Therefore, we adopt a method of calculating local betweenness centrality of the individual node [41]. Specifically, we convert the global node connection to the number of indirect connections to measure the betweenness centrality. Then, the method can be indicated by calculating the reverse of egocentric network density. The formula is shown as follows:(2)Bpi=∑j∈Ai,j≠iNi∑k∈Ai,k≠ij-11-api,pk.


#### 3.5.3. Friendship

Friendship is a description of the concept of individual intimacy level. In this work, we use it to describe the connection relationship between pairs of nodes. Generally, it can be evaluated roughly by the connection history or general interest claimed by two nodes. In this paper, we introduce the ratio of the connection of the node, which directly connects to the source and the destination nodes, to the total number of connections. According to this information, each node calculates the frequency of connections as follows:(3)Fi=Cpi,pdCpi,pk,where C(pi,pd) represents the number of connections between node i and node d and C(pi, pk) represents the number of connections between node i and all other nodes. This variable Fi considers both direct and indirect connections. When two nodes do not connect directly, the determination of indirect node connection is measured by the ACK message sent by the destination node.To utilize these social features, we define the similarity utilitySj(d) and the betweenness utility Bj(d) of node n for delivering a message to destination node d compared to node m, given by [34](4)Sjd=SjdSjd+SidBjd=BjdBjd+Bid.S B j d is given by combining the normalized relative weights of the attributes given by (5), where α and β are adjustable parameters and α+β=1. Consequently, these parameters allow the adjustment of the relative importance of the two utility values. (5)SBjd=αSjd+βBj.Besides, to use the friendship, the metric used in this work combines these features. When a node gets a message from the buffer of the current node, it sorts the next hop according to the following formula:(6)Md=K1∗SBjd+K2∗10∗Fjd,where d is the destination node while j is the source node that can establish all the nodes connected to the next hop. K1 and K2 are two adjustable parameters which satisfy K1+K2=1. Since there is a magnitude gap between Sj(d) and Fj(d) in which the former is larger than the latter, let Fj(d) be multiplied by a constant 10 in order to unify the orders of magnitude. This way, the measurements of the amount of two social features can be added together to obtain a metric value.Based on (6), we can obtain M(d) which is the descending order of nodes. The sorting result is generated as a list. The next message forwarding procedure is processed according to this list. This way, the proposed algorithm can select a better next hop. The detailed procedure is shown in Procedure 1.Procedure 1
Select the next hop Begin For each messagem in AllMessage: Ifm timeout then Get all connections and generate node list of all current connection Calculate each node’s metric value and rank them in descend Send messagem to the first N nodes in the node list Else Get all connections and generate node list of all current connection Calculate each node’s metric value and rank them in descend. Calculate similarities of destination noded with the first node j in the list and the node j with current message respectively If the similarity of nodej is higher Then transfer messagem to node j End if End if End for EndTo acquire this metric, SRAMSW collects a particular connection history by reading a new list from the original connection history which includes the message ID that the sender transfers and the ID of destination node. There are two kinds of connections.( 1 ) Direct Connection. By setting up key-value pairs, a list stores destination nodes and the number of connections. When creating the connection, statistical process is implemented corresponding to the update of the number of connections (value) of destination nodes (key) in the data table.( 2 ) Indirect Connection. When the destination node receives the message and sends ACK, it will compare the message ID of ACK and the message ID in the table. If two IDs are the same, it will add one in the indirect connection history. Otherwise, it will not count.When direct connection occurs, the next hop selection no longer uses indirect connection history but counts according to direct connection history. Our algorithm uses not only direct relations but also indirect ones in a different way than what was considered previously when calculating the friendship.


### 3.6. SRAMSW Procedure

The overall algorithm is shown in Figure1. SRAMSW makes node selections before forwarding the message to filtered nodes according to the mobile social features among nodes.Figure 1
The operation flow of SRAMSW.During the waiting period, the strategy optimizes the process on the basis of SaW by the ACK mechanism. This way, the message delivery efficiency is improved while the message residence time in a buffer is reduced.Each node has quantified expression via three social characteristics. It reads spraying node connection history and then calculates the friendship and similarity between the source node and the destination node. The value of betweenness centrality is calculated by capturing the current connection of next hop node. And these three parts have weight coefficients, respectively. And the selection of the next hop is according to the weighted sum of three judges. Overall strategy is divided into two phases: the waiting stage and the spraying stage. In the waiting period, the messages without timeout are forwarded. When a message is timeout, then it enters the spraying retransmission process.


## 3.1. Overview of SRAMSW

SRAMSW algorithm introduces the timeout retransmission mechanism by using the relay nodes that only have one message copy to perform the spraying. This way, these relay nodes can be viewed as the sources. The ACK message is introduced to confirm whether message copy is delivered successfully and each message copy has a timeout threshold to determine the retransmission. If one message copy stays in the network (in the buffer of relevant nodes) for a longer time than the threshold, it is considered to be timeout which means that this message copy neither reaches its destination node nor receives an ACK message. Once it becomes timeout, this message copy will be sprayed to the adjacent node. The adjacent node selection is based on social relationship and on comprehensively considering three positive features, that is, centrality, similarity, and friendship, to avoid unnecessary spray. This way, it can solve the dead end problem.To prevent broadcast storms caused by repeated spray, SRAMSW set a restriction of the maximum number of sprays. Besides, to reduce the useless copies, it also introduces a buffer management mechanism to handle the message copies that have been sprayed many times and the copies of the message that have been successfully delivered.


## 3.2. ACK Message

SRAMSW uses ACK message to confirm successful message deliveries. Each node maintains a list of ACK to record those successfully delivered messages. When the destination node receives a message successfully, it will add a corresponding entry to its ACK list which contains the message name (or message ID) and its creation time. After that, this ACK message information will be exchanged between two encounter nodes, and this ACK information will be combined. Every entry in the ACK list has a TTL (time to live) value, which can be calculated based on the messages’ creation time and the current time. When the TTL value is zero, the entry will be deleted from the list. This way, the ACK message will quickly spread to the network to prevent the spray and diffusion of other copies of this message. And when a message reaches its destination after a very long time or cannot reach its destination, the copies of this message will continue to spray and diffuse in the network and the number of copies increases, raising the probability that the message reaches its destination.


## 3.3. Timeout Detection

To save the buffer space, only one message copy will be delivered to relay node with a number to record the total message copies during the spray stage. The number of total message copies will reduce by one after each delivery. Once the number reduces to one, it will stay in the node until it meets the destination or is discarded.To detect the timeouts more effectively, each node maintains a red-black tree which uses the timeout of message copy as the key and uses the message ID as the value.Once a message with a number of copies of one is received, a node will use its timeout time as the key and the message ID as value and add it to the red-black tree. The node will process the redundant message through periodical polling. To be specific, a default timeout point is set to the timeout of the message in the current node which has the shortest lifespan. Then, for each time of polling, compare the current time with this default time to detect timeout messages. If there exists a timeout message, then it looks up the first key whose timeout point is less than or equal to the current time, and then all the messages stored in this node and its left subtree will be deleted due to the timeout. So, the next timeout point will happen after the timeout which is the smallest value in this tree. By this method, the timeout detection will be more effective and its maintenance cost will be reduced.


## 3.4. Buffer Management

The current DTN buffer management strategies are mainly to solve the congestion problem. They are effective in management and optimization of the node buffer when congestion occurs, not suitable for scenarios in this situation. To delete message copies, to optimize node buffer management, and to consider a smaller impact on the delivery rate after repeated spray, we propose the following buffer management rules:(1)
Delete the TTL expired message.(2)
Delete the message that has been successfully transmitted and release the buffer in time. Each node holds an ACK list that contains the information of those message that have already been delivered successfully. After the list is updated, the message in the list will be deleted from the node. And the TTL expired entries will be deleted from the ACK list as well.(3)
After the above operations, if the buffer size is still smaller than the size of the message to be received, messages in the buffer will be deleted in accordance with their spray times and residence time. The messages with larger spray times and longer residence times have a higher priority to be deleted.


## 3.5. Social Relationship Selection

SRAMSW uses the social relation to select the next potential hop, which mainly contains three positive features, that is, centrality, similarity, and friendship.


### 3.5.1. Similarity

Similarity is calculated by the number of common neighbors between a node (the current node or the next hop node) and the destination node, and it can be calculated as follows [34]:(1)Si=Nj∩Nk,where N(j) and N(k) are the respective number of neighbors of node j and node k. Si represents the same neighbors of these two nodes. The number of intersections is obtained through reading the connections history of every possible next hop and destination node.


### 3.5.2. Betweenness Centrality

Betweenness centrality measures the number of the shortest paths through a lot of given nodes to the destination node. However, the calculation of betweenness centrality requires the global information of the network, which is difficult to obtain in practice. Therefore, we adopt a method of calculating local betweenness centrality of the individual node [41]. Specifically, we convert the global node connection to the number of indirect connections to measure the betweenness centrality. Then, the method can be indicated by calculating the reverse of egocentric network density. The formula is shown as follows:(2)Bpi=∑j∈Ai,j≠iNi∑k∈Ai,k≠ij-11-api,pk.


### 3.5.3. Friendship

Friendship is a description of the concept of individual intimacy level. In this work, we use it to describe the connection relationship between pairs of nodes. Generally, it can be evaluated roughly by the connection history or general interest claimed by two nodes. In this paper, we introduce the ratio of the connection of the node, which directly connects to the source and the destination nodes, to the total number of connections. According to this information, each node calculates the frequency of connections as follows:(3)Fi=Cpi,pdCpi,pk,where C(pi,pd) represents the number of connections between node i and node d and C(pi, pk) represents the number of connections between node i and all other nodes. This variable Fi considers both direct and indirect connections. When two nodes do not connect directly, the determination of indirect node connection is measured by the ACK message sent by the destination node.To utilize these social features, we define the similarity utilitySj(d) and the betweenness utility Bj(d) of node n for delivering a message to destination node d compared to node m, given by [34](4)Sjd=SjdSjd+SidBjd=BjdBjd+Bid.S B j d is given by combining the normalized relative weights of the attributes given by (5), where α and β are adjustable parameters and α+β=1. Consequently, these parameters allow the adjustment of the relative importance of the two utility values. (5)SBjd=αSjd+βBj.Besides, to use the friendship, the metric used in this work combines these features. When a node gets a message from the buffer of the current node, it sorts the next hop according to the following formula:(6)Md=K1∗SBjd+K2∗10∗Fjd,where d is the destination node while j is the source node that can establish all the nodes connected to the next hop. K1 and K2 are two adjustable parameters which satisfy K1+K2=1. Since there is a magnitude gap between Sj(d) and Fj(d) in which the former is larger than the latter, let Fj(d) be multiplied by a constant 10 in order to unify the orders of magnitude. This way, the measurements of the amount of two social features can be added together to obtain a metric value.Based on (6), we can obtain M(d) which is the descending order of nodes. The sorting result is generated as a list. The next message forwarding procedure is processed according to this list. This way, the proposed algorithm can select a better next hop. The detailed procedure is shown in Procedure 1.Procedure 1
Select the next hop Begin For each messagem in AllMessage: Ifm timeout then Get all connections and generate node list of all current connection Calculate each node’s metric value and rank them in descend Send messagem to the first N nodes in the node list Else Get all connections and generate node list of all current connection Calculate each node’s metric value and rank them in descend. Calculate similarities of destination noded with the first node j in the list and the node j with current message respectively If the similarity of nodej is higher Then transfer messagem to node j End if End if End for EndTo acquire this metric, SRAMSW collects a particular connection history by reading a new list from the original connection history which includes the message ID that the sender transfers and the ID of destination node. There are two kinds of connections.( 1 ) Direct Connection. By setting up key-value pairs, a list stores destination nodes and the number of connections. When creating the connection, statistical process is implemented corresponding to the update of the number of connections (value) of destination nodes (key) in the data table.( 2 ) Indirect Connection. When the destination node receives the message and sends ACK, it will compare the message ID of ACK and the message ID in the table. If two IDs are the same, it will add one in the indirect connection history. Otherwise, it will not count.When direct connection occurs, the next hop selection no longer uses indirect connection history but counts according to direct connection history. Our algorithm uses not only direct relations but also indirect ones in a different way than what was considered previously when calculating the friendship.


## 3.5.1. Similarity

Similarity is calculated by the number of common neighbors between a node (the current node or the next hop node) and the destination node, and it can be calculated as follows [34]:(1)Si=Nj∩Nk,where N(j) and N(k) are the respective number of neighbors of node j and node k. Si represents the same neighbors of these two nodes. The number of intersections is obtained through reading the connections history of every possible next hop and destination node.


## 3.5.2. Betweenness Centrality

Betweenness centrality measures the number of the shortest paths through a lot of given nodes to the destination node. However, the calculation of betweenness centrality requires the global information of the network, which is difficult to obtain in practice. Therefore, we adopt a method of calculating local betweenness centrality of the individual node [41]. Specifically, we convert the global node connection to the number of indirect connections to measure the betweenness centrality. Then, the method can be indicated by calculating the reverse of egocentric network density. The formula is shown as follows:(2)Bpi=∑j∈Ai,j≠iNi∑k∈Ai,k≠ij-11-api,pk.


## 3.5.3. Friendship

Friendship is a description of the concept of individual intimacy level. In this work, we use it to describe the connection relationship between pairs of nodes. Generally, it can be evaluated roughly by the connection history or general interest claimed by two nodes. In this paper, we introduce the ratio of the connection of the node, which directly connects to the source and the destination nodes, to the total number of connections. According to this information, each node calculates the frequency of connections as follows:(3)Fi=Cpi,pdCpi,pk,where C(pi,pd) represents the number of connections between node i and node d and C(pi, pk) represents the number of connections between node i and all other nodes. This variable Fi considers both direct and indirect connections. When two nodes do not connect directly, the determination of indirect node connection is measured by the ACK message sent by the destination node.To utilize these social features, we define the similarity utilitySj(d) and the betweenness utility Bj(d) of node n for delivering a message to destination node d compared to node m, given by [34](4)Sjd=SjdSjd+SidBjd=BjdBjd+Bid.S B j d is given by combining the normalized relative weights of the attributes given by (5), where α and β are adjustable parameters and α+β=1. Consequently, these parameters allow the adjustment of the relative importance of the two utility values. (5)SBjd=αSjd+βBj.Besides, to use the friendship, the metric used in this work combines these features. When a node gets a message from the buffer of the current node, it sorts the next hop according to the following formula:(6)Md=K1∗SBjd+K2∗10∗Fjd,where d is the destination node while j is the source node that can establish all the nodes connected to the next hop. K1 and K2 are two adjustable parameters which satisfy K1+K2=1. Since there is a magnitude gap between Sj(d) and Fj(d) in which the former is larger than the latter, let Fj(d) be multiplied by a constant 10 in order to unify the orders of magnitude. This way, the measurements of the amount of two social features can be added together to obtain a metric value.Based on (6), we can obtain M(d) which is the descending order of nodes. The sorting result is generated as a list. The next message forwarding procedure is processed according to this list. This way, the proposed algorithm can select a better next hop. The detailed procedure is shown in Procedure 1.Procedure 1
Select the next hop Begin For each messagem in AllMessage: Ifm timeout then Get all connections and generate node list of all current connection Calculate each node’s metric value and rank them in descend Send messagem to the first N nodes in the node list Else Get all connections and generate node list of all current connection Calculate each node’s metric value and rank them in descend. Calculate similarities of destination noded with the first node j in the list and the node j with current message respectively If the similarity of nodej is higher Then transfer messagem to node j End if End if End for EndTo acquire this metric, SRAMSW collects a particular connection history by reading a new list from the original connection history which includes the message ID that the sender transfers and the ID of destination node. There are two kinds of connections.( 1 ) Direct Connection. By setting up key-value pairs, a list stores destination nodes and the number of connections. When creating the connection, statistical process is implemented corresponding to the update of the number of connections (value) of destination nodes (key) in the data table.( 2 ) Indirect Connection. When the destination node receives the message and sends ACK, it will compare the message ID of ACK and the message ID in the table. If two IDs are the same, it will add one in the indirect connection history. Otherwise, it will not count.When direct connection occurs, the next hop selection no longer uses indirect connection history but counts according to direct connection history. Our algorithm uses not only direct relations but also indirect ones in a different way than what was considered previously when calculating the friendship.


## 3.6. SRAMSW Procedure

The overall algorithm is shown in Figure1. SRAMSW makes node selections before forwarding the message to filtered nodes according to the mobile social features among nodes.Figure 1
The operation flow of SRAMSW.During the waiting period, the strategy optimizes the process on the basis of SaW by the ACK mechanism. This way, the message delivery efficiency is improved while the message residence time in a buffer is reduced.Each node has quantified expression via three social characteristics. It reads spraying node connection history and then calculates the friendship and similarity between the source node and the destination node. The value of betweenness centrality is calculated by capturing the current connection of next hop node. And these three parts have weight coefficients, respectively. And the selection of the next hop is according to the weighted sum of three judges. Overall strategy is divided into two phases: the waiting stage and the spraying stage. In the waiting period, the messages without timeout are forwarded. When a message is timeout, then it enters the spraying retransmission process.


## 4. Simulation and Result Analysis

### 4.1. Performance Metrics

We adopted the following metrics to evaluate the performance of the proposed algorithm and compare it with other solutions.


#### 4.1.1. Message Successful Transmission Rate

Message successful transmission rate is the number of messages submitted to the destination node successfully over the total number of generated messages. The larger the rate is, the better the performance is.


#### 4.1.2. The Network Overhead

Network overhead rate = (relayed packet in the network − successfully submitted packets)/successfully submitted packets. If the number of successfully submitted packets is larger while the unsuccessfully transmitted packets number is small, the network overhead rate will be small. On the contrary, the overhead rate is large. The indicator is the reflection of the efficiency of the network.


#### 4.1.3. The Hops Number of Successful Transmission

The hops number of successful transmission is the total hops of successfully delivered messages. It represents the process of a copy of a message transferred successfully from a source node to a destination node which can be used to reflect the efficiency of message transmission in the network and communication overhead.


#### 4.1.4. The Average Successful Packet Delivery Delay

The average transmission delay is the sum of all successful delivery data packets from the source to the destination over the total number of data packets from the source. It reflects the real-time response of the overall network and traffic conditions on the network to some extent. The latency is lower when the performance is better.


#### 4.1.5. The Average Time of Packets Keeping in Buffer

The average time of packets keeping in buffer is the residence time of all packets in the buffer over the total number of the packets. It reflects the overall forwarding performance of the network and the resource consumption of nodes. For example, if the residence time of message keeping in buffer is short, the buffer will be able to provide more services to other messages that require temporary cache.


### 4.2. Simulation Setup

We chose the opportunity network environment based simulator ONE to evaluate the performance of SRAMSW algorithm. In our simulation, we adopted two different mobility models, named Shortest Path Map Based mobility model and SLAW (Self-similar Least Action Walk), which could emulate the human mobility. Three solutions were also implemented for comparison. The node’s network card was Bluetooth with 2 Mbps transmission speed. The message’s TTL (time to live) was 300 minutes. The detailed configuration parameters are shown in Table1, and the other parameters were default.Table 1
Simulation scenario parameters.
Protocol Epidemic router PropHet router SFSAW router Spray-and-wait router  Movement Shortest Path Map Based SLAW  Event generator Total simulation time 18000 s Interval 35 s~45 s Message size 256 K~512 K Source/destination 0~count of nodesWe simulated these solutions under different scenarios and compared their performances. There were three experiments in total. When time was the variable, two contrast experiments were accomplished according to different movement models: one used SLAW model and the other one used Shortest Path Map Based model. In these two experiments, all settings were the same except for the movement models.


### 4.3. Parameters Optimization

The adjustable parametersK1 and α are important for the next hop selection. Since K1+K2=1, α+β=1, setting one of them can be obtained by subtracting the value of the other parameter from one. Let K1 take 0.1,0.2,0.3,…,0.8,0.9 and let α take 0.9,0.8,07,…,0.2,0.1. Combine them two by two through all situations. Other related configurations are shown in Table 2.Table 2
Configuration in parameter optimization.
Item Value Buffer size 3 M Node number 100 Routing SRAMSW Movement model Shortest Path Map Based SLAW Simulation time 21600 (Shortest Path Map Based) 10800 (SLAW)We performed 81 simulations and got 81 results. We used MATLAB to fit curve and found out the optimization parameters as shown in Table3.Table 3
Optimization parameters setting.
Metrics K 1 = 0.7788, α=0.2939 K 1 = 0 . 6980, α=0.4960 Delivery probability 0.8024 0.8017 Overhead ratio 40.4462 40.4371 Average latency 2132.9446 2132.9446 Average hop counts 3.6339 3.6339 Average buffer time 618.7853 618.7392From Table3, network overhead is relatively small when K1=0.7, α=0.5. And average buffer time in this situation is also relatively small. Thus, K1=0.7, α=0.5 is an optimal result of parameters.


### 4.4. Simulation Result and Analysis

Performance comparison was analyzed by those experiments which was given among SRAMSW, Epidemic, Spray-and-Wait (SaW), and PropHet routing algorithms. The simulation variable was time length and two movement models were used to compare the strategies’ utility. There were twenty cases including 0.5 hours, 1 hour,1.5hours,…,9hours, 9.5 hours, and 10 hours, respectively. And the simulation in time variable with a half-hour interval was repeated in both Shortest Path Map Based mobility model and SLAW mobility model.


#### 4.4.1. Message Successful Transmission Rate

Figure2 shows the simulation results. We can get that, in Shortest Path Map Based model, SRAMSW algorithm has remarkable improvement in the average successful transmission rate compared to Epidemic, SaW, and PropHet routing algorithms. Epidemic and PropHet have high successful transmission rates at the beginning; however, they reduce during the simulation procedure, because Epidemic routing uses the flooding algorithm in the whole process while SRAMSW algorithm uses the selective replication; both of them have the property called “quick start.” SRAMSW shows better delivery performance than Epidemic routing in less than one hour. The reason is that SRAMSW algorithm always selects the optimal node to spray or copy messages rather than copying with blindness. Moreover, this algorithm also uses a certain mechanism to delete messages in order to manage nodes resources more effectively. It can be seen from Figure 2(a) that SaW also has a relative high successful transmission rate. However, since SaW also has blindness during spraying node selections, the delivery probability of SRAMSW is still higher than the one of SaW.Figure 2
Successful delivery rate.
(a) (b)From Figure2(b), SRAWSW and SaW are more adaptable to movement models with mobile social characteristics like SLAW. Their delivery rates are very high in SLAW model while the other two routing algorithms have quite low delivery rates. This performance is mainly caused by the strategy itself lacking mobile social characteristics. Therefore, they cannot be used to perform simulation under SLAW model.


#### 4.4.2. The Network Overhead

As shown in Figure3(a), in Shortest Path Map Based model, the overhead of SRAMSW algorithm is significantly smaller than the ones in Epidemic and PropHet but is larger than the one of SaW. This is because SRAMSW has the buffer management mechanism which deletes the successfully delivered messages immediately with the diffusion of ACK. To be specific, when a message has been successfully transferred to the destination node, nodes that still carry this message will immediately delete it correspondingly after receiving the ACK. This better buffer management avoids duplicated transmission of successful delivery message. However, the mechanism also makes the quantity of successful delivery messages become relatively small. Therefore, in SRAMSW, the ratio of unsuccessfully and successfully delivered messages is higher. In SaW, after a message has been successfully delivered, the destination node does not send ACK and corresponding nodes do not remove duplicate messages neither. This results in a larger quantity of successful transmission which leads to relatively small overhead.Figure 3
Network overload.
(a) (b)Since SRAMSW algorithm uses selective replication and package deletion mechanisms to avoid blind flooding of packets, the number of copies of messages does not continue growing, unlike what would happen in Epidemic algorithm. Thus, SRAMSW algorithm reduces network overhead to a great extent compared to Epidemic. Due to the strong randomness of PropHet routing algorithm, its delivery rate is quite low so that the overhead is accordingly high.The same results can be obtained from Figure3(b) in SLAW model. Furthermore, under this relatively more realistic model, the overhead ratio of SRAMSW is even lower. The extremely high level of overhead of Epidemic and PropHet reflects the notion that when those two protocols are used to perform simulation in a more realistic scenario, there will be a lot of problems, such as overhead, delivery rate, and more hops. Hence, they lack practicality.


#### 4.4.3. The Hops Number of Successful Transmission

Figure4 shows the hops number of successful transmission. From Figure 4(a), the numbers of hops from the source node to the destination node in each algorithm perform similarly to each other except for Epidemic algorithm. The reason for the little difference at the beginning of simulation is caused mainly by a short time period. Within a short time period, messages can only be sent to the nodes close to source node. Thus, the overall statistics result of message hop count is little. Epidemic algorithm uses flooding algorithm in the whole process, so the process of messages transmitted to the destination node does not have directivity. While time increases, the average number of messages successfully delivered hops will increase and, after a period of time, it tends towards stability. SaW has blindness in spraying phase. At a certain time in the network, the number of nodes carrying the same messages is large due to spraying mechanisms, so it is easy to cover the best relay nodes to achieve successful delivery. Therefore, the hop counts of SaW strategy are stable in the entire simulation. SRAMSW accomplishes improvements for SaW, which does not spray in every node. The algorithm proceeds with single-node transmission when the message is not timeout. Thus, compared to SaW, SRAMSW increases the number of hops to some extent.Figure 4
The hops number of successful transmission.
(a) (b)The same results can be gained from Figure4(b) in SLAW model. Moreover, the number of average hops is more stable in this model.


#### 4.4.4. The Average Successful Packet Delivery Delay

As shown in Figure5(a), in the Shortest Path Map Based model, the average transmission delay (average latency) represents an average of the delay of all messages that are delivered successfully. Since the average hop counts of successful transmission are larger in SRAMSW than the one in SaW and transmission speed is relatively fixed in advanced settings, the average latency of message transmitted to the destination nodes successfully increases.Figure 5
The average delivery delay.
(a) (b)From Figure5(b), in SLAW model which has realistic social features, since the speed is not defined in the same interval, the number of hops no longer directly affects the transmission delay. Although SRAMSW has more hops than SaW, SRAMSW is more adaptable to SLAW since it can reflect mobile social features in DTN better. SRAMSW is able to choose optimal next hop more accurately. Therefore, the time of message successfully sent to the destination node is shorter.


#### 4.4.5. The Average Time of Packet Keeping in Buffer

Figure6 shows the average time of the message staying in the buffer which reflects the overall forwarding performance of the network and the resource consumption of nodes. As shown in Figure 6(a), the average buffer time of SRAMSW is much lower than SaW. This is because the SRAMSW algorithm uses the buffer management mechanism that removes successfully transmitted messages in time. This mechanism significantly improves the efficiency of the buffer resource usage of the node. The average time of messages staying in buffer is shorter in Epidemic algorithm because the numbers of copies of messages increase rapidly with flooding and a lot of messages are dropped by insufficient buffer resources. Therefore, Epidemic algorithm’s average buffer time is shorter. SaW algorithm does not have either message selection or any buffer management mechanism, so its average buffer time is the longest among those four algorithms.Figure 6
The average buffer time.
(a) (b)The same results can be obtained from SLAW model as shown in Figure6(b).In conclusion, the entire performance of SRAMSW is relatively the best one among those four schemes under SLAW movement model and is also more adaptable to movement models with mobile social features.


## 4.1. Performance Metrics

We adopted the following metrics to evaluate the performance of the proposed algorithm and compare it with other solutions.


### 4.1.1. Message Successful Transmission Rate

Message successful transmission rate is the number of messages submitted to the destination node successfully over the total number of generated messages. The larger the rate is, the better the performance is.


### 4.1.2. The Network Overhead

Network overhead rate = (relayed packet in the network − successfully submitted packets)/successfully submitted packets. If the number of successfully submitted packets is larger while the unsuccessfully transmitted packets number is small, the network overhead rate will be small. On the contrary, the overhead rate is large. The indicator is the reflection of the efficiency of the network.


### 4.1.3. The Hops Number of Successful Transmission

The hops number of successful transmission is the total hops of successfully delivered messages. It represents the process of a copy of a message transferred successfully from a source node to a destination node which can be used to reflect the efficiency of message transmission in the network and communication overhead.


### 4.1.4. The Average Successful Packet Delivery Delay

The average transmission delay is the sum of all successful delivery data packets from the source to the destination over the total number of data packets from the source. It reflects the real-time response of the overall network and traffic conditions on the network to some extent. The latency is lower when the performance is better.


### 4.1.5. The Average Time of Packets Keeping in Buffer

The average time of packets keeping in buffer is the residence time of all packets in the buffer over the total number of the packets. It reflects the overall forwarding performance of the network and the resource consumption of nodes. For example, if the residence time of message keeping in buffer is short, the buffer will be able to provide more services to other messages that require temporary cache.


## 4.1.1. Message Successful Transmission Rate

Message successful transmission rate is the number of messages submitted to the destination node successfully over the total number of generated messages. The larger the rate is, the better the performance is.


## 4.1.2. The Network Overhead

Network overhead rate = (relayed packet in the network − successfully submitted packets)/successfully submitted packets. If the number of successfully submitted packets is larger while the unsuccessfully transmitted packets number is small, the network overhead rate will be small. On the contrary, the overhead rate is large. The indicator is the reflection of the efficiency of the network.


## 4.1.3. The Hops Number of Successful Transmission

The hops number of successful transmission is the total hops of successfully delivered messages. It represents the process of a copy of a message transferred successfully from a source node to a destination node which can be used to reflect the efficiency of message transmission in the network and communication overhead.


## 4.1.4. The Average Successful Packet Delivery Delay

The average transmission delay is the sum of all successful delivery data packets from the source to the destination over the total number of data packets from the source. It reflects the real-time response of the overall network and traffic conditions on the network to some extent. The latency is lower when the performance is better.


## 4.1.5. The Average Time of Packets Keeping in Buffer

The average time of packets keeping in buffer is the residence time of all packets in the buffer over the total number of the packets. It reflects the overall forwarding performance of the network and the resource consumption of nodes. For example, if the residence time of message keeping in buffer is short, the buffer will be able to provide more services to other messages that require temporary cache.


## 4.2. Simulation Setup

We chose the opportunity network environment based simulator ONE to evaluate the performance of SRAMSW algorithm. In our simulation, we adopted two different mobility models, named Shortest Path Map Based mobility model and SLAW (Self-similar Least Action Walk), which could emulate the human mobility. Three solutions were also implemented for comparison. The node’s network card was Bluetooth with 2 Mbps transmission speed. The message’s TTL (time to live) was 300 minutes. The detailed configuration parameters are shown in Table1, and the other parameters were default.Table 1
Simulation scenario parameters.
Protocol Epidemic router PropHet router SFSAW router Spray-and-wait router  Movement Shortest Path Map Based SLAW  Event generator Total simulation time 18000 s Interval 35 s~45 s Message size 256 K~512 K Source/destination 0~count of nodesWe simulated these solutions under different scenarios and compared their performances. There were three experiments in total. When time was the variable, two contrast experiments were accomplished according to different movement models: one used SLAW model and the other one used Shortest Path Map Based model. In these two experiments, all settings were the same except for the movement models.


## 4.3. Parameters Optimization

The adjustable parametersK1 and α are important for the next hop selection. Since K1+K2=1, α+β=1, setting one of them can be obtained by subtracting the value of the other parameter from one. Let K1 take 0.1,0.2,0.3,…,0.8,0.9 and let α take 0.9,0.8,07,…,0.2,0.1. Combine them two by two through all situations. Other related configurations are shown in Table 2.Table 2
Configuration in parameter optimization.
Item Value Buffer size 3 M Node number 100 Routing SRAMSW Movement model Shortest Path Map Based SLAW Simulation time 21600 (Shortest Path Map Based) 10800 (SLAW)We performed 81 simulations and got 81 results. We used MATLAB to fit curve and found out the optimization parameters as shown in Table3.Table 3
Optimization parameters setting.
Metrics K 1 = 0.7788, α=0.2939 K 1 = 0 . 6980, α=0.4960 Delivery probability 0.8024 0.8017 Overhead ratio 40.4462 40.4371 Average latency 2132.9446 2132.9446 Average hop counts 3.6339 3.6339 Average buffer time 618.7853 618.7392From Table3, network overhead is relatively small when K1=0.7, α=0.5. And average buffer time in this situation is also relatively small. Thus, K1=0.7, α=0.5 is an optimal result of parameters.


## 4.4. Simulation Result and Analysis

Performance comparison was analyzed by those experiments which was given among SRAMSW, Epidemic, Spray-and-Wait (SaW), and PropHet routing algorithms. The simulation variable was time length and two movement models were used to compare the strategies’ utility. There were twenty cases including 0.5 hours, 1 hour,1.5hours,…,9hours, 9.5 hours, and 10 hours, respectively. And the simulation in time variable with a half-hour interval was repeated in both Shortest Path Map Based mobility model and SLAW mobility model.


### 4.4.1. Message Successful Transmission Rate

Figure2 shows the simulation results. We can get that, in Shortest Path Map Based model, SRAMSW algorithm has remarkable improvement in the average successful transmission rate compared to Epidemic, SaW, and PropHet routing algorithms. Epidemic and PropHet have high successful transmission rates at the beginning; however, they reduce during the simulation procedure, because Epidemic routing uses the flooding algorithm in the whole process while SRAMSW algorithm uses the selective replication; both of them have the property called “quick start.” SRAMSW shows better delivery performance than Epidemic routing in less than one hour. The reason is that SRAMSW algorithm always selects the optimal node to spray or copy messages rather than copying with blindness. Moreover, this algorithm also uses a certain mechanism to delete messages in order to manage nodes resources more effectively. It can be seen from Figure 2(a) that SaW also has a relative high successful transmission rate. However, since SaW also has blindness during spraying node selections, the delivery probability of SRAMSW is still higher than the one of SaW.Figure 2
Successful delivery rate.
(a) (b)From Figure2(b), SRAWSW and SaW are more adaptable to movement models with mobile social characteristics like SLAW. Their delivery rates are very high in SLAW model while the other two routing algorithms have quite low delivery rates. This performance is mainly caused by the strategy itself lacking mobile social characteristics. Therefore, they cannot be used to perform simulation under SLAW model.


### 4.4.2. The Network Overhead

As shown in Figure3(a), in Shortest Path Map Based model, the overhead of SRAMSW algorithm is significantly smaller than the ones in Epidemic and PropHet but is larger than the one of SaW. This is because SRAMSW has the buffer management mechanism which deletes the successfully delivered messages immediately with the diffusion of ACK. To be specific, when a message has been successfully transferred to the destination node, nodes that still carry this message will immediately delete it correspondingly after receiving the ACK. This better buffer management avoids duplicated transmission of successful delivery message. However, the mechanism also makes the quantity of successful delivery messages become relatively small. Therefore, in SRAMSW, the ratio of unsuccessfully and successfully delivered messages is higher. In SaW, after a message has been successfully delivered, the destination node does not send ACK and corresponding nodes do not remove duplicate messages neither. This results in a larger quantity of successful transmission which leads to relatively small overhead.Figure 3
Network overload.
(a) (b)Since SRAMSW algorithm uses selective replication and package deletion mechanisms to avoid blind flooding of packets, the number of copies of messages does not continue growing, unlike what would happen in Epidemic algorithm. Thus, SRAMSW algorithm reduces network overhead to a great extent compared to Epidemic. Due to the strong randomness of PropHet routing algorithm, its delivery rate is quite low so that the overhead is accordingly high.The same results can be obtained from Figure3(b) in SLAW model. Furthermore, under this relatively more realistic model, the overhead ratio of SRAMSW is even lower. The extremely high level of overhead of Epidemic and PropHet reflects the notion that when those two protocols are used to perform simulation in a more realistic scenario, there will be a lot of problems, such as overhead, delivery rate, and more hops. Hence, they lack practicality.


### 4.4.3. The Hops Number of Successful Transmission

Figure4 shows the hops number of successful transmission. From Figure 4(a), the numbers of hops from the source node to the destination node in each algorithm perform similarly to each other except for Epidemic algorithm. The reason for the little difference at the beginning of simulation is caused mainly by a short time period. Within a short time period, messages can only be sent to the nodes close to source node. Thus, the overall statistics result of message hop count is little. Epidemic algorithm uses flooding algorithm in the whole process, so the process of messages transmitted to the destination node does not have directivity. While time increases, the average number of messages successfully delivered hops will increase and, after a period of time, it tends towards stability. SaW has blindness in spraying phase. At a certain time in the network, the number of nodes carrying the same messages is large due to spraying mechanisms, so it is easy to cover the best relay nodes to achieve successful delivery. Therefore, the hop counts of SaW strategy are stable in the entire simulation. SRAMSW accomplishes improvements for SaW, which does not spray in every node. The algorithm proceeds with single-node transmission when the message is not timeout. Thus, compared to SaW, SRAMSW increases the number of hops to some extent.Figure 4
The hops number of successful transmission.
(a) (b)The same results can be gained from Figure4(b) in SLAW model. Moreover, the number of average hops is more stable in this model.


### 4.4.4. The Average Successful Packet Delivery Delay

As shown in Figure5(a), in the Shortest Path Map Based model, the average transmission delay (average latency) represents an average of the delay of all messages that are delivered successfully. Since the average hop counts of successful transmission are larger in SRAMSW than the one in SaW and transmission speed is relatively fixed in advanced settings, the average latency of message transmitted to the destination nodes successfully increases.Figure 5
The average delivery delay.
(a) (b)From Figure5(b), in SLAW model which has realistic social features, since the speed is not defined in the same interval, the number of hops no longer directly affects the transmission delay. Although SRAMSW has more hops than SaW, SRAMSW is more adaptable to SLAW since it can reflect mobile social features in DTN better. SRAMSW is able to choose optimal next hop more accurately. Therefore, the time of message successfully sent to the destination node is shorter.


### 4.4.5. The Average Time of Packet Keeping in Buffer

Figure6 shows the average time of the message staying in the buffer which reflects the overall forwarding performance of the network and the resource consumption of nodes. As shown in Figure 6(a), the average buffer time of SRAMSW is much lower than SaW. This is because the SRAMSW algorithm uses the buffer management mechanism that removes successfully transmitted messages in time. This mechanism significantly improves the efficiency of the buffer resource usage of the node. The average time of messages staying in buffer is shorter in Epidemic algorithm because the numbers of copies of messages increase rapidly with flooding and a lot of messages are dropped by insufficient buffer resources. Therefore, Epidemic algorithm’s average buffer time is shorter. SaW algorithm does not have either message selection or any buffer management mechanism, so its average buffer time is the longest among those four algorithms.Figure 6
The average buffer time.
(a) (b)The same results can be obtained from SLAW model as shown in Figure6(b).In conclusion, the entire performance of SRAMSW is relatively the best one among those four schemes under SLAW movement model and is also more adaptable to movement models with mobile social features.


## 4.4.1. Message Successful Transmission Rate

Figure2 shows the simulation results. We can get that, in Shortest Path Map Based model, SRAMSW algorithm has remarkable improvement in the average successful transmission rate compared to Epidemic, SaW, and PropHet routing algorithms. Epidemic and PropHet have high successful transmission rates at the beginning; however, they reduce during the simulation procedure, because Epidemic routing uses the flooding algorithm in the whole process while SRAMSW algorithm uses the selective replication; both of them have the property called “quick start.” SRAMSW shows better delivery performance than Epidemic routing in less than one hour. The reason is that SRAMSW algorithm always selects the optimal node to spray or copy messages rather than copying with blindness. Moreover, this algorithm also uses a certain mechanism to delete messages in order to manage nodes resources more effectively. It can be seen from Figure 2(a) that SaW also has a relative high successful transmission rate. However, since SaW also has blindness during spraying node selections, the delivery probability of SRAMSW is still higher than the one of SaW.Figure 2
Successful delivery rate.
(a) (b)From Figure2(b), SRAWSW and SaW are more adaptable to movement models with mobile social characteristics like SLAW. Their delivery rates are very high in SLAW model while the other two routing algorithms have quite low delivery rates. This performance is mainly caused by the strategy itself lacking mobile social characteristics. Therefore, they cannot be used to perform simulation under SLAW model.


## 4.4.2. The Network Overhead

As shown in Figure3(a), in Shortest Path Map Based model, the overhead of SRAMSW algorithm is significantly smaller than the ones in Epidemic and PropHet but is larger than the one of SaW. This is because SRAMSW has the buffer management mechanism which deletes the successfully delivered messages immediately with the diffusion of ACK. To be specific, when a message has been successfully transferred to the destination node, nodes that still carry this message will immediately delete it correspondingly after receiving the ACK. This better buffer management avoids duplicated transmission of successful delivery message. However, the mechanism also makes the quantity of successful delivery messages become relatively small. Therefore, in SRAMSW, the ratio of unsuccessfully and successfully delivered messages is higher. In SaW, after a message has been successfully delivered, the destination node does not send ACK and corresponding nodes do not remove duplicate messages neither. This results in a larger quantity of successful transmission which leads to relatively small overhead.Figure 3
Network overload.
(a) (b)Since SRAMSW algorithm uses selective replication and package deletion mechanisms to avoid blind flooding of packets, the number of copies of messages does not continue growing, unlike what would happen in Epidemic algorithm. Thus, SRAMSW algorithm reduces network overhead to a great extent compared to Epidemic. Due to the strong randomness of PropHet routing algorithm, its delivery rate is quite low so that the overhead is accordingly high.The same results can be obtained from Figure3(b) in SLAW model. Furthermore, under this relatively more realistic model, the overhead ratio of SRAMSW is even lower. The extremely high level of overhead of Epidemic and PropHet reflects the notion that when those two protocols are used to perform simulation in a more realistic scenario, there will be a lot of problems, such as overhead, delivery rate, and more hops. Hence, they lack practicality.


## 4.4.3. The Hops Number of Successful Transmission

Figure4 shows the hops number of successful transmission. From Figure 4(a), the numbers of hops from the source node to the destination node in each algorithm perform similarly to each other except for Epidemic algorithm. The reason for the little difference at the beginning of simulation is caused mainly by a short time period. Within a short time period, messages can only be sent to the nodes close to source node. Thus, the overall statistics result of message hop count is little. Epidemic algorithm uses flooding algorithm in the whole process, so the process of messages transmitted to the destination node does not have directivity. While time increases, the average number of messages successfully delivered hops will increase and, after a period of time, it tends towards stability. SaW has blindness in spraying phase. At a certain time in the network, the number of nodes carrying the same messages is large due to spraying mechanisms, so it is easy to cover the best relay nodes to achieve successful delivery. Therefore, the hop counts of SaW strategy are stable in the entire simulation. SRAMSW accomplishes improvements for SaW, which does not spray in every node. The algorithm proceeds with single-node transmission when the message is not timeout. Thus, compared to SaW, SRAMSW increases the number of hops to some extent.Figure 4
The hops number of successful transmission.
(a) (b)The same results can be gained from Figure4(b) in SLAW model. Moreover, the number of average hops is more stable in this model.


## 4.4.4. The Average Successful Packet Delivery Delay

As shown in Figure5(a), in the Shortest Path Map Based model, the average transmission delay (average latency) represents an average of the delay of all messages that are delivered successfully. Since the average hop counts of successful transmission are larger in SRAMSW than the one in SaW and transmission speed is relatively fixed in advanced settings, the average latency of message transmitted to the destination nodes successfully increases.Figure 5
The average delivery delay.
(a) (b)From Figure5(b), in SLAW model which has realistic social features, since the speed is not defined in the same interval, the number of hops no longer directly affects the transmission delay. Although SRAMSW has more hops than SaW, SRAMSW is more adaptable to SLAW since it can reflect mobile social features in DTN better. SRAMSW is able to choose optimal next hop more accurately. Therefore, the time of message successfully sent to the destination node is shorter.


## 4.4.5. The Average Time of Packet Keeping in Buffer

Figure6 shows the average time of the message staying in the buffer which reflects the overall forwarding performance of the network and the resource consumption of nodes. As shown in Figure 6(a), the average buffer time of SRAMSW is much lower than SaW. This is because the SRAMSW algorithm uses the buffer management mechanism that removes successfully transmitted messages in time. This mechanism significantly improves the efficiency of the buffer resource usage of the node. The average time of messages staying in buffer is shorter in Epidemic algorithm because the numbers of copies of messages increase rapidly with flooding and a lot of messages are dropped by insufficient buffer resources. Therefore, Epidemic algorithm’s average buffer time is shorter. SaW algorithm does not have either message selection or any buffer management mechanism, so its average buffer time is the longest among those four algorithms.Figure 6
The average buffer time.
(a) (b)The same results can be obtained from SLAW model as shown in Figure6(b).In conclusion, the entire performance of SRAMSW is relatively the best one among those four schemes under SLAW movement model and is also more adaptable to movement models with mobile social features.


## 5. Conclusion

DTN’s characteristics result in the dynamical change of the network topology. Traditional routing protocols are no longer used. Flood-based routing strategy has been widely researched to increase the probability of successful message delivery in DTN. In this paper, we propose a spray-based routing algorithm by combining feedback information and retransmission timeout and introducing buffer management mechanism and social features. More particularly, the SRAMSW sets up a timeout detection mechanism based on ACK messages to solve the blind spot problem and proposes buffer management to reduce the overload by adaptively adjusting the message copies’ lifetimes; and more importantly it selects the next hop node based on the social relationship to optimize the forwarding performance and avoid the dead end problem. By comparison with some other classic routing algorithms, we can see that this algorithm can improve the message delivery rate, reduce the network overhead, and decrease the buffer time. It can be seen from the simulation results that the algorithm performs much better than the traditional spray routing algorithm and the Epidemic routing algorithm on message delivery rate.



---

*Source: 1819495-2017-01-12.xml*