A new converge cast algorithm: Application of ...

11 downloads 45901 Views 1MB Size Report
For returning result to calling process, a feedback function is used. ... but it allows more control on the execution of the DRW depending on the application needs.
International Journal of Digital Information and Wireless Communications (IJDIWC) 2(1): 82-85 The Society of Digital Information and Wireless Communications, 2012(ISSN 2225-658X)

A new converge cast algorithm: Application of procedural distributed recursive wave model and feedback function Ha Quoc Trung School of ICT, Hanoi University of Science and Technology. Vietnam [email protected]

Abstract— The distributed recursive wave is a programming model based on distributed procedure call, allowing distributed algorithm definition using central algorithm. For returning result to calling process, a feedback function is used. Introducing feedback function makes the DRW more complex, but it allows more control on the execution of the DRW depending on the application needs. With this solution, DRW can be applicable for collecting, not only for propaganda of information. This DRW with feedback function is applied in the case of network convergecast problem. Convergecast is one of group communication tasks in distributed systems: convergecast, broadcast, multicast and unicast. ConvergeCast algorithms allow concentrating network information for calculating of global parameters. When the Converge Cast is required, information about the network itself such as routing table, network topology is not available. Distributed recursive wave is a way to construct algorithms that can be customized only by local parameters and functions. Distributed recursive wave then is suitable for distributed systems having network information dynamically changing without global information. Convergecast can be raw information collection or aggregation, so the feedback function DRW is suitable to apply to adapt both cases. This article presents a new converge cast algorithm. This algorithm is experimentally implemented using Shell Script. Index Terms— Distributed Converge Cast, Distributed Recursive Waves

1. INTRODUCTION Converge cast is one of group communication tasks used when the communication network of distributed systems is installed or reconfigured. In this case, the global information of the system is not ready, so the protocol can only rely on the local information in each process. This feature is becoming more important for the continuously changing systems, depending on the objective and natural factors such as sensor networks and mobile networks. Distributed recursive wave is a model enabling the construction of distributed algorithms with simplicity of the recursive algorithm, and allowing customizing the implementation of recursive algorithms with local parameters. Recursive wave is based on the principle of echo, being made in two phases: forward phase and echo phase. In [1] a distributed recursive wave based broadcast algorithm uses only forward phase because of the nature of the broadcast algorithm. In [4,5] the authors have proved that distributed recursive wave is consistent in distributed systems with no global information. This article presents the analysis and design of an algorithm to collect information (forward phase and echo phase) in a distributed system with the assumption that global information (network topology) is not available. The distributed system is assumed to be asynchronous.

The paper is structured as follows: Section 1 gives the general introduction. Section 2 presents the model of distributed recursive wave and the way of analysing and designing distributed algorithms using distributed recursive wave. Section 3 presents the algorithm to collect new information. Section 4 describes the implementation of the algorithm. Finally, the conclusions are found in section 5.

2. DISTRIBUTED RECURSIVE WAVE Programmatic model of distributed recursive wave The above introduced model of distributed recursive wave allow us to design and evaluate the algorithms base on distributed recursive wave. In order to build a program implementing the algorithms, we need more programmatic model. The model is shown on

Figure 1

.

82

International Journal of Digital Information and Wireless Communications (IJDIWC) 2(1): 82-85 The Society of Digital Information and Wireless Communications, 2012(ISSN 2225-658X) 3. CONVERGECAST ALGORITHM USING DISTRIBUTED RECURSIVE WAVE

Start

Not'Visited

ID'Checking

Next'nodes' Selec1on

Post'DRW'ac1on

Post'DRW'ac1on

DRW'Execu1on

Comple1on

End

Figure 1: Programmatic Model of Distributed Recursive Wave

In this model, the collection of result can be executed at the initial node, or partly at the intermediate nodes. This possibility allows us to customize the computation of the final result: it can be done at the end on the initial node, or it can be executed partly when each node finished all outgoing calls. In this model of the distributed recursive wave, the distributed call is a function, so in the returning phase, we face a problem of collecting results. In [18] presents a feedback function for collecting results. The collection can be raw, i.e stores all results in an array. The final result is compute at the root node from all collected intermediate results. Another way is to collect information and process computation of partial results at each intermediate note, send only the results to the parent. In the general case of ConvergeCast, we don’t know which aggregate function will be process on the collected information, so we use the raw collection approach. In this article, we use the feedback function allowing customization the distribution of the computation quantity on nodes. In [19], to accelerate the processing of the distributed recursive wave, to avoid waiting, a non-blocking recursive call is used and compared with a blocking call solution. In next section, we’ll present the convergecast algorithm with feedback function. The function uses blocking call mechanism.

