\section{Implementation of {\kfserver}}
\label{sec-kfserver}

{\kfserver} provides the core functionalities needed to allow
initiators to execute anywhere on a network.  In particular, it serves
an initial HTML page containing an applet tag, which implicitly
results in additional requests for the applet classes which are served
as needed.

{\kfserver} is implemented by the {\tt KF\_Server} class.  Any
stand-alone application, such as an initiator, can instantiate a {\tt
KF\_Server} object to use its services.  {\tt KF\_Server}'s
constructor takes the name of the applet class (i.e., partner) to be
included in the initial HTML page, creates a server socket, and
listens for HTTP requests.  An HTTP request for a Java applet class
results in asking the underlying Java Virtual Machine for the
requested class and returning the corresponding byte-code.

\kf{} also provides a specialized implementation of {\tt KF\_Server} which
integrates {\kfdirectory}.  In what follows, this implementation is
used as an underlying layer for a parallel programming environment.

\subsection{{\kfserver} and Parallel Programming Systems}
\label{ssec-parallel}

We chose the \emph{Charlotte}~\cite{bkkw96} system to evaluate the
infrastructure provided by  {\kf}.  Charlotte is a parallel
programming environment which provides features analogous to
distributed threads and shared memory abstractions.  The two main
components in a Charlotte program are: a {\em manager} (i.e.,
initiator) and one or more {\em workers} (i.e., partners).  The
manager process creates an entry in a well-known HTML page at
initialization.  Users can load and execute the worker code by
directing their browsers to this URL.

Charlotte requires that a manager runs on a host with an HTTP server
to enable communication between manager and workers.  With only six
lines of code, \kf{} permits such a manager to be started on any host
and to register itself with the \kfdirectory{}, allowing clients to
find Charlotte applications easily.  If only one machine with an HTTP
server is available (a common setup), multiple Charlotte managers no
longer need to run on this single machine, but they can be started on
arbitrary machines (see Figure~\ref{fig-charlotte}).


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "paper"
%%% End: 
