1 Introduction

The P2P networks have attracted many people due to increase in the Internet applications. These networks give freedom to people share their files without assistance of a central server. There are two categories of P2P networks: centralized and distributed. The distributed P2P networks can be further classified into two categories: structured and unstructured. Napster [1] is an example of centralized P2P system where file search process is carried in a centralized server. This causes a single point of failure problem and server overload. To overcome these problems distributed was developed to replace the centralized system. The structured P2P systems have no central directory server and so these are decentralized. But these systems have a significant network structure (topology). The network topology is tightly controlled and files are placed at specified locations using distributed hash table (DHT). For example, the structured P2P systems like Freenet P2P network [2], the placement of files is based on hints. In unstructured P2P networks like Gnutella [3] and BitTorrent [4] resiliency against nodes’ dynamics is there and there is no centralized administrative entity to control the operations of the nodes and their sources (the files) that the nodes share are not related to the their topological positions in the network.

Though most of existing P2P file sharing protocols can locate and discover the files effectively in wired networks but these protocols are not suitable for mobile nodes in wireless mobile networks because of the movement of nodes in wireless mobile networks [5]. Most of the file discovery protocols in P2P networks like Chord [6], Pastry [7], Tapestry [8], etc. are designed based on the DHT [9]. The DHT is a resource searching and retrieval mechanism in P2P networks. It shares a large identifier space which is shared by participating nodes and files stored at the nodes in the P2P networks. The participating nodes and files are mapped on the same identifier space using SHA-1 (Standard Hash Algorithm). When a node wants to lookup a resource in the P2P network, a key lookup message is sent to participating nodes. This message is forwarded from one node to another till resource found or query time expired. The lookup operation in structured P2P networks consists of locating the file or node for a given key.

The existing P2P networks rely on the underlying IP protocol for routing and have big bandwidth. But it is not suitable for files retrieval in wireless mobile networks in which a user often roams from a network to the other network [10]. When a mobile node roams from one network to another, its network topology is changed and data packets are required to be routed through a different path. The mobility of the node induces connection change frequently and hence requires different path setup to deliver the data packets. The mobility and desire to join or leave the network by participating nodes create tough challenge before the researchers. Mobile user’s equipment has limited battery power and limited transmission range. Mobile P2P file sharing takes place hop-by-hop between two mobile users falling into transmission range. So, a mobile P2P file sharing system needs to address these challenges.

In urban cities, many mobile users have fixed mobility pattern [11]. The mobility pattern of the users can be utilized to improve the performance of Chord protocol for Mobile P2P networks. We have proposed a mobile pattern based Chord (MP-Chord) for mobile P2P networks. Rest of the paper is structured as follows. The literature survey and limitations of the existing schemes in the related field are given in Sect. 2. The proposed scheme has been discussed in Sect. 3. The analytical modelling of the performance of proposed and existing schemes is given in Sect. 4. In Sect. 5, performance analysis of proposed and existing schemes is given. The conclusion about the performance of the proposed scheme is given in Sect. 6 followed by the references.

2 Related Work

Chung-Ming Huang, Tz-Heng Hsu, and Ming-Fa Hsu have proposed a network-aware P2P file discovery scheme in wireless mobile network [10]. The entire network is divided into clusters and nodes in a cluster share similar characteristics. A super node maintains the index of the files shared in a cluster and client node requests the same from the super node. The network-aware P2P file sharing architecture enables the files to be searched first with nearby nodes. Nodes with IP addresses that have the same longest prefix belong to the same network-aware cluster. For example, suppose there are four nodes namely P1, P2, P3, and P4, with IP addresses 140.116.247.20, 140.116.247.115, 140.116.247.119, and 140.116.82.63, respectively. The nearest three nodes share the same 24 length prefix with the entry 140.116.247.0/24. So, nodes P1, P2, and P3 will be grouped together in one cluster with entry 140.116.247.0/24.