With the requirements stated in section 1 and the ways to design the algorithm as in section 2, the convergecast algorithm will be developed. First, the local variables of each process will be determined including: A variable NB: presenting neighborhood nodes of the node being watched. This variable can also be expanded to contain more information about the link between the current node and neighbor nodes. The value of variables can be determined locally.

Function ConvergeCast( Data, ListOfProcessID) Of List if not Visited then R=Converge(Select(Neighbo rhood)); //Raw collection Visited=True; Else Return FeedBack(R); //Aggregation possible end if; end procedure; if ProcessID==root then Visited=False; Return ConvergeCast(); end if;

Figure 2: Convergecast with feedback function

A visited variable is used to determine the status of recursive waves (finished / not finished). A variable R is used to store the results returned from the process of gathering information. This variable is only valid when the forward phase ends. Forward phase is designed according to the strategies of application. On the basis of recursive waves, there can be the following possibilities: One selection: send information to only one process. All selection: send a message to all neighbor processes. Random selection. Selection according to network data of the local process. The selection is generally expressed by a function Select. With the arguments above, information collecting algorithm is described as shown in Figure 2: Convergecast function. The presence of feedback function allows customization of computing load distribution. In case of general

83

International Journal of Digital Information and Wireless Communications (IJDIWC) 2(1): 82-85 The Society of Digital Information and Wireless Communications, 2012(ISSN 2225-658X) convergecast, the result and input dimension are almost the same, intermediate computing does not help to improve the bandwidth consummation; the feedback function will be a store-collect function. In case of aggregation convergecast, the result has a small tail, so this aggregation must be integrated in to the feedback function to decrease the data size sent. The complexity of the algorithm depends on the function Select. In case of all selection, the complexity is 𝑂(𝑑) in which 𝑑 is the diameter of the network. The function Select can be adjusted to get the implementation process more efficient, but if the ratio of the number of selected processes to all of the neighbor processes has a none-zero value as lower limits, the time complexity is still 𝑂(𝑑). 4. IMPLEMENTATION In order to implement the algorithm we can use a simulated or real environment. However, in both cases, distributed recursive calls need to be supported by the system. We need to find a distributed system that allows: Sending a script to a remote computer Activating and executing the script. For these reasons, the author has selected Shell Script and Linux operating system as execution environment. With the assumption that above actions are supported, function ConvergeCast() in Figure 2 becomes ConvergeCastImpl() with shell language as in Figure 3: Implementing ConvergeCast by Shell. #!/bin/bash if [ "$VISITED" = "YES" ]; then echo "Collected Information" cat neighbours >return.dat else for i in $(cat neighbors); do scp convergecast root@$i:~/run/convergecast ssh root@$i 'chmod +x /run/convergecast' ssh root@$i '/run/convergecast' ssh root@$i '/run/feedback' ssh root@$i 'chmod +x /run/feedback' ssh root@$i 'cat return.dat | /run/feedback' > temp.dat scp root@$i:~/run/temp.dat temp cat temp>>return.dat export VISITED = "YES" done fi

Figure 3: Implementing ConvergeCast with FeedBack by Shell

The program is installed on computers running Linux operating system, which is configured to connect together using OpenSSL without password. An overlay network is built by creating on each computer a neighbor file containing a list of addresses of neighbor nodes. This is the only information about the configuration of the system. A

return.dat file used to store returned results. The program runs correctly, as all the machines in the overlay network configurations are collected on the root machine. In experimenting this program, I have also constructed several scripts that: Accepts topology configuration text file as the input, configure the whole system conform to the topology; Accepts a shell script file as input for DRW Accepts command line option to run the algorithm with predefined number iteration, statistically compares the obtained results. The program is tested on various types of network and function. We have test on topology and max id, computation. To test that the program is correct, a single machine is used with multiple IP addresses. Another scenario is to use 5 virtual machines on a physical machine. The program is executed with 5 topologies. The running time and the correctness of the result are metrics. The results are shown on the Table 1 (for max id) and Table 2 (for topology) Table 1: Running performance for max id calculation Topology

Diameter

1 2 3 4 5

2 1 1 3 4

Number of executions 20 20 20 20 20

Correct result? Yes Yes Yes Yes Yes

App. Time (ms) 120 100 110 220 250

Table 2: Running performance for topology calculation Topology

Diameter

1 2 3 4 5

2 1 1 3 4

Number of executions 20 20 20 20 20

Correct result? Yes Yes Yes Yes Yes

App. Time (ms) 130 105 120 225 250

Unfortunately, we are not able to run the algorithm on a larger system, so the result can show only that the algorithm is correct. In addition, timing of the OpenSSL activities influence strongly on. We hope that in the future we’ll be able to experiment this algorithm on a simulation environment such as Planet-Lab or G-Lab, so that the results will be more persuasive. 5. CONCLUSIONS The article has presented the model of distributed recursive waves and how to design and analyze a distributed algorithm based on distributed recursive wave. A new ConvergeCast algorithm based on distributed recursive wave has been presented. The complexity of the algorithm does not change in comparison with other algorithms, but the

