distributed spanning tree construction using centrality

12
Distributed Spanning Tree Construction Using Centrality Ranking Algorithm in P2P Network S. Sujitha 1 , S. Sumitha 2 , K. Maheswari 3 , N. Balaji 4 and S. Gurulingam 5 1 ,2, 3 Assistant Professor, Department of CSE, Sri Venkateshwaraa College of Engineering & Technology, Pondicherry University, India. 4 Associate Professor, Department of CSE, Sri Venkateshwaraa College of Engineering & Technology, Pondicherry University, India. 5 Principal, Sri Venkateshwaraa College of Engineering & Technology, Pondicherry University, India. { 1 sujishanmugam25, 2 sumi252592, 3 maheswari228, 4 nbalajime1983, and 5 principalsvcet2014}@gmail.com Abstract: Peer-to-Peer methods have end up being, in a short interim of time, likely the quickest developing and most favored applications. The decentralized and conveyed nature of p2p strategies prompts staying aside the clientserver model. Since, in a distributed system communication takes place through message passing, there are many communication complexities which arise while transferring the information such as data packets flooding which causes delay in the network. This complexity can be reduced by constructing a distributed spanning tree. Hence, in this paper we have proposed Centrality Ranking Algorithm (CRA) for constructing a distributed spanning tree which uses three attributes namely degree centrality (DC), closeness centrality (CC) and betweeness centrality (BC) to mitigate the delay of transmitting a packet. Keywords: DST, Degree Centrality(DC), Closeness Centrality(CC), Betweeness Centrality(BC). I. INTRODUCTION Peer -to-Peer (P2P) systems are the prevalent a piece without bounds age of web. Peer -to-Peer (P2P) frameworks comprises of hubs which have measure up to capacities for trade of data and administrations straightforwardly with each other. Because of the conveyed idea of Peer Network, various systems require message goes for exchange of information starting with one hub then onto the next over the system. The exchange of information between two hubs in P2P organize depends on the quantity of message passes which decides movement level in the system and furthermore more number of message passes can cause bottleneck and clog which may bring delay in the system. To reduce the delay in the network while transmitting the data, it is required to formulate an interconnection in the network. Distributed Spanning Tree [3] is the interconnection arrangement we take after to diminish the delay in the system based on the ranks. Distributed Spanning tree systematize the shared system into an order of gathering of hubs. This permits the production of traversing tree established by numerous hubs and keeps the heap adjusted between hubs [2]. The Distributed crossing tree is an overlay structure intended to be adaptable .The DST is a tree without bottleneck and consequently adjusts stack between its hubs. In the existing works , many kinds of distributed algorithms for spanning tree construction has been done such as GHS algorithm, Chang Roberts algorithm, New node-join tree algorithm etc. The distributed spanning tree construction is used in wireless sensor network [3] which addresses the tolerance to message losses and node failures in the network. Onur et.al [14] proposed a distributed algorithm which generates energy efficient paths for routing and also consumes less energy. Neena et.al [7] uses spanning tree International Journal of Pure and Applied Mathematics Volume 119 No. 12 2018, 3143-3154 ISSN: 1314-3395 (on-line version) url: http://www.ijpam.eu Special Issue ijpam.eu 3143

Upload: others

Post on 14-Mar-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Distributed Spanning Tree Construction Using Centrality Ranking Algorithm in P2P Network

S. Sujitha1, S. Sumitha2, K. Maheswari3, N. Balaji4 and S. Gurulingam5

1 ,2, 3Assistant Professor, Department of CSE, Sri Venkateshwaraa College of Engineering & Technology, Pondicherry

University, India.

4Associate Professor, Department of CSE, Sri Venkateshwaraa College of Engineering & Technology, Pondicherry

University, India.

5 Principal, Sri Venkateshwaraa College of Engineering & Technology, Pondicherry University, India.

{1sujishanmugam25, 2sumi252592, 3maheswari228, 4nbalajime1983, and 5principalsvcet2014}@gmail.com

Abstract: Peer-to-Peer methods have end up being, in a short interim of time, likely the quickest developing

and most favored applications. The decentralized and conveyed nature of p2p strategies prompts staying

aside the client– server model. Since, in a distributed system communication takes place through message

passing, there are many communication complexities which arise while transferring the information such as

data packets flooding which causes delay in the network. This complexity can be reduced by constructing a

distributed spanning tree. Hence, in this paper we have proposed Centrality Ranking Algorithm (CRA) for

constructing a distributed spanning tree which uses three attributes namely degree centrality (DC), closeness

centrality (CC) and betweeness centrality (BC) to mitigate the delay of transmitting a packet.

