# SLoPCloud: An Efficient Solution for Locality Problem in Peer-to-Peer Cloud Systems
## 4 Proposed Solutions for Locality Problem in P2P Cloud System  
In this section, a novel solution for locality problem in P2P cloud systems is proposed, to solve the mismatch problem between the overlay and physical layer. Hereupon, choosing a metric to represent the distance between peers becomes crucially important. Since the bandwidth plays an essential role in the performance of the services provided by P2P cloud systems, the time distance seems to be more effective than the location-based distance. Accordingly, to estimate the distance between nodes, we chose to use RTT as a distance metric. The other significantly effective factor in locality problem is the topology of the overlay graph [42]. In this paper, we suggest the GHCC as a general composite topology for overlay P2P cloud networks. GHCC is a flexible graph capable of easily reshaping into many well-known graphs, with just a simple modification in its parameters. In this graph, any two of the three main graph characteristics, i.e., the number of nodes, graph degree, and graph diameter, could be easily changed while the third one becomes fix. It is worth mentioning that, in most of the known graphs, fixing just one of the mentioned parameters, leads to fix the others.  
While we name the proposed algorithm SLoPCloud, our solution does not have a serious impact on network performance parameters such as traffic and delay. Furthermore, since the overlay graph of our algorithm is a flexible and reshapable graph, our solution could be applied to most of the well-known overlay networks. As mentioned above, the proposed solution is the extension of our  
Figure 1: Three-dimensional Cube Connected Cycle topology.  
previously published works [13; 14]. Hereupon, since Hypercube is a well-studied topology and close to the architecture of the most well known overlay topologies, we first review SLoPCloud based on Hypercube [13]. Then, the proposed solution based on CCC is reviewed [14]. This topology is used to improve the performance of the network under our solution, due to its unique properties such as a fixed and small degree. Finally, SLoPCloud is proposed based on GHCC topology.  
In any P2P system, there is an initialization phase for the network, in which the network is bootstrapping. In this phase, some initialization processes are conducted and then any new node can join or leave the network. Accordingly, to introduce any locality solution for P2P cloud systems, we have to propose the bootstrapping process, and then the process of joining new nodes. Finally, the routing process according to the locality solution has to be proposed. Although the problem of two layer routing is optimized recently [47; 48], the routing in P2P systems is yet done by considering just the overlay layer. It is worth mentioning that the resource management processes are done according to the nodes' connections in the overlay layer. Hence, the routing problem, in the context of this paper, is specifying the responder to the requested resources in the P2P cloud system. That is why the routing problem is of crucial importance in this field of research.