A distributed multisource sender-selection for multimedia files sharing scheme to maximize the receiving data rate and minimize the energy consumption has been proposed in [12]. Authors have proposed the multimedia files sharing scheme based on recent advances in restless-bandit algorithms. Kwangjin Park and Patrick Valduriez have proposed a P2P minimum boundary rectangle (PMBR) scheme for mobile P2P networks [13]. A node that contains desirable files can be easily identified by reading the PMBR index using a selective tuning algorithm called distributed exponential sequence scheme (DSS). The proposed PMBR scheme based on DSS is useful in preserving power.

Dao and Kim proposed a topology-aware Chord protocol [14] for P2P networks that uses an anycast mechanism in conjunction with two tables: finger table and neighbourship table, to improve the routing efficiency and lookup accuracy. In this proposed scheme, messages from outside that are targeted to an anycast address and delivered to the nearest node. The neighbourship table stores the information about the closest known nodes of a given node. In [15], Chao et al. have proposed a routing scheme called Bidirectional Neighbour’s Neighbour Chord that can be used to improve the lookup performance in Chord-based P2P networks. In this scheme, the lookup is processed through clockwise and anticlockwise to improve the lookup performance. The proposed scheme relies on the idea of extending the finger table of each node using the learn table. The lean table maintains the information of all successors of a successor in order to increase the finger density of the routing table.

Mobile Robust Chord (MR-Chord) scheme has been proposed by Woungang et al. [16]. In this proposed scheme, additional information is stored in the finger table like lookup success and failure rate and weak node (true or false). MR-Chord consists of two schemes: Real-Time Fix scheme and By-Detect Fix scheme. Real-Time Fix scheme is responsible for updating the finger table entries when lookup failure occurs by fixing the errors in finger table of each node. The By-Detect Fix scheme decides whether more finger node detections should be performed or not based on the collected statistics on lookups. More precisely, when a node seeks a key lookup procedure, it records the result of the lookup in its finger table as successful or failure. If lookup procedure is successful, the success rate is incremented by 1 otherwise failure field is incremented by 1. The cumulative values of these two parameters are calculated for node i and if Failure[i] − Successful[i] > 2, the finger node i is said to be weak node. After detection of the weak node, check procedure is called to fix the error caused by the weak node in the finger tables of the other nodes.

In [17], Wu et al. have proposed two Chord-based approaches called the enhanced bidirectional Chord (EB-Chord) and the EB-Chord with lookup-parasitic random sampling. This scheme proposed to minimize the path length and the lookup average latency in P2P networks. Their idea consists of using two finger tables with dual directions and assigning a key to more than two nodes at a time. In [18], Liu et al. have proposed a cross-layer Chord-based design scheme called Mobile Chord, which enhances the P2P performance over vehicular ad hoc networks (VANETs). In this scheme, each node maintains the Chord overlay in a distributed manner and provides reduction in the protocol’s overhead.

In [19], Hailun et al. have proposed an Effective Capacity Peer Selection (ECPS) scheme for mobile P2P networks based on effective capacity of the nodes. In this scheme, the neighbour peer selection problem was modelled using the Multiple Attribute Decision Making (MADM) theory, which considers multiple factors of participating nodes like Signal to Interference and Noise Ratio (SINR), residency time, power level, security, moving speed, and effective capacity. In [20], Fanelli et al. have proposed a context data distribution scheme. This scheme is self-adaptive in data retrieval time and data freshness. The proposed scheme includes a P2P quality-based architecture for context distribution which dynamically reconfigures its internal components to meet agreed quality requirements and exploits mobile P2P solutions to offload wireless infrastructures by local context data sharing.

In [21], Chen et al. have proposed a scheme to find out the cardinality of the nodes in large mobile P2P systems. In this scheme, authors have proposed two methods namely circled random walk and tokened random walk to find out the number of nodes in the large mobile systems. In [22], Wang et al. have proposed a scheme to deal with intermittently connected nodes in mobile P2P networks. The proposed scheme includes two opportunistic routing algorithms, which exploit the spatial locality, spatial regularity, and activity heterogeneity of human mobility to select relays. In [23], Shen et al. have proposed a routing mechanism for hybrid wireless networks based on P2P based Market-guided Distributed Routing (MDR) mechanism. MDR consists of widespread base stations to coordinate the routing. The packets from a source node are transmitted to base stations directly or indirectly and then packets are transmitted to the destination. The widespread base stations form a P2P structure for reputation collection and querying to avoid local information exchanges and for managing the service transactions between nodes.