Keywords: DST, Degree Centrality(DC), Closeness Centrality(CC), Betweeness Centrality(BC).

I. INTRODUCTION

Peer -to-Peer (P2P) systems are the prevalent a piece without bounds age of web. Peer -to-Peer (P2P) frameworks comprises of hubs which have measure up to capacities for trade of data and administrations straightforwardly with each other. Because of the conveyed idea of Peer Network, various systems require message goes for exchange of information starting with one hub then onto the next over the system. The exchange of information between two hubs in P2P organize depends on the quantity of message passes which decides movement level in the system and furthermore more number of message passes can cause bottleneck and clog which may bring delay in the system. To reduce the delay in the network while transmitting the data, it is required to formulate an interconnection in the network.

Distributed Spanning Tree [3] is the interconnection arrangement we take after to diminish the delay in the system based on the ranks. Distributed Spanning tree systematize the shared system into an order of gathering of hubs. This permits the production of traversing tree established by numerous hubs and keeps the heap adjusted between hubs [2]. The Distributed crossing tree is an overlay structure intended to be adaptable .The DST is a tree without bottleneck and consequently adjusts stack between its hubs.

In the existing works , many kinds of distributed algorithms for spanning tree construction has been done such as GHS algorithm, Chang Roberts algorithm, New node-join tree algorithm etc. The distributed spanning tree construction is used in wireless sensor network [3] which addresses the tolerance to message losses and node failures in the network. Onur et.al [14] proposed a distributed algorithm which generates energy efficient paths for routing and also consumes less energy. Neena et.al [7] uses spanning tree

International Journal of Pure and Applied MathematicsVolume 119 No. 12 2018, 3143-3154ISSN: 1314-3395 (on-line version)url: http://www.ijpam.euSpecial Issue ijpam.eu

3143

construction for searching in P2P systems which avoids flooding. However none of the current work has considered positioning of hubs in a system to develop a spanning tree. By thinking about the rank of hubs in the systems, the point of this paper is to assemble a conveyed traversing tree for companions to limit the delay of transmitting the packets starting with one peer then onto the next. The delay of transmitting the packet starting with one peer then onto the next comprises of processing delay, queuing delay, transmission delay and link delay.

The rest of the paper is organized as follows: Section 2 discusses the related work; Section 3 describes the proposed algorithm; Section 4 described distributed algorithm for spanning tree construction; Section 5 provides a simple example for DST formation and finally Section 6 provides conclusion.

II. RELATED WORKS

Generally, the effectiveness of distributed spanning tree algorithms is estimated by running time and the quantity of messages traded among hubs and a great deal of research has gone into the plan of calculation as for such criteria. Gallager [4] has proposed an established conveyed calculation for minimum- weight spanning tree for an undirected chart .Each edge in the diagram contain limited weight. The possibility of this calculation is to consolidate given section of a MST to a minimum – weight outgoing edge of the piece. At that point joining the nearby non-part hub to the piece yields yet another section of a MST. Awerbuck [13] has proposed linear distributed spanning tree algorithm for asynchronous communication network. This paper proposes a algorithm in which each tree will hook itself on edge to the greatest level neighbor tree rather than least weight edge.

The algorithm proposed by Gallagher et.al and Awerbuch utilizes Tree-join-tree approach. Yao-Nan Lein [9] proposed a distributed algorithm for minimum spanning tree in light of Node-join-tree approach. This calculation is instated from single hub and there is no need for all hubs to wake up toward the start. Baala et.al [1] proposed a self - balancing distributed algorithm for spanning tree development. With a specific end goal to deal with dynamic topological changes in a system the creator influences utilization of random walks as system traversal scheme. The proposed calculation is stronger to transient disappointments that happen in network.

Due to dynamic topological changes in the mobile ad hoc network Rowstron et.al [12] proposed a virtual spanning tree in P2P network in contrast of the fixed communication infrastructure or distributed structure in wired networks. The proposed algorithm is designed in such a way that each node makes local decision and constructs a spanning tree in mobile ad hoc network. By using this algorithm the communication is optimized since flooding is avoided. Victer Paul et.al [11] In this paper they are improving the efficiency between P2P.This efficiency depends on effective communication. Communication in P2P takes place through message passing. The problem addressed here is to limit the number of message passes.

Jagadish et.al [6] proposed an adjusted tree structure for P2P network. The greatest challenge in building a successful P2P framework is in bringing together different self-ruling PCs into cohesive framework. This is done by methods for intelligent overlay organize. The Balanced Tree Overlay Network gives advantageous help to go inquiries, which can't be upheld by regular distributed hash tables.

