Chapter 2 Survey Java for Parallel Programming In this chapter we give a general overview of related researches and systems. We start with discussion of communication approaches relevant to parallel computing. We also briefly review more contemporary Java-specific distributed computing technology and how they related to our high performance infrastructures. 2.1 Communication in Parallel Programming Communication in parallel programming significantly affects the efficiency of distributed systems. We need to find a way to move data from one local memory to another because a distributed memory system does not share one common global memory. Message passing is very suitable to this task via send/receive API calls which must be written into the application program or by some higher-level software. In this section we discuss parallel computing communication methods that include Java RMI and Message Passing libraries for Java. PVM and MPI are discussed as examples of message passing libraries. We also discuss MPJ, an effort by members of the Java Grande Forum to define a consensus MPI-like interface for Java. 2.1.1 Java RMI Java Remote Method Invocation (RMI), that is simple and powerful network object transport mechanism, provides a way for a Java program on one machine to communicate with objects residing in different address spaces. RMI is an implementation of the distributed object programming model like CORBA, but simpler, and specialized to the Java language. An overview of the RMI architecture layer is shown in figure 2.1. Among the important parts of the RMI architecture we consider the three essential parts. The three parts are the stub class, the object serialization, and the server-side “Run-time System”. The communication mechanism with remote objects used by Remote Procedure Call system is adopted by RMI is called stubs. The stub class that implements remote interface is responsible for marshaling and unmarshaling the data and managing the network connection to a server. An instance of the stub class is needed on each client. Local invocations on the stub class will be made whenever a client invokes a method on a remote object. Java has a general mechanism for converting objects into streams of bytes that can later be read back into an arbitrary JVM. This mechanism is called object serialization that is an essential functionality needed by Java’s RMI implementation. It provides a standardized way to encode all the information into a byte stream suitable for streaming to some type of network or to a file-system. In order to provide the functionality, an object must implement the Serializable interface and when an object is deserialized, the client end must have the file representing the serialized object. The server-side run-time system is responsible for listening for invocation requests on suitable IP port, and dispatching them to the proper, locally resident remote object. Since RMI is designed for Web based client-server applications over slow network, it is not suitable for high performance distributed computing environments with low latency and high bandwidth. A better serialization would be needed, since Java’s current object serialization often takes at least 25% and up to 50% of the time [?] needed for a remote invocation. 2.1.2 PVM and MPI 2.1.3 MPJ 2.2 Java-specific Distributed Computing In this section we review general parallel computing environments for Java including JavaParty and Javelin. We also discuss distributed computing technology like JINI, JMS, EJB, and JXTA. 2.2.1 JINI, JMS, EJB, and JXTA