3 Proposed System Model

We have proposed a scheme called Mobility Pattern-Based Chord (MP-Chord) which considers the mobility pattern of the mobile users in mobile P2P networks. We assume that each mobile user has data service subscription from some service provider and mobile user’s equipment is capable to store the registration information like Registration Area (RA). The existing mobile communication area is divided in different Registration Areas (RAs) and each RA is served by an Access Router (AR). Each RA is consists of several cells. Mobile user has data service subscription and travels through different RAs/ARs. So, mobile user is aware of each RA/AR, enter-exist time.

P2P networks and mobile ad-hoc networks (MANETs) share many common characteristics like self-organization and decentralization due to the common nature of the distributed components [24]. These networks also share high degree of dynamicity in topology formation as nodes can join and depart at any time. P2P networks rely on IP infrastructure for routing whereas MANETs rely on hop-by-hop connection and have limited bandwidth and high traffic maintenance cost. MANETs rely on two types of routing protocols: reactive and proactive. Reactive routing protocols like Ad hoc On Demand Distance Vector (AODV) [25] and Dynamic Source Routing (DSR) [26] creates routes when required by the source node. A proactive routing protocol like Optimized Link State Routing (OLSR) protocol maintains update routing information from each node to any other node in the MANET. We assume that underlying routing protocols in proposed scheme are AODV [25] and DSR [26].

3.1 Mobility Pattern of the Mobile User

It has been observed that most of the mobile user in the urban cities follow fixed mobility pattern [11] and mobility pattern of a mobile user has been illustrated in Fig. 1.

Fig. 1
figure 1

Mobility pattern of mobile user

As illustrated in Fig. 1, the house and office of the mobile user are under coverage area of Access Router 1 (AR1) and Access Router 4 (AR4) respectively. Mobile user starts journey to its office at time t1 and goes through Access Router 2 (AR2), Access Router 3 (AR3) at time t2 and t3 respectively. While returning from office follows AR3 and AR2 at time t7 and t8 respectively and enters AR1 at time t9 and reaches home at time t10. The mobility pattern of the mobile user is given in Table 1 as follows named as mobility profile.

Table 1 Mobility pattern (mobility profile)

The mobility pattern of the mobile user is characterized in four states [27] as given in Table 2.

Table 2 Mobility states

3.2 Mobility Pattern-Based Chord (MP-Chord)

Chord [6] is topology aware and resource lookup function. It forms a ring topology where nodes are placed in a ring and addressed by m-bit identifier. The nodes in the ring are addressed in clockwise. Each node maintains a table called finger table in which identities predecessors and successors are stored. As defined in [6], a node Ni maintains a finger table which contains m entries for successor links where m is the identifier length. The jth entry (finger) in the finger table stores the address of jth successor which is given by the following equation.

$${\text{Successor }}({\text{j}}) = \left| {i + 2^{j - 1} } \right|mod 2^{m} \quad {\text{for}}\;1 \le j \le m$$

We have proposed an amended finger table (Table 3) which stores the mobility profile of the nodes areas wise. For example, a modified finger table with 6-bit identifier (m = 6) for node N16 (as shown in Figs. 1, 2) is given in Table 3. Each node stores the successor, presence area, enter-exit time, and file-to-churn rate (FCR) of the successor. FCR denoted by λi for node i is defined as \(1 /CR_{i}\) where CRi is churn rate (join/depart) of serving node per unit time. Obviously the value of FCR is always less than or equal to 1. It is an important factor in mobile P2P networks to decide reliability and free riding behavior of the participating nodes.

Table 3 Node N16’s MP-Chord finger table
Fig. 2
figure 2

MP-Chord fingers of node N16