III. CENTRALITY RANKING ALGORITHM

Given an undirected network with the set of nodes and edges as shown in fig1, the following three attributes are calculated:

A. Degree Centrality

DC is characterized as the proportion of the quantity of real edges to the greatest number of possible edges associated with node Ni, namely DCi.

DCi =di

(N − 1)⁄

International Journal of Pure and Applied Mathematics Special Issue

3144

di - Degree of node Ni. N – Number of nodes in the network.

B. Closeness Centrality

CC is defined as the reciprocal of the total length of the shortest paths from node Ni to all other nodes.

𝐶𝐶𝑖 =(𝑁 − 1)

∑ 𝑙𝑖𝑗𝑛𝑗=1

lij – Length of the shortest path from node Ni to Nj.

C. Betweeness Centrality

BC is defined as the load capacity between other nodes. It is equal to the number of shortest paths from all vertices to all other that pass through that node.

𝐵𝐶𝑖 = ∑𝜎𝑗𝑟(𝑖)

𝜎𝑗𝑟⁄

𝑖≠𝑗≠𝑟∈𝑣

𝜎𝑗𝑟(𝑖) - the number of shortest paths that travel through node Ni 𝜎𝑗𝑟 - the number of shortest paths from node Ni to node Nr in the network.

The ranking algorithm is utilized to assess the rank of items as indicated by their nearby degree to the ideal items. In the event that one protest is nearest to the positive ideal item and far from negative ideal item, it is the optimal item.

In this paper each peer in the network is an evaluation item and their rank can be evaluated by using three attributes namely degree centrality (DC), closeness centrality (CC) and betweeness centrality (BC).

Step1: Matrix of nodes based on attributes

The nodes in the network can be expressed as N={N1,N2,…….Nm}, and the set of attribute values as

F={F1,F2,F3}={DC,CC,BC}.

DCi =di

(N − 1)⁄

𝑀 = [𝑁1(𝑓1) 𝑁1(𝑓2) 𝑁1(𝑓3)

⋮ ⋮ ⋮𝑁𝑚(𝑓1) 𝑁𝑚(𝑓2) 𝑁𝑚(𝑓3)

]

Step2: Calculate the Normalized matrix

𝑁𝑀𝑖𝑗 =(𝑁𝑖(𝑓𝑖))

√∑ 𝑁𝑖(𝑓𝑖)2𝑚𝑖=1

⁄ 𝑊ℎ𝑒𝑟𝑒 𝑗 = 1,2,3

𝑁𝑊𝑖𝑗 = 𝑤𝑗 ∗ 𝑁𝑀𝑖𝑗 𝑤ℎ𝑒𝑟𝑒 𝑖 = 1,2 … . 𝑚 𝑎𝑛𝑑 𝑗 = 1,2,3

Where Wj is the preference value assigned to each centrality attribute. For simplicity, Wj is equally

International Journal of Pure and Applied Mathematics Special Issue

3145

distributed for all attributes.

Step3: Determine the positive and negative ideal solution.

The positive ideal solution P+ and negative ideal solution P- is calculated based on matrix M.

p+ = {NW(1,𝑗), NW(2,𝑗), … … … , NW(𝑚,𝑗)}

= min NW(1,𝑗) for ∀ j ∈ n

p− = {NW(1,𝑗), NW(2,𝑗), … … … , NW(𝑚,𝑗)}

= min NW(1,𝑗) for ∀ j ∈ n

Step4: The distance is calculated

The distance is calculated for ideal object P+ and P- for each evaluation node Pi.

𝐷𝑖+ = √∑(𝑁𝑊(𝑖,𝑗) − 𝑃𝑗

+)2

𝑛

𝑗=1

𝑓𝑜𝑟 𝑖 = 1,2, . . . 𝑚

𝐷𝑖− = √∑(𝑁𝑊(𝑖,𝑗) − 𝑃𝑗

−)2

𝑛

𝑗=1

𝑓𝑜𝑟 𝑖 = 1,2, . . . 𝑚

Step5: Now, the nodes are ranked in the network using equation:

𝑅𝑖 =𝐷𝑖

+

𝐷𝑖− + 𝐷𝑖

+

𝑤ℎ𝑒𝑟𝑒 𝑖 = 1,2, … … 𝑚 0 ≤ 𝑅𝑖 ≤ 1 The greater the value Ri is the most important node in the network. The ranks are allotted based on the value of Ri. If Ri=0, the node is least ranked and Pi=P-. Otherwise, then one is the most important and ranked high and Pi=P+ when Ri=1.

