Version 2 (modified by hauma, 15 years ago) (diff)

Added navigation bar macro.

JavaParty as high-performance RMI server in three tier architecture


The concept of a JavaParty RMI server application is described in ticket:224. A proof of concept implementation is provided by the classes PartyWorker, PartyServer, and PartyClient in the package jp.lang.


The PartyWorker is a "regular" JavaParty transparent remote class. It is compiled with the JavaParty compiler. Its instances are created within the distributed JavaParty environment. The sum of all PartyWorker instances build up the compute tier of the tree tier application. An instance of PartyWorker offers a public method party(). The goal is to call the party() method of a PartyWorker object from an external RMI application, while the JavaParty environment internally communicates using wiki:KaRMI remote method calls.


The PartyServer builds the middle tier, moderating between the RMI clients and the JavaParty runtime environment. The PartyServer operates as front-end on a separate machine outside the compute cluster. The PartyServer itself is a RMI server application that can be contacted by clients using regular RMI. It offers the remote method gotoParty(), which implements a regular RMI remote interface PartyServer_intf. Upon startup, the PartyServer contacts a running JavaParty environment and forwards compute requests sent by client applications to cluster nodes. The PartyServer is compiled after the PartyWorker class using the regular javac compiler.

In the demo application, the PartyServer creates a new PartyWorker for each call to gotoParty() and calls the party() method on this remote worker object. To implement the PartyServer, some details of the JavaParty transformation and the KaRMI internal structures must be known. This is the fact, because for cummunication with the JavaParty-remote PartyWorker object, the JavaParty transparent handles cannot be used, because the PartyServer runs outside the distributed environment. Therefore, remote object creation (within the distributed environment) must simulate the JavaParty transformation by hand.


The PartyClient is a regular RMI client application. After startup, it looks up the PartyServer object and calls its gotoParty() method. This call is transfered through regular RMI to the PartyServer object, which "transforms" the call into a remote KaRMI call of party() on a newly created JavaParty-remote PartyWorker object.