As illustrated in Fig. 2, Nodes N16, N18, N22, N26, N33, N40, N50, N60, and N3 are active nodes in the ring. Each of these nodes stores MP-Chord finger table. When a new participant node wants to join the ring, the node identifier is allotted and entry in the ring made as defined in Chord [6]. The finger table is updated in two ways: actively or opportunistically. In active update, finger table is updated by a node when a file is downloaded completely or connection terminated or new node joins the ring. In opportunistic update, finger table is updated by a node when node crosses the boundary of RA/AR. When finger table is updated, the concerned node broadcasts message to its successor nodes. Referring to Table 3, node N16 is aware about its successors and their areas of presence with respect to the time period. For example as illustrated in Fig. 1, nodes N22 and N33 are present in RA1 during t9 − t2 time period. So, while requesting a file, node N16 prefers nodes N22 and N33 during time period t9 − t2. This process reduces the unnecessary queries and time delay in the lookup and file downloading.

3.3 Resource Lookup Process

The resource lookup process is selective with respect to the time as compared to the lookup process defined in Chord [6] and MR-Chord [6]. Suppose a node Ni wants to lookup for a key k then k is hashed using SHA-1 as defined in Chord [6] and Ni looks at the nearest node closer to key k in its finger table, for example node Nj which is present in same RA as Ni. Ni also looks at the other information like the λj of the Node Nj. There may be other nodes also present in the same RA as node Ni. Ni requests Nj which is the closer node to key k for the desired file. If desired file is not found in Nj then Ni requests other nodes which are present in the same RA as per decreasing order of their FCR.

3.4 MP-Chord Finger Table Update

The finger table is updated by the nodes in two ways: actively or opportunistically. In active update process, a node updates the finger table when a file download is completed or connection to the host node is lost. The connection to the host node is lost due to many reasons like host node moves out of transmission range, depart from participation, power failure, etc. In opportunistic update process, each node updates its finger table when it enters a new RA. Each node broadcasts message for updating its finger table. After receiving this message other nodes send reply message back and newly arrived node update its finger table. Other nodes which are already present also update the entry of the newly arrived node. The fingers entry in the finger table takes place as suggested in the Chord [6] but other parameters are entered by a node itself. For example, RA, E–E time and FCR are entered by each node itself. The initial value of FCR for a newly participated node is calculated as 1/N where N is the total number of participating nodes.

4 Analytical Modelling of Performance

We assume that the mobility rate of mobile user is λm. Assuming that coverage area of an AR is circular, average speed of mobile user is V (m/s), and radius of AR’s coverage area is R (in m) then λm is calculated as follows [28].

$$\lambda_{m} = \frac{2V}{\pi R}$$
(1)

The probability ρr that a node broadcasts request to N participating nodes for a file and appropriate node responds is defined as \(\uprho_{\text{r}} = {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 N}}\right.\kern-0pt} \!\lower0.7ex\hbox{$N$}} .\)

4.1 Cost of Route Update to Download a File (Cru)

We assume that underlying routing protocols are AODV [25] and DSR [26] defined for MANETs. AODV routing protocol maintains single route for each pair of nodes. Using AODV routing protocol, the cost involved in broadcasting the request to setup route and deciding an appropriate route to the destination node to download some file is expressed as given below.

$${\text{C}}_{{{\text{ru}}({\text{AODV}})}} =\uprho_{\text{r}} (nC_{b} + mC_{u} )$$

For simplification purpose, let Cb = Cu = Cm, so

$${\text{C}}_{{{\text{ru}}({\text{AODV}})}} =\uprho_{\text{r}} C_{m} (n + m)$$
(2)

where Cb, Cu, n, and m are the cost of broadcasting message, Cost of unicast message, number of nodes involved in broadcasting message hop-by-hop while reaching destination node, number of nodes involved in sending unicast message back to requesting node from destination node respectively. DSR maintains more than one route from source to destination for each pair of nodes. So, DSR creates more overhead as compared to AODV. We consider β as the number of routes for each pair of nodes. Using DSR routing protocol, the cost involved in broadcasting the request to n nodes and deciding an appropriate route to the destination node to download some file is expressed as given below.