By ranking the nodes in the network, the data packet flooding is avoided and hence the minimization of delay can be done. Instead of sending the data packets to all the neighbor nodes in the network ,by constructing a spanning tree the data packets are sent only to the higher ranked node thus avoid flooding in the network.

IV. DISTRIBUTED NNT ALGORITHM

The Distributed Nearest Neighbor Tree Algorithm is used for constructing the spanning tree by selecting the nearest neighbor based on the rank assigned to the nodes .This connection to the nearest node is done by

International Journal of Pure and Applied Mathematics Special Issue

3146

exchanging three types of messages: explore, found and connect. The process of algorithm is as follows: Step 1: Rank selection (based on centrality rank algorithm) Step 2: Connecting to higher rank node by exchanging three types of messages:

- explore - found

- connect Step 3: Making connection and forming distributed spanning tree. Case 1: If a single node gets connection request from multiple nodes, it gets connected to the nearest node. Case 2: If the node is already been connected, it simply sends echo message. The rank selection is the initial step in the construction of distributed spanning tree. The rank selection is based on centrality ranking algorithm. In CRA the ranks are given based on three parameters degree centrality (DC), closeness centrality (CC) and betweens centrality (BC). Once the ranks are given to each node in the network, the leaders are selected based on the degree centrality in the network. The nodes with the high degree centrality are elected as leaders. After the leaders are elected, the algorithm is executed to connect to higher rank node.

The leaders in the network initiate the exploration by sending explore message to all the neighbors connected to it. Explore message carries the node id and its rank. The explore message is sent to all phase of neighbors. All the phases are synchronized. The neighbors receiving the explore message can reply with two messages namely: found and wait. The nodes which received the explore message checks whether its rank is higher, if so connection is made by sending found message. When the higher ranked node is found, connection is made by sending connect message. Otherwise wait message is sent indicating that, it is waiting for another explore message from other nodes in the network. If single nodes receives connection request from multiple nodes, it gets connected to the nearest node. If a node is already been connected, it simply sends echo message.

A. Forwarding explore Message

Each node in the network consists of unique rank. The leader node begins with broadcasting explore message for connect message. Explore message is broadcasted in phases, until it finds the node is higher rank. For example if node sends explore message to all its neighbors, it must get connected to higher ranked node such that .

B. Actions Of Orginator After Receiving Reply

The originator of the explore message is replied with any one of the following messages: found and wait.

If any reply from any node is found, node is done with exploration and make the connection. If wait message is received, it has to wait for connection request until it finds a higher ranked node.

C. Making Connection

Let j be the node with higher rank that node i found by exploration. If more than one node with higher rank then chooses the nearest node in the network. Let be the path from node i to node j. The edges in

are added in the resulting spanning tree. To add the edge in , node sends connect message to node along its path.

ALGORITHM FOR DST //This algorithm is executed simultaneously by each leader in the network. Message format is {message

International Journal of Pure and Applied Mathematics Special Issue

3147

name, sender, and other info}. The receiver is not specified while broadcasting a message. //

Broadcast (explore, i, rank info) Until (receipt of found message)

For all j, upon receipt of (explore, i, rank info) do If

Send (found, i, j) to i

Upon receipt of found message Select node j which has higher rank from senders

Send (connect, i, j) to j

V. FORMATION OF DST

In order to have a clear idea about the construction of DST, let us consider a P2P network in fig.1. Each node is a peer identified by its id.

Fig.1. P2P Network

This network consists of 19 peers each with equal capabilities. The initial step in the construction of spanning tree is rank selection. The ranks are selected based on CRA and it is shown in fig.2. The leaders are elected based on the degree centrality in the network or traffic level in the network. The leaders elected in the above network are 16, 15 and 7 as shown in fig.3.

International Journal of Pure and Applied Mathematics Special Issue

3148

Fig.2. Rank Selection

Fig.3. Leaders of the network

Fig.4. Initiating Exploration

International Journal of Pure and Applied Mathematics Special Issue

3149

Fig.5. Exploration at Second Level

Fig.6. Exploration at Third Level

Fig.7. Formation of DST

The leaders start with the broadcasting explore message to all the first level of neighbors in the network as

shown in fig.4. If a higher node is found connection is established. Likewise the explore message is

broadcasted to all the level of neighbors in the network. The exploration at second level is shown in fig.5. At

the exploration at level three shown in fig.6 all the nodes are connected and the formulation of distributed

spanning tree is done as shown in fig.7.Finally, a distributed spanning tree is formed with the leaders as the

root node.

VI. EXPERIMENTAL ANALYSIS

