\subsection{The Mersenne Prime Application}

As an interesting application for our Javelin infrastructure, we implement
a parallel primality test which is used to search for prime numbers.
As we shall see, this type of application is well suited to  
Javelin, since it is very coarse-grained, with  a high computation-to-%
communication ratio, when testing large Mersenne primes.

A Mersenne prime is a prime number of the form $2^p - 1$, where the exponent
$p$ itself is prime.  
Discovery of prime numbers was at one time relegated
to the  domain of mathematicians working in number theory, but the
advent of the computer provided a powerful tool to search and
verify Mersenne primes.  
Beginning in the 1952, with the discovery of the
13th Mersenne prime by Raphael M. Robinson\cite{rmr54}, all subsequent Mersenne primes
have been found by computer.  To date, only 35 Mersenne primes 
have been discovered.  With larger and larger prime exponents, the search
for Mersenee primes becomes progressively more difficult.

In our current implementation, we developed a Java application to test
for Mersenne primality, given a range of prime numbers.  Our application
works as follows:
\begin{enumerate}
\item 
First, the client submits to the broker an applet containing the Mersenne
primality test and a servlet that coordinates the range of numbers to 
be checked.

\item
The broker running the servlet waits for hosts to participate in the
Mersenne prime test.  It maintains a FIFO of primes to be checked, parceling
them out among the hosts that join in the computation.

\item
When a user registers with a broker, the host daemon downloads the Mersenne
Applet to the host site and executes the applet.  The applet then contacts the 
broker to obtain a prime exponent $p$ to check if the resulting Mersenne 
$2^p - 1$ is prime.

\item
After the host applet has completed its computation, it reports the result
to the broker.  The broker marks whether the prime exponent $p$ that 
the host has tested corresponds to a Mersenne prime.  The host then asks for
the next prime to test, and the broker dispenses subsequent primes until the FIFO
is empty.
\end{enumerate}

\input{measurements}