$${\text{C}}_{{{\text{ru}}({\text{DSR}})}} =\uprho_{\text{r}}{\upbeta}(nC_{b} + mC_{u} ) =\uprho_{\text{r}}{\upbeta}C_{m} (n + m)$$
(3)

4.2 Finger Table Lookup Performance

We have defined the lookup performance of the finger table for Chord [6], MR-Chord [16] and proposed MP-Chord schemes. We consider m entries (chords) in the finger table, CR (churn rate) of a node per unit time, and λm is the mobility rate of a node per unit time. We define the lookup success rate as the ratio (percentage) of total number of active nodes and total number of nodes addressed with m-bit ID such that N × CR ≤ N × m ≤ 2m.

The lookup success rate (LSR) of Chord [6], MR-Chord [16], and MP-Chord is defined as follows.

$$LSR_{Chord} = \frac{N \times m - N \times CR}{{2^{m} }}$$
(4)
$$LSR_{{MR{-}Chord}} = \frac{N \times m - N \times CR + \alpha }{{2^{m} }}$$
(5)
$$LSR_{{MP{-}Chord}} = \rho_{i} \left( {\frac{{N \times m - N \times CR + \lambda_{m} }}{{2^{m} }}} \right)$$
(6)

where 0 ≤ α ≤ m is the number of bad chords fixing in the finger table in MR-Chord [16] scheme.

4.3 Cost of Updating Finger Table

The cost of updating the finger table in proposed scheme is dependent upon table update strategy: active or opportunistic. When finger table is updated, it is broadcast hop-by-hop to the neighbours using h hops broadcast and all nodes update their finger table. The cost of updating the finger table actively (Ctua) by a node per file download is defined as follows.

$$\begin{aligned} C_{{tua(MP{-}Chord)}} & = C_{t} \left( {\frac{{CR \times S_{f} }}{{W_{avg} }} + 1} \right) + hC_{b} + C_{t} \left( {N - 1} \right) \\ & = C_{t} \left( {\frac{{CR \times S_{f} }}{{W_{avg} }} + N} \right) + hC_{b} \\ \end{aligned}$$
(7)

The cost of updating the finger table opportunistically (Ctuo) per unit time is defined as follows.

$$C_{{tuo(MP{-}Chord)}} = C_{t} \left( {\lambda_{m} * N} \right) + hC_{b}$$
(8)

where Sf and Wavg are the size of a file and average bandwidth (Mb/s) to download a file respectively.

The cost of updating the finger table in MR-Chord scheme [16] is based on the number of lookup failure and routine update and it is defined as follows.

$$C_{{tu(MR{-}Chord)}} = C_{t} \left( {Nm + \frac{{CR \times S_{f} }}{{W_{avg} }}} \right) + hC_{b}$$
(9)

5 Performance Analysis

In this section, we have analyzed the performance of the proposed scheme MP-Chord and the existing schemes MR-Chord [16] and Chord [6]. The values of the different parameters are taken in consistence with MR-Chord [16] and presented in each figure. The value of CR is considered per sec.

Referring to Fig. 3, the cost of updating route from one node to another node in the proposed scheme while varying number of broadcast (m = n) from 1 to 10 has been illustrated. The underlying routing protocols are AODV and DSR. The proposed MP-Chord (AODV) has less cost as compared to proposed MP-Chord(DSR). This is because of the multiple routes maintained by DSR (β = 2) protocol as compared to AODV protocol. The cost of route update between two nodes while varying number of routes (β) between two nodes has been illustrated in Fig. 4. The cost involved in proposed scheme using DSR protocol increases as number of routes (β) increases. The update cost for underlying AODV routing protocol is constant due to maintenance of singe route between two nodes. The value of β varies from 1 to 49 where N = 50 is the number of participating nodes in mobile P2P network.

Fig. 3
figure 3

Cost of updating route while varying no. of broadcast

Fig. 4
figure 4

Cost of updating route while varying no. of routes

