Abstract
Lookup services is still a key challenge in all distributed systems and particularly for P2P based services (e.g. distributed SDN node controllers, social networking…). In these networks, node searching for a specific service or resource has to discover the “best” path to the node offering the requested resource or service. Since P2P networking is implemented at application layer, the given optimized path from a source node to a destination one, in terms of number of hops is not necessarily the best path in terms of physical parameters (e.g. delay, physical proximity). For this, the lookup process optimization is still a real challenge in some environments, particularly for delay sensitive services. In this context, various topologies have been proposed in the literature such as: ring, tore, star, hypercub, De Bruijn graph, and skip graph.
In this paper, we propose a new approach using Pancake graphs, for structuring the P2P topology in order to optimize the lookup process. The proposed solution is compared to some main existing solutions. Under certain conditions, the simulation results show better performance compared to existing approaches.
Introduction
The rapid evolution of networks (e.g. Cloud, SDN, NFV) combined with the exponential growth of users and terminals, require new network models, structures and topologies for better performances. For example, there is a need to provide a distributed architecture for the controller node in SDN networks (Software-Defined Networking), or for building a P2P distributed based SDN architecture, or for self configuration and organisation [29]. In this context, P2P model still represents an attractive research topic for performance optimization. The topology selection cost should also be taken into consideration. The existing shareable resources searching methods, have at least one of the following limitations: (1) they are applicable only to certain topology patterns, (2) single point of failure problem, or (3) generate a significant cost for maintenance [22].
The most important executed function or process in P2P systems is the routing and lookup function. Given this, the optimization of such function is still a challenge, particularly for delay sensitive applications or services [9] but also in critical environments such as P2P SDN/NFV, P2P sensor networks (Wireless body sensor networks) [7], P2P VoD [23] or Streaming [21]. In this context, new models have been proposed, each one presents some benefits but also some limitations, such as: bus topology, full mesh topology, ring topology, hypercub topology, a multi-agent-based content-sharing topology [32] … Even if some existing P2P models (e.g. Pastry) include some physical information (e.g. physical proximity) in their routing tables, they do not really exploit these information. Continuously, other types of topology are also proposed such as De Bruijn [12], Star [2], Pancake graphs and semantic search [18]. Pancake graphs is the focus of this paper.
The rest of the paper is organized as follows: Section 2 gives a background and related works regarding the Pancake graphs. In Section 3, we introduce our proposed solution for routing optimization and lookup acceleration in P2P networking using Pancake graphs. Section 4 presents some performance results regarding the proposed solution. Finally, in Section 5 we conclude this work and share ideas for future work.
Background and related works
Pancake graphs are proposed by Akers et Kirshnamurthy as an alternative to hypercube for processors interconnection in parallel computing [24]. Like other graphs, it is composed of nodes and edges. A group of nodes is clustered into a Pancake graph, and is assigned an identifier. This graph has the following properties: symmetric, recursive and not oriented. A Pancake graph is essentially based on the concept of symbols permutation. The graph and symbols represent the identifiers space for the peers [1].
Each peer of a Pancake graph is part of a separate Pancake group of nodes. The peer has connections with other peers of the same node, and peers of neighbouring nodes. In the case where peers join or leave the network, some of them can connect to other nodes, to keep some parameters constants (e.g. number of peers per node for a uniform nodes distribution). All nodes are connected to the same number of peers at any time. If the total number of peers increases or decreases respectively above or below a certain threshold, the order of the Pancake graph increases or decreases by one [25]. This, provides relevant and important properties to the Pancake graph.
In this section, we illustrate the main benefits of Pancake graphs and their importance in many research domains. The Pancake graph is directly related to discrete optimization problem. The ordered lists can be used to create networks of Pancakes in which a graph is created by representing each vertex list as distinct and connecting only two vertices, if it can obtain one from another using prefix permutation. The example illustrated on Fig. 1 shows how to sort an array using the well known permutations of Pancake graphs.

Array sorting using permutations in Pancake graphs.
Computer architectures has completely changed, from a simple refined processor to a parallel structure using many parties with relatively less capability requirements. In a parallel architecture, if the problem can be divided into parts and be executed separately and independently, results are obtained more rapidly compared to a single processor architecture. However, these processors must be interconnected, in order to share information as needed. For this purpose, there are different ways to connect these processors such as the Pancake structure [27].
Recent studies in the identification of genomes have highlighted issues in molecular biology very similar to the problem of Pancakes. Differences in genomes are usually explained by differences accumulated in the genetic material due to random mutations. In the 80s, another mechanism of evolution has been discovered. The gene sequences are identical in some plants, but differ only in the order. This has inspired some biologists to watch the mechanism that could confuse the order of genetic material. The only solution is to make the permutations in the Pancake graphs. The best known example in biology is the two plants
Let be
An undirected graph
In a Pancake graph