84

International Journal of Digital Information and Wireless Communications (IJDIWC) 2(1): 82-85 The Society of Digital Information and Wireless Communications, 2012(ISSN 2225-658X) distributed recursive wave allows customizing the broadcast process to get effect suitable with the communication infrastructure. The algorithm has been installed on Linux using Shell Script and satisfies the requirements of ConvergeCast algorithm. The program can be applied to solve many problems, such as network routing, network management and network monitoring. The required condition is to have the equipment to support Shell in overlay networks. Based on distributed recursive wave, algorithms can be developed for environments more complex than distributed system, with error conditions, more severe operating conditions of the devices. ACKNOWLEDGEMENT This work was supported by grant B2012-01-30 from Ministry of Training and Education of Vietnam [1]

[2]

[3]

[4]

[5]

[6]

[7]

[8]

REFERENCES Trung Ha Quoc, MarcBui, Distributed recursive waves, Proceeding of 2nd National conference “Research, Development, Application of Information and Communication Technology” ICT.rda’06, 2006. Trung Ha Quoc, New broadcast protocol using distributed recursive wave, 5th South East Asian Technical University Consortium Symposium Proceeding, 3-2011 Implementation of Broadcast and Global Combine Operations Using the Postal Model [Journal] // IEEE Trans. Parallel Distrib. Syst.. - 1996. - 3: Vol. 7. - pp. 256-265. Cachin Christian [et al.], Secure and efficient asynchronous broadcast protocols (Extended Abstract). [s.l.] : Springer, 2001. - pp. 524-541. Chang E, Echo algorithms: depth parallel operations on general graphs, IEEE Transaction on Software. Engineering, 1982. No 4 : Vol. 8. Florin G. and Lavallée I., La récursivité mode de programmation distribuée, Rapport de Recherche, INRIA. 1991 (in french). Florin G., Gomez C. R. and Lavallée I. Recursive distributed programming schemes, Proceedings. ISADS 93., International Symposium on Autonomous Decentralized Systems- 1993. Humblet Pierre A. and Soloway Stuart R., Topology Broadcast Algorithms, Computer Networks and ISDN Systems. 1987. Vol. 16. pp. 179-186.

[9]

[10]

[11]

[12]

[13]

[14]

[15]

[16] [17]

[18]

[19]

[20]

Johnsson S. Lennart and Ho Ching-Tien, Optimum Broadcasting and Personalized Communication in Hypercube. IEEE Trans. Computers. 1989-9 : Vol. 38. pp. 1249-1268. Kaashoek M. Frans [et al.], An Efficient Reliable Broadcast Protocol, Operating system review,1989. Vol. 23. pp. 5-19. Lavallée Ivan, Bui Marc and Quoc Trung Ha, An Efficient All pair Shortest Path Algorithm, Proceedings of 2nd RIVF International Conference on Computing and Communication Technologies, 2004. pp. 211-214. Massoulie Laurent [et al.] Randomized decentralized broadcasting algorithms, INFOCOM 2007. 26th IEEE International Conference on Computer Communications. IEEE, 2007. Nguyen Duc Kien [et al.] A General Scalable Parallelizing of Strassen's Algorithm for Matrix Multiplication on Distributed Memory Computers, IEEE Computer Society, 2005. - pp. 294-299. Omez Duchien Florin, The Wave Algorithms as a SelfStabilizing Control Structure, Technical report, CNAMCEDTRIC, 1996. Pawlak Renaud [et al.] A Reflective Implementation of a Distributed Programming Model, Coordination and Composition: The Two Paradigms Underlying AOP ?, Springer 1998. - pp. 384-385. Pawlak Renaud, Metaobject Protocols For Distributed Programming, DEA internship report, 1998. Stoica Ion [et al.], Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications. Proceeding of SIGCOMM '01 Proceedings of the 2001 conference on Applications, technologies, architectures, and protocols for computer communications, 2001. pp. 149-160. Ha Quoc Trung, A solution for returned results in distributed recursive wave. Journal of science & technology (ISSN 0868-3980), 2012, pp. 60-65 Hoang Hong Ngoc, Ha Quoc Trung, A New Algorithm for Network Topology Determination using Distributed Recursive Wave, Proceedings of International Conference on Convergence and Hybrid Information Technology- ICHIT 2012 (LNCS, Springer) ISBN 9783-642-32691-2, Korea, pp. 23-31. Ha Quoc Trung. From distributed recursive wave to new converge cast algorithm, Proceedings of The International Conference on Informatics & Applications, ICIA2012, (ISBN 978-0-9853483-0-4), Malaysia, 2012, pp. 474-477

85

Suggest Documents