% Introduction chapter

\svnInfo $Id$

\chapter{Introduction}

Peer-to-peer systems have become very popular in the last few years. They allow
users to share resources (such as calculation power or information) in a
distributed and decentralized way. Peer-to-peer (henceforth called \ptp)
technology firmly differs from the client-server model which relies on one
central server fulfilling all tasks for the clients whereas in a \ptp{} system
every participant is considered equivalent. \cite{p2p} gives a good overview
of \ptp{} based on the most important systems and summarizes the key concepts.

In \ptp{} applications, we often want to perform the same tasks like discovering
other peers, sending and propagating messages and sharing information. While
many \ptp{} applications implement their own solutions, there also exist
frameworks which provide a simple API for most of these common tasks.

\section{Mission}

Unfortunately for the Eiffel programming language, there was no such framework.
This master thesis fills that gap and implements an existing framework: JXTA.
We call our library \vampeer\@.

The main purpose of our implementation is to have a \ptp{} library available in
Eiffel so that it can be used in Origo, a new software development platform by
Till Bay. The Origo platform is a distributed and very modular as well as an
extendable system integrating the usual facilities like version control, bug
tracking and project web hosting together with a single sign-on
solution\footnote{\emph{Single sign-on} is an authentication technique allowing
a user to authenticate once in order to gain access to several resources.}. It
will use our \ptp{} library so that the various modules, each residing on
another peer, may seamlessly communicate with each other.

Chapter~\ref{ch:origo} gives a more detailed introduction to Origo. For now, we
would like to point out that we only supply the \ptp{} library but do not
integrate it into Origo. Our library is generic in so far as it can be used for
many purposes and is not coupled to the Origo platform with respect to the code.
But still, our long term goal is to satisfy Origo's networking needs with a
library.

JXTA is an open source \ptp{} framework created by Sun Microsystems
\cite{jxta_platform}. It is one of the most mature platforms in its field. JXTA
(pronounced \emph{juxta}) is composed of several modules each implementing a
JXTA protocol (for example the discovery protocol). The protocols are heavily
based on XML.

\section{Related work}

In Eiffel, there is currently no \ptp{} library available. As far as we know, we
are the first building such a library. Fortunately, there is a number of general
networking libraries so that we do not have to start from scratch.

The decision to use JXTA was quite simple since it is the only platform
independent framework. This gives us the advantage to port it to Eiffel and
to be compatible with other implementations. While the reference implementation
is written in Java JSE, there also exist other bindings written in C, JXME and
others. Most of the other smaller bindings are not yet ready to use.

Probably one of the most alike project is called \emph{Jini}. It is unsuited
for our purpose since it only runs on Java. Furthermore, it uses a central
server to locate network services in contrary to JXTA which follows a completely
decentralized \ptp{} model.

There is also another framework named \emph{OogP2P} but since it is a simple
study project and unmaintained since several years, we did not have a closer
look at it.

Besides frameworks, there are plenty of \ptp{} networks defining a full protocol
for sharing content (for example \emph{GnuNet}). Research projects such as
\emph{Chord} usually provide special algorithms for a distributed hash table.
These projects do not meet our demands since they focus too much on sharing
information and lookup algorithms instead of more general \ptp{} facilities.

We therefore build an Eiffel binding for JXTA because it gets used more and more
in today's applications (for example \emph{Collanos Workplace}). A short
overview of the mentioned \ptp{} frameworks and protocols is available at the
\vampeer's website\footnote{The project is hosted on Origo at:
\texttt{\url{http://origo.ethz.ch/index.php/VamPeer}}}.

\section{Chapter overview}

We now proceed to present our new library dealing with the following topics:

Chapter~2 introduces the JXTA protocols we are dealing with and explains JXTA's
key concepts. In chapter~\ref{ch:design}, we analyze the requirements for Origo
and then define how we designed our library to comply with the JXTA standard.
Chapter~\ref{ch:implementation} deals with the implementation and demonstrates
how we mastered the challenges. The subsequent chapter~\ref{ch:usage} lists the
\vampeer's possibilities and explains the library API based on some examples. A
larger example is shown in chapter~\ref{ch:origo} where we demonstrate how
messaging could be done in Origo.  Chapter~\ref{ch:results} covers the
results of our work and its performance. We finally conclude with
chapter~\ref{ch:conclusions} where we will have an outlook to future work.
