\section{Faster Remote Method Invocation}

Good latency times and high bandwidths are essential for distributed
and parallel programs. However, the remote method invocation (RMI) of
common Java distributions is too slow for high performance
applications, since RMI was developed for wide area networks, builds
upon the slow object serialization, and does not support any high
speed networks. With regular Java, a remote method invocation takes
milliseconds -- concrete times depend on the number and the types of
arguments.  A third of that time is needed for the RMI itself, a third
for the serialization of the arguments (their transformation into a
machine-independent byte representation), and a third for the data
transfer (TCP/IP-Ethernet).

In order to achieve a fast remote method invocation, work must be done
at all levels. This means that one needs a fast RMI implementation, a
fast serialization, and the possibility of using communication hardware
that does not employ TCP/IP protocols.

Within the framework of the JavaParty Project at the University of
Karlsruhe \cite{JavaParty}, all three of these requirements were
attacked to create the fastest (pure) Java implementation of a remote
method invocation.  On a cluster of DEC-Alpha computers connected by
Myrinet, called ParaStation, currently a remote method invocation
takes about 80 $\mu$s although it is completely implemented in
Java.\footnote{Of course, the connection of the card driver was not
realized in Java.}  Figure~\ref{rmibench} shows, that for benchmark
programs 96\% of the time can be saved, if the UKA serialization, the
high-speed RMI (KaRMI), and the faster communication hardware is
used. The central ideas of the optimization will be highlighted in the
next sections.

\begin{figure}[htb]
\centerline{\psfig{figure=all.ps,scale=95}}
\caption{ The bottom three box plots each show 2$\cdot$64 measured
results for diverse benchmarks (64 points represent Ethernet on PC, 64
stand for FastEthernet on Alpha). The first (bottom-most) box plot
shows the run-time improvement that was achieved with regular RMI and
the UKA serialization. The second box plot shows the improvement that
KaRMI achieves when used with Java's regular serialization.  The third
box plot shows the combined effect. The top line demonstrates what
happens, if Myrinet cards are used in addition to the UKA
serialization and KaRMI (64 measured results). }
\label{rmibench}
\end{figure}
