
Assignment
==========

Introduction and purpose
------------------------

This is the first assignment for the Telemetric course at the University of
Amsterdam. The assignment is to create a chat server and client according to a given
protocol. This protocol is specifically designed for this assignment and is
explained in detail in the "protocol" section.

Besides designing a chat system according to the given protocol, the server of
the chat system should be able to handle multiple clients at once. Optionally, a
graphical user interface can be used to control the client, as long as the
client runs on the Linux machines of the university.

Concept of the application
--------------------------

Given the constraints of the assignment, we designed a chat system with an
intuitive user interface used in the client and a scalable server to serve the
clients. We did not design a GUI for the server intentionally, since a server
should be able to run headless; server log files are all you need.

We chose to create a text-based interface instead of a graphical user interface
for the chat client. It is not explicitly mentioned in the assignment that the
user interface should be graphical or text-based (since there is no interface
mentioned at all). It only states it is optional to make the client "graphical".
Especially, if you run the chat client on a remote server, it is more efficient
to use a text-based interface. Running the chat client on a remote server will
allow the user to stay logged in to the chat channel and receive all messages,
while the user can turn off his computer during the night. This construction of
a remote client is also known as a *daemon* and is inspired by and largely used
in combination with the IRC [1]_ client irssi [2]_.

.. [1] Internet Relay Chat.
.. [2] Irssi chat client: http://irssi.org/.

Even though both authors of this chat system use Linux, we chose to create a
cross-platform application. Besides platform independence, we wanted to create a
robust and flexible chat system. Python is a language that suits these
requirements. We used the python bindings of *curses* [3]_ to implement the
text-based user interface of the client.

.. [3] curses -- Terminal handling for character-cell displays:
   http://docs.python.org/library/curses.html.

Protocol specification
----------------------

The instructions of this assignment required that the client and server should
communicate according to a given protocol. Because the protocol [4]_ is already
described clearly, we did not add it to this report.

.. [4] Client / server protocol:
    http://staff.science.uva.nl/~mlankamp/2011/Telematica/protocol.desc