This segment portrays the simulation comes about done utilizing OMNetT++ simulator. A Peer system of 100 peers is associated in Fig.8 arbitrarily and the spanning tree development is done utilizing the centrality ranking algorithm. The distributed spanning tree construction using leader node is shown in fig.9.

International Journal of Pure and Applied Mathematics Special Issue

3150

Fig. 8. P2P Network Simulated in OMNeT++

Fig. 9. DST Formation

Fig. 10. .Messages required for each peer to construct DST

International Journal of Pure and Applied Mathematics Special Issue

3151

Fig. 11. Messages required for each peer to construct DST

Fig.10 demonstrates the quantity of explore message required to develop the distributed spanning tree.

Simulated distributed spanning tree the pioneers are comp04, comp18, comp36, comp54, comp55 and

comp93 and other peers are associated with these pioneers to shape the distributed spanning tree. Fig.11

demonstrates the quantity of explore messages required by each peer at an offered time to form a DST.

VII. CONCLUSION AND FUTURE WORK

We have presented a distributed spanning tree construction in a P2P network based on ranking of nodes in the network. The ranking algorithm used is centrality ranking algorithm (CRA) which is based on degree centrality, closeness centrality and betweens centrality. Using the above algorithms, the delay of transmitting the packets from one node to another is minimized. The advantage of the above work includes data packet flooding is avoided, data dissemination and the search for the data is also easy since spanning tree is constructed.

In this paper we just spotlight on the spanning tree of limiting the delay in transmitting a packet. As a matter of fact, There are additionally numerous other spanning trees, for example ,minimum diameter Spanning tree (MDST) and bounded diameter minimum spanning tree (BDMST) which can be developed utilizing this rank based distributed spanning tree algorithm. Furthermore, this rank based spanning tree construction can also be used in VANET.

REFERENCES

[1] Baala, H., Flauzac, O., Gaber, J., Bui, M., & El-ghazawi, T. ,”A self-stabilizing distributed algorithm for

spanning tree construction in wireless ad hoc networks”,2003. 63, 97–104.

[2] Dahan, S. (n.d.). “Distributed Spanning Tree Algorithms for Large Scale Traversals”.

[3] Dahan, S., Philippe, L., & Nicod, J,”The Distributed Spanning Tree Structure”2011, 1738–1751.

[4] Gallager, R. G., Humblet, P. A., & Spira, P. M..” A Distributed Algorithm for Minimum-Weight

Spanning Trees” Massachusetts Institute of Technology, 1983,5(1), 66–77.

[5] Hind, I., Stouti, E. L. M., Hibaoui, A. E. L., & Dahmani, A. L. I.,.” PROBABILISTIC DISTRIBUTED

ALGORITHM 2014, 67(3), 675–682.

[6] Jagadish, H. V, Ooi, C., Rinard, M., & Vu, Q. H. (n.d.). “BATON : A Balanced Tree Structure for Peer-

International Journal of Pure and Applied Mathematics Special Issue

3152

to-Peer Networks”.

[7] Kaushik, N. R., & Figueira, S. M.,” SPANNING TREES FOR DISTRIBUTED SEARCH IN P2P

SYSTEMS “,2004.

[8] Lachowski, R., Pellenz, M. E., Penna, M. C., & Jamhour, E. ,”An Efficient Distributed Algorithm for

Constructing Spanning”2004, 1518–1536. http://doi.org/10.3390/s150101518

[9] Lien, Y. “ A NEW NODE- JOIN-TREE DISTRIBUTED ALGORITHM FOR MINIMUM WEIGHT

SPANNING TREES”,1988, 334–340.

[10] Morillo, P., Rueda, S., Orduña, J. M., & Duato, J.,” Ensuring the performance and scalability of peer-

to-peer distributed virtual environments”, Future Generation Computer Systems,2010, 26(7), 905– 915.

http://doi.org/10.1016/j.future.2010.03.003

[11] Paul, P. V., Vengattaraman, T., & Dhavachelvan, P,”. Improving efficiency of Peer Network

Applications by formulating Distributed Spanning Tree”,2010, 813–818.

http://doi.org/10.1109/ICETET.2010.61.

[12] Rowstron, A., & Druschel, P. “ Pastry : Scalable ,decentralized object location and routing for large

scale p2p systems”,November 2001.

[13] Summary, D.” Optimal Distributed Algorithms for Minimum Weight Spanning Tree , Counting ,

Leader Election and related problems”,1983.

[14] Yilmaz, O., Demirci, S., Kaymak, Y., & Erciyes, K. (n.d.). “Synchronous Distributed Spanning Tree

Algorithm for Wireless Sensor Networks”, (156).

International Journal of Pure and Applied Mathematics Special Issue

3153

3154