Pancake graphs: P2, P3 and P4.
Pancake graph vs other topologies
In a n-Pancakes graph, a sub-graph is derived from the peers that have a common symbol k in the last position of their addresses. This sub graph constitutes a
Table 1 shows a comparison between the Pancake graph
In the pancake graph, nodes should maintain little information about others. In a Pancake graph with
Properties of Pancake graphs

Example of “expansion” from P2 to P3.
Figure 4 illustrates the process of reducing a Pancake graph P4 to P3. The dominating set, once determined, contains all the nodes that have their

Example of “reduction” from P4 to P3.
Routing in Pancake graph is a key issue. Finding the optimum path in term of delay in a n-Pancakes graph with a polynomial algorithm is still a challenge [28]. So, some solutions are proposed in order to look for the “best” path which is not necessary the optimal one, particularly when the fault tolerance is considered [31]. In [14], the author propose a new model based Pancake graph for P2P lookup acceleration. The architecture is a hierarchical rings. The lookup process is based on the nearest peer with identifier numerically higher or equal to the identifier of the request ressource. Our proposed model is different to that in [14] in many ways, principally the resource keys assignment and the finger tables construction that defines the modified pancake graph architecture of the proposed model.

Algorithm Route (
P2P lookup optimization and acceleration consists of relaying rapidly each node with others, with few intermediaries, while maintaining only a minimum of contacts for each node. P2P networking is a self organisation and configuration network [30]. Peer-to-peer networks generally implement some form of virtual overlay network on top of the physical network topology, where the nodes in the overlay form a subset of the nodes in the physical network. Data is still exchanged directly over the underlying TCP/IP network, but at the application layer peers are able to communicate with each other directly, via the logical overlay links (it corresponds to a path through the underlying physical network). Overlays are used for indexing and peer discovery, they make the P2P system independent from the physical network topology. Based on how the nodes are linked to each other within the overlay network, and how resources are indexed and located, we can classify networks as unstructured or structured (or as a hybrid between the two). Lookup is the most frequently executed process, its optimization and acceleration is already a challenge. Most important works have been studied this process (see [ 33 ] for example). Recent applications have been emerged in P2P networking such as data collection [34] and Cryptocurrency Networks [8].
Routing process in P2P networking in general and in Pancake graph based P2P networking in particular is done at application layer. Consequently, the lookup process should be more optimized. This optimization still represents a real challenge, especially for critical and complex environments. Given this, we introduce a new optimized method for lookup acceleration based on modified Pancake graph.
Proposed solution
The key challenges of Peer-To-Peer networks are focused on research and services location also called lookup process. For example, if a peer
Keys assignment
A service or resource can be represented for example as a user terminal (e.g. SIP phone in case of VoIP type of applications), or video stream or data files. So, looking for a specific resource in a network could be done in different ways with different methods more or less complex. Among well known methods including keys assignment to resources with hash functions, to distinguish each one uniquely, such as in Chord [26], where keys are assigned to peers according to a defined law or technic (Higher first peer in Chord). So, to find a service in a network, the key (with the finger tables) is used to learn about the requested peer location. Figure 5 shows an example of key assignment used in our proposed solution.

Key assignments example.

Algorithm Local_Key (
In our method, we apply the same principle of combination of keys used in Chord, as the key’s values are between the smallest and largest identifiers of peers in terms of numerical values. Then, a key is assigned to the closest peer in terms of numerical value. Regarding the search mechanism, peer which is looking for the file, analyses the key value and then finds the peer that contains it using the Algorithm 2 and then starts downloading.
In a Pancake graph P4, the numeric smallest identifier is 1234, and the largest identifier is 4321, so the key is between these two values (e.g. of keys: K2500, K1324 or K3333…etc.). For example, the key K2500 is between two peers whose identifiers are respectively 2431 and 3124 (
Based on the algorithm
The main principle of the proposed algorithm is to calculate the minimum of difference between the key and each peers, and then returns the peer that presents the minimum difference with the requested key.
After locating the destination peer, which stores the requested key (service), an algorithm that seeks the shortest path is executed.
Algorithm source-destination
In this sub-section, we present a new method to locate the shortest path between any two peers in a graph of Pancakes (algorithm
The 2nd case is when the nth values of the source and destination end with different symbols, while the beginning of the destination and the nth value of the source have the same value (this means:
Let be
Case I: (
Case II: (
Case III: (
In this case, the lookup service of a peer destination D, from the source peer S, is equivalent to look for the next recipient peer

Case I (
In this case, the lookup for the peer destination D from the source peer S is done via a direct call to the

Case II (
In this case, both source and destination end with the same symbol, so they belong to the same sub-Pancakes. Therefore, the search process is limited to this sub-graph only. The algorithm ignores the ultimate symbol and decrements the index to compare the latest front symbols, and so on, by recursive calls to the algorithm. Figure 8 illustrates this case.

Case III (

Function Sour_Dest()
The function

Function
The function

Function
To illustrate the main function of the proposed solution, the execution of the
Let be
For
The path 1 is:
For
The path 2 is:
For
For
Let be
For
The path 1 is:
For
The path 2 is then:
For
The path 3 is:
For
The final path is then:
Elements of comparison
The main characteristic of the proposed algorithm is the better performance of the routing process, in terms of the number of hops needed to reach the requested destination. Indeed, if we consider an example of two peers

Comparison between Route() and Sour_Dest().
Nevertheless, the unbalanced distribution of keys between peers, could represent a critical issue for the proposed solution. In case of non uniform keys distribution, the number of keys managed by a peer could be significantly different between peers. A typical example is given by peer 1234 which has only 5 keys while the peer 1243 has 45 keys.
For validation purposes, a specific simulation tool (Java program) has been developed. All tests and results are obtained, based on a platform with the following characteristics for the computers: 2.16 GHz and 1 GB of RAM.
Lookup acceleration is evaluated according to some metrics. The most important are: number of hops from source node to destination node, the end to end delay and the false negative that can gives an idea about the rate of the successful request.
In order to evaluate the performance of the proposed algorithm, we consider the

Comparison in terms of number of hops for P4.

Comparison in terms of number of hops for P7.

Comparison in terms of end to end delay for P4.
The number of hops is an important parameter that indicates the performance of the lookup process. The obtained results are summarized in Figs 10 and 11.
For each scenario, the same source i and destination j are considered (X-axis). Figure 10 shows the number of hops order to process a request from a source to a destination in Pancake graph P4.
Figure 11 shows the number of hops in order to achieve a request from a source to a destination in Pancake graph P7. The proposed algorithm outperforms

Comparison in terms of end to end delay for P7.
The average end to end delay is a physical parameter that mesures the cost lookup such as the number of hops. However, the delay is more significant than the number of hops. Figure 12 (respectively Fig.
13
) shows the average end to end delay (ms) in order to achieve a request from a source i to a destination j in the Pancake graphs P4 (respectively P7). Delay between two neighboring nodes is a randomly generated (between 0–150 ms). The average delay is almost less than 150 ms. This value (150 ms) represents a threshold that is compatible with delay sensitive applications (e.g. audio streaming) [4]. The proposed algorithm outperforms

Percent of False Negative in P7.
The false negative mesures how many requests are not achieved to the requested destination despite this last is available in the system. This is generally due to the leave of nodes when the request is still running. The nodes exit follows the law of Poisson. Figure 14 shows some examples of the percent of false negative in Pancake graph P7. This percent is generally less than 3% except in some cases where it is equal to 10%. This rate is not important, it is due to the greedy aspect of the lookup process used in the proposed model. The difference between the values of this percent is due to the non-uniform key distribution.
Conclusion and future work
In this paper, we have proposed a new model for lookup services based on the Pancake graphs. This model references resources in the network by a keys distribution over all peers. So, a resource that belongs to such a peer is close in terms of numerical value. Then, a lookup algorithm for the shortest path is executed, allowing a peer to reach the requested destination. This algorithm is essentially based on the concept of permutations, which is considered as one of the main key properties for this type of graphs.
When comparing with the algorithm
In terms of perspective, firstly we envision to explore or extend our model, to assure an efficient keys allocation for a uniform distribution. We also envision to mesure the cost of expanding and reducing the graph given the dynamics of a P2P network. Secondly, we try to adapt the proposed architecture for distributed social networking such as ROUTIL [6].
Footnotes
Acknowledgement
The authors would like to thank Dr. Boudries AbdelMalek and Dr. Omar Mawloud from Bejaia University for their valuable comments and remarks.
