JavaParty Logo

JavaParty

A distributed companion to Java
Current release 1.9.5

Bernhard Haumacher, Thomas Moschny and Michael Philippsen

Contents
General
 Features
 Requirements
 DownloadNew!
 Mailing ListsNew!
 Setup
 Quick Tour
 Command Reference
 API
Language
 Syntax
 Object Model
 Transparent Threads
 Distributed ThreadsCool!
 RMACool!
 Synchronization
displayed pageObject Location
 Migration
 Remote Threads
 Replicated ObjectsCool!
 Multi-Application
Tuning
 Debugging
 uka.transport
 KaRMICool!
 KaRMI API
 Myrinet/GM
 OpenPBS
Examples
 Hello JavaParty
 ObjectModel
 BenchmarksNew!
Other info
 Papers
 Trouble Shooting
 History


See also
 CJ
 Generic Java


Powered by
Apache Ant
SourceForge
Subversion

Object Location

An object layout with good locality is critical for a JavaParty application to achieve good performance. The initial location of a remote object allocated with the new statement is determined in one of the following ways:

  1. If the programmer does not care about object placement, it is determined by a distributor class that may be specified when executing the JavaParty application. For detailed information about the distributor objects please refer to the JavaParty API documentation.

    Because the concept of object and class distributors does not require the mixing of application code with distribution code, this approach is very attractive. The application continues to look like regular non-distributed Java and the allocation decisions are made transparent to the application code by the runtime system. Unfortunately, the information that can be passed to the distributor object only consists of the name of the class that is instantiated and may not suffice to make a well-informed decision.

  2. The object layout can also be specified directly at the statement where the allocation occurs. JavaPary uses a program annotation in form of a Java documentation comment specifying the node of the object to be allocated with the tag @at.

    The following code snippet allocates an object of remote class R on each node of the distributed environment.

    import jp.lang.DistributedRuntime;
    
    public void foo() {
       int cnt = DistributedRuntime.getMachineCnt();
       for (int n = 0; n < cnt; n++) {
          /** @at n */
          R r = new R();
       }
    }
    

Since good object locality is important, please also read the sections about Object migration and Remote Threads.


For comments and bug reports please use the JavaParty users mailing list.
Page design & maintenance: Bernhard Haumacher.
Last update: Fri Mar 30 18:46:00 GMT+01:00 2007
Java is a trademark of Sun Microsystems.