\documentclass[12pt]{article}
\usepackage{a4}
\pagestyle{headings}
% Do nice paragraph formatting
%\addtolength{\parskip}{\baselineskip}
%\setlength{\parindent}{0pt}

\begin{document}

% setup title page to keep CL happy
\addtolength{\topmargin}{-3cm}
\addtolength{\textwidth}{3cm}
\begin{titlepage}
\begin{flushright}
	Nathan Dimmock \\
	Jesus College, Cambridge \\
	ned21@cam.ac.uk
\end{flushright}
\vspace{5cm}
\begin{Large}
\begin{center}
	Part II Computer Science Tripos Project Proposal \\
	\textbf{Distributed Instant Messaging Server (DIMS)}\\
	\today
\end{center}
\end{Large}

\vspace{2cm}
\begin{center}
\begin{tabular}{rl}
\textbf{Project Originator:} & Nathan Dimmock \\
\textbf{Signature:} & \\[24pt]
\textbf{Project Supervisor:} & Dr. David Ingram (\texttt{dmi1000@cam.ac.uk}) \\
\textbf{Signature:} & \\[24pt]
\textbf{Director of Studies:} & Dr. Jean Bacon (\texttt{jean.bacon@cl.cam.ac.uk}) \\
\textbf{Signature:} & \\[24pt]
\textbf{Overseers:} & William Clocksin and Frank King \\
\end{tabular}
\end{center}
\end{titlepage}
% reset to normal
\addtolength{\topmargin}{3cm}
\addtolength{\textwidth}{-3cm}

\section{Introduction}
Instant messaging(IM) is an increasingly popular method of
communicating via the internet.  The most popular application in this
area is ICQ, which unfortunately has a number of problems.  The
biggest of these is that although the majority of communication
between users is peer-to-peer, you can only communicate if you are
logged into a server situated in the USA.  This results in substantial
transatlantic network traffic, and if the transatlantic link goes
down, local users are unable to communicate.

My project would be to design and implement an IM system (client and
server programs) that supports multiple distributed servers and a
better security model than the one used by ICQ.

\subsection*{Overview of Operation}
A user has an account on the system.  They use the client program to
connect to a known server which stores their personal details
(username, password, birthday, etc) and a list of people they know.
At login the client receives the list of people the user knows and the
status(online, busy, offline, etc) of each one.  The user can then use the
client to update their status, or send messages to people they know.
Messages are sent directly to the recipient's client if they
are connected, otherwise they are stored on the server until they connect.
When the user receives a message, they are alerted via a sound or
screen event. The server should also offer a directory service to
allow users to locate other people and add them to their ``Contact List''.  

As part of the initial login, the client should also receive a list of
other servers that are available.  The client should then seamlessly
change it's connection to the ``best'' server.  Other users known to
that user might not be logged into the same server but this should be
transparent to the user.  

\subsection*{Failure}
In the event (for whatever reason) that the connection to the server
the client is logged into should go down, then the client should pick
the next best server and the user should not notice any
interruption.  

\subsection*{Security}
With ICQ you can easily ``spoof'' messages from other users, and all
information is sent in the clear.  While encrypted messaging would be
a nice extension to the project, the system would include basic
authentication to prevent people you do not like adding you to their
``Contact List''.

On the server side, ideally I would like a system without any central
control or administration (as this would compromise the reliability I
am striving to obtain), like FreeNet.  The theory is that anyone
should be able to run a server, but the information must be secured
against the ``owner'' of a server.  A possible method of doing this
would be to use encryption techniques to make the information
unreadable by the owner and a checksum to make sure that they cannot
delete the information blindly and have that deletion propagate
across the network, thereby removing a user from the system.

\subsection*{The server}
Essentially this will be a multi-node, fully replicated database of
users, storing their personal details and their status. The key here
is reliability of service - I could use a partially replicated system
but then reliability might be compromised if network links
failed. Since only a small amount of information is being passed
around for each user, scalability should not be a problem.

\section{Work to be undertaken}
This project has the following main sections:
\begin{enumerate}
\item Development of a suitable protocol suite for instant messaging.
Protocols will be required for client to client, client to
server and server to server communications. 
\item Familiarisation with C++ and the TCP/IP protocol, to allow me to
develop the client and server programs.
\item Development and testing of command-line client and server
programs.  Key issues here will be:
\begin{itemize}
	\item synchronising events in the network (vector clocks will probably
	be required);
	\item handling network partitions and subsequent reconnection;
	\item the most efficient and reliable way of linking servers
	together (peer-to-peer versus a hierarchy);
	\item the client will choose the ``best'' server - this will
	be a trade off between the one that gives the fastest response
	time (network delay, load on server) and the one that the
	majority of a user's ``friends'' are logged into (since this
	reduces any lag in updates as it propagates round the
	servers).
\end{itemize}
\item Writing the dissertation.
\end{enumerate}

\subsection*{Extensions}
I would like to include the following extensions in my project, if time permits.
\begin{itemize}
\item Encrypted messaging
\item A GUI for the client (using Qt graphics)
\item Additional message types for the client (e.g. file-transfer and
real time chat).
\item Grouping of people on your contact list with the ability to send
each one a different status message.
\end{itemize}

\section{Resources}
No special resources are required for this project.

\section{Starting Point}
I have a fairly good knowledge of object-orientated programming from
the CST Java courses.  Over the summer vacation I started to learn C++
but have not developed anything more than very simplistic programs in
it.  Although several IM projects exist (jabber.org and licq.org), I
am not building on any of the work they have done.

\section{Timetable}
% Do nice paragraph formatting
%\addtolength{\parskip}{\baselineskip}
%\setlength{\parindent}{0pt}
\begin{tabular}{r@{ - }p{0.75\textwidth}}
\emph{20/10/00} & Project proposal deadline. \vspace{12pt}\\

\emph{03/11/00} & Learn and practice with C++ and TCP/IP.\\
\emph{Deliverables} & Some simple C++ programs, such as reading and
writing to a file of names and addresses and passing of simple data
over the network. \vspace{12pt} \\ 

\emph{17/11/00} & Write specification. \\
\emph{Deliverables} & A detailed plan of how the system will be implemented,
including protocols, algorithms and interfaces between modules. \vspace{12pt} \\ 

\emph{01/12/00} & Write test plans, test data and test harnesses.\\
\emph{Deliverables} & Test plans, data and some programs to act as as
test harnesses.  \vspace{12pt} \\ 

\emph{08/12/00} & Holiday?!\\

\emph{22/12/00} & First stage (of three) of main coding and testing.\\

\emph{05/01/01} & Christmas and New Year.  (Tripos reading/revision)\\

\emph{02/02/01} & Main coding and testing.\\
\emph{Deliverables} & A working client and server application with all
the basic functionality mentioned above. \vspace{12pt} \\ 

\emph{09/02/01} & Progress report to overseers \\

\emph{09/03/01} & Coding and testing of extensions. \\
\emph{Deliverables} &  A working client and server with some or all of
the extensions mentioned above. \vspace{12pt} \\ 

\emph{20/04/01} & Write dissertation \\
\emph{Deliverables} & A dissertation that is ready to be proof read by
my supervisor and DoS. \vspace{12pt} \\ 
\end{tabular}

If all goes according to plan, this timetable will mean my
dissertation is finished by the time I return to Cambridge for the
start of Easter term.
\end{document}

