
25c32a8deec3d4486ccd8d1ea92ac001.ppt
- Количество слайдов: 22
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co – Java Distributed Computing for Workstations Using Chedar Peer-to-Peer Middleware Presentation for 7 th International Workshop on Javatm for Parallel and Distributed Computing (IWJPDC 2005) 4. 4. 2005 Mikko Vapa, research student Department of Mathematical Information Technology University of Jyväskylä, Finland http: //tisu. it. jyu. fi/cheesefactory With co-authors Niko Kotilainen, Matthieu Weber, Joni Töyrylä and Jarkko Vuori 2005
UNIVERSITY OF JYVÄSKYLÄ Overview • This paper introduces Peer-to-Peer Distributed Computing (P 2 PDis. Co) software providing interface for distributing the computation of Java programs to multiple workstations • P 2 PDis. Co has been built over Chedar peer-to-peer middleware • Currently, P 2 PDis. Co is being used for speeding up the training of neural networks with evolutionary algorithm 2005
UNIVERSITY OF JYVÄSKYLÄ Peer-to-Peer Networks • Peer-to-Peer (P 2 P) networks allow sharing of resources (e. g. , computing power, storage space, network bandwidth, printers) over the Internet • In contrast to clusters, in P 2 P networks all the tasks and responsibilities for managing the network are shared between peers – This means that there exists no single control entity responsible for providing the services • Because P 2 P networks do not require a dedicated hardware, distributing computation among workstations is usually a costeffective solution 2005
UNIVERSITY OF JYVÄSKYLÄ Related Work • There are many alternatives for distributing computing using Java programming language – Programming language independent distributed computing tools such as Globus Toolkit with Java Commodity Grid Kit – Programming language dependent Java distributed computing software: • Java extensions requiring changes to Java compiler and/or Java Virtual Machine (JVM) – Java. Party as an example • Java libraries providing special class libraries without a need for modifications to the Java compiler or JVM – Java. Symphony and P 2 PDis. Co as examples 2005
UNIVERSITY OF JYVÄSKYLÄ Related Work • Many of these distribution tools have some centralized components in them: – Globus uses centralized indexes for resource discovery whereas in P 2 PDis. Co the resource discovery is decentralized and provided by the Chedar peer-to-peer network – In Java. Symphony all the computing resources are centrally configured under JS-Shell whereas in P 2 PDis. Co no central management exists • There also some implementations of Java distributed computing that use peer-to-peer network for locating resources – An example of such system is GT-P 2 PRMI allowing Remote Method Invocation (RMI) bindings and lookups to be executed via a modified RMIRegistry called P 2 PRMIRegistry 2005
UNIVERSITY OF JYVÄSKYLÄ Chedar P 2 P Middleware • Chedar (CHEap Distributed Architecture) is peer-to-peer middleware designed for the needs of peer-to-peer applications • Chedar constructs a pure peer-to-peer network using topology management algorithms and provides functionalities for locating resources in the network • Implementation of Chedar is based on Java Standard Edition, thus providing platform independency and easy adaptation to different hardware 2005
UNIVERSITY OF JYVÄSKYLÄ Chedar P 2 P Middleware • Each Chedar node maintains a database of locally available resources for example information about which applications are running on the device or what files are located in the node • Resources can contain meta-information about themselves for example the version number for applications and last modification date for files • Resource database is stored as an XML document using a specific Document Type Definition (DTD) • This organization of data allows making rich and complex queries to the database in the form of XPath expressions 2005
UNIVERSITY OF JYVÄSKYLÄ Chedar P 2 P Middleware • Chedar node keeps a list of neighbors it is connected to through TCP sockets – TCP provides reliable data delivery and the disappearance of a neighbor can be detected with TCP timeout • The neighbor list is updated based on heuristics such as number of relayed query replies and the actual query replies provided by the neighbor to form an efficient topology for resource discovery • As a search mechanism we currently use Breadth-First Search (BFS) algorithm, which scales to small network sizes and guarantees to locate all resources in the network – In our experiments, the query traffic in the network of 200 workstations with 100 Mb/s Ethernet connections has not yet posed a significant problem and therefore a more efficient version of the query algorithm has not been implemented 2005
UNIVERSITY OF JYVÄSKYLÄ Chedar P 2 P Middleware • Each query contains a Message-ID and a query XPath description • Whenever a query enters a Chedar node, the node checks its resource database for matching resources to XPath expression and if resource is found, a reply message is sent back using the route, which the query came from • To properly relay the reply message back to the query originator, the message needs to contain the same Message-ID as the query had • For communicating between two peers, Chedar provides a pointto-point communication protocol allowing basic message passing primitives to be executed by P 2 P applications • The protocol uses the same path as the reply message to deliver messages between peers 2005
UNIVERSITY OF JYVÄSKYLÄ Peer-to-Peer Distributed Computing • Problem – Evolving neural networks in a simulator needs a lot of computing power – One computer is not enough for many research cases • Solution – Distribute computation across desktop computers all over the University of Jyväskylä – It has to be as invisible as possible to the user of the network simulator – The simulator should not interfere with the desktop use of the distributed computers • As a solution Peer-to-Peer Distributed Computing (P 2 PDis. Co) was developed on top of Chedar 2005
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture • The node that wants to distribute its computation (denoted as master) needs to query resources, receive query replies and send data (parameters) for the computation • The node that offers computation time has to implement Distributed interface to be able to receive start, stop and is application running signals • Reading of parameters and writing of results are done for the streams offered by P 2 PDis. Co 2005
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture Chedar node Master Chedar node 2005 Chedar node
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture Chedar node Master Chedar node 2005 Chedar node
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture y er u Chedar node Q Query Master Chedar node Query: who has the resource ”Net. Simulator” available? 2005
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture Reply e Chedar node R Reply Master Chedar node Reply: I do! 2005 Chedar node
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture Task k Chedar node s Ta Task Master Chedar node 2005 Chedar node
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture Chedar node Master Chedar node Computation… 2005 Chedar node
UNIVERSITY OF JYVÄSKYLÄ P 2 PDis. Co - Architecture Result s Chedar node Re Result Master Chedar node Results are sent back to the master node. Calculation ends and everybody is happy. 2005
UNIVERSITY OF JYVÄSKYLÄ What happens inside a Chedar node starts the distributed application, hijacking its file operations. Distributed program Task Chedar Result Any Java program that uses files to read input and store output can be distributed 2005
UNIVERSITY OF JYVÄSKYLÄ Security Concerns • Because of security concerns the distributed application has been beforehand installed to the computers and it is not automatically delivered during the task distribution • In the task distribution only the execution parameters i. e. configuration files are transferred • Also, currently the IP addresses of master nodes are restricted such that only certain IP addresses are allowed to start computations 2005
UNIVERSITY OF JYVÄSKYLÄ Future Work • At this time P 2 PDis. Co is just a tool for our research project to speed up the computations of Neuro. Search neural network resource discovery algorithm • Possible improvements – Checkpointing of computation such that if connection is lost the computation can be resumed from the same point – Master could leave the network and gather results afterwards – Extending API of P 2 PDis. Co to allow direct communication between computing nodes, which makes it possible to parallelize the evolutionary algorithm for multiple computers with other architectures than master-slave, such as the panmictic model commonly used for parallelization of evolutionary algorithms 2005
UNIVERSITY OF JYVÄSKYLÄ Thank You! Any questions? 2005