# SLoPCloud: An Efficient Solution for Locality Problem in Peer-to-Peer Cloud Systems
## 4 Proposed Solutions for Locality Problem in P2P Cloud System
### Generalized Hypercube Connected Cycle Overlay Network  
Generalized Hypercube Connected Cycle (GHCC) is a composite graph, defined with a pair of parameters \(l\) and \(m\) and represented as \(GHCC(l,m)\)[46]. This topology has suitable characteristics which attract our attention to consider it as an overlay graph. GHCC graph characteristics are listed in the following, while Table 1 represents the notations along with their brief description. 1. Total number of nodes in the graph is represented by \(N\). 2. \(l\) and \(m\) are the parameters of the graph, where \(N=lm^{l}\). 3. The nodes of the graph are divided into \(l\) levels, which are numbered as \(0,1,\ldots,l-1\), and each level consists of \(m^{l}\) nodes. 4. Specification of each node: 1. All nodes in one level are numbered by a variable in a range from \(0\) to \(m^{l}-1\). This variable is called the index of a node in the specific level. The index is displayed by a string with \(l\) literals and each literal has a value from \(0\) to \(m-1\). 2. Another literal is used to identify different levels of nodes. It is in the range of \(0\) to \(l-1\). Here is an example of representing a node in GHCC (l,m). The ordered set of literals \((p;u_{l-1}u_{l-2}\cdot\cdot u_{1}u_{0})\) is used where \(p\) indicates the number of levels, \(0\leq p\leq l-1\), and the string \(u_{l-1}u_{l-2}\cdot\cdot u_{1}u_{0}\) represents the index of a node in level \(p\). Thus, \(p\) is \(l\)-valued while \(u_{i}\)s are \(m\)-valued. There is also another way to display a node, which is a two-tuple \((p,n)\) form, where \(p\) is the number of level and \(n\) is the index such that \(n=\sum_{i=0}^{l-1}u_{i}\times m^{i}\). 5. There are two kinds of links in this topology, inter-level and intra-level links, which are defined as follows: 1. **Inter-level links:**\(l\) nodes with different levels and same indices are distributed in the network. These \(l\) nodes are connected in a way that forms a Ring. The links between these  
Figure 3: Routing presentation in Cube Connected Cycle. nodes are called inter-level links. For example, if we consider a node \((p;u_{l-1}u_{l-2}\cdot\cdot\cdot u_{1}u_{0})\), it is connected to two other nodes in adjacent levels, \(((p\pm 1);u_{l-1}u_{l-2}\cdot\cdot\cdot u_{1}u_{0})\). Consider that all additions and subtractions are in the modulus \(l\). There are \(m^{l}\) cycles in the graph which are constructed by inter-level links. Each cycle consists of \(l\) nodes. 2. **Intra-level links:** There are some other links which connect nodes in the same level. Node \((p;u_{l-1}u_{l-2}\cdot\cdot\cdot u_{p+1}u_{p}u_{p-1}\cdot\cdot\cdot u_{1}u_{0})\) is connected to \(m-1\) other nodes \((p;u_{l-1}u_{l-2}\cdot\cdot\cdot u_{p+1}u_{p}u_{p-1}\cdot\cdot\cdot u_{1}u_{0})\) through clique edges, where \(\bar{u}_{p}\) signifies all values of the corresponding literal which is in the range of \(0\) to \(m-1\), excluding the value \(u_{p}\). The intra-level links form \(m^{l-1}\) number of disjoint cliques in each level, each clique is with the size of \(m\). 3. Since there are \(m-1\) inter-level links and two intra-level links emerging from each node, the degree of the graph is \(m+1\). 4. As is obvious, the graph is symmetric. GHCC is a composite topology, a combination of a Ring, a complete graph and a Hypercube. The nodes in one clique form a complete graph, while the nodes with the same node-index in different levels form a Ring. GHCC could be also formed as other topologies by choosing different values for \(l\) and \(m\). For example, for \(m=2\), the resulting topology will be a CCC graph with \(l\times 2^{l}\) nodes. For \(m=1\), the topology is reduced to a simple Ring while for \(l=1\) the resulting topology is complete graph. Figure 4, shows a GHCC graph with parameters \(m=3\) and \(l=3\). In this figure, the nodes at different levels are in separate columns, and each dotted box is a cliques. As mentioned earlier, using GHCC graph as overlay topology provides to choose any two out of three parameters \(N\), \(\delta\) and \(D\), independently.