The lookup success rate (LSR) of the finger table for different schemes is illustrated in Figs. 5, 6, 7, and 8. Referring to Fig. 5, the LSR of the proposed scheme MP-Chord is 0–22.75% higher than LSR in MR-Chord [16] for 2 ≤ N ≤ 7. The LSR of the proposed scheme MP-Chord is 0–35.01% higher than LSR in Chord [6] for 2 ≤ N ≤ 9.

Fig. 5
figure 5

Lookup success rate varying no. of nodes

Fig. 6
figure 6

Lookup success rate varying no. of bad chord fixing

Fig. 7
figure 7

Lookup success rate varying mobility rate

Fig. 8
figure 8

Lookup success rate varying mobility state probability (ρi)

Referring to Fig. 6, LSR of the proposed scheme and existing schemes while varying the number of fixing of bad chord (α) in the finger table has been illustrated. The value of α varies from 0 to 6 where m = 6 are the number of chords in the finger table. The fixing of bad chord entry is suggested in existing scheme MR-Chord [16]. The LSR of Chord [6] and proposed MP-Chord is constant but LSR for proposed scheme is higher than LSR in Chord [6]. The LSR of the proposed scheme MP-Chord is 0–8% higher than LSR in MR-Chord [16] for 0 ≤ α ≤ 4.

Referring to Fig. 7, LSR of the proposed scheme and existing schemes while varying the mobility rate of the mobile nodes (λm) has been illustrated. The value of λm varies from 0 to 5 per s. The mobility profile management is proposed in the proposed MP-Chord scheme. The LSR of existing schemes Chord [6] and MR-Chord [16] are constant. But LSR in proposed scheme increases as mobility rate increases and mobile nodes have probability 0.99 to follow their mobility pattern.

Referring to Fig. 8, LSR of the proposed scheme and existing schemes while varying the mobility state probability (ρi) has been illustrated. The value of ρi varies from 0.1 to 0.99. The mobility state probability is a major influential factor in LSR of the proposed scheme. The LSR of the proposed scheme increases as ρm increases and it is 0–89% less than LSR in Chord [6] for 0.1 ≤ ρi ≤ 0.91. But LSR in the proposed scheme is 0–8% higher than LSR in Chord [6] for 0.92 ≤ ρi ≤ 0.99. The LSR of the proposed scheme is 0–89.29% less than LSR in MR-Chord [16] for 0.1 ≤ ρi ≤ 0.935. But LSR in the proposed scheme is 0.8–6% higher than LSR in MR-Chord [16] for 0.94 ≤ ρi ≤ 0.99.

The cost of updating the finger table per file (file size, Sf = 10 Mb) in proposed scheme and existing scheme MR-Chord [16] has been illustrated in Fig. 9. The number of nodes varies from 5 to 50. We have proposed two strategies for updating the finger table: active and opportunistic. The active table maintenance cost is higher than opportunistic maintenance in the proposed scheme due to frequent table update in the active maintenance. The table maintenance cost in existing scheme [16] is higher than proposed scheme due to non-consideration of the mobility profile of the mobile users. The cost of table maintenance increases as number of nodes increases in both schemes MR-Chord [16] and MP-Chord.

Fig. 9
figure 9

Cost of updating finger table per file varying no. of nodes

6 Conclusion

We have proposed a mobility pattern based scheme named MP-Chord for mobile P2P networks. We have presented analytical modelling and performance analysis of the proposed scheme and existing schemes Chord and MR-Chord. It has been observed that the proposed scheme outperforms the Chord and MR-Chord in many ways. The mobility management is a big challenge today in mobile P2P communications but mobility pattern of the mobile users can be considered for improving the lookup procedure in the finger table. It has been observed and reported in many research that most of the mobile users follow fixed mobility pattern in the urban cities. We have considered the mobility pattern of the mobile users to improve the lookup performance in the finger table based on the Chord. It has been observed that if mobile user follows its mobility pattern 90% of the time or more than the proposed scheme MP-Chord performs better than the existing schemes Chord and MR-Chord. The effect of the intermittent connection and limited bandwidth can be considered for further study.