report - described the commander-server interaction
authorAdriana Draghici <adriana008@gmail.com>
Thu, 11 Feb 2010 17:15:37 +0000 (19:15 +0200)
committerAdriana Draghici <adriana008@gmail.com>
Thu, 11 Feb 2010 17:15:37 +0000 (19:15 +0200)
report/test.tex
report/test/comm.tex [new file with mode: 0644]
report/test/server.tex

index c3ac8f9..256f79b 100644 (file)
@@ -2,12 +2,41 @@
 We emphasize the disadvantages (not scalable)
 \subsection{The new infrastructure}
 
+The new testing infrastructure is implemented as a client-server architecture, in which the 
+Commander application start the Server application and then acts as a client requesting the Server to start BitTorrent clients.
+This system is described in figure \ref{fig:test-arch}.\\
+
+
+The Commander communicates with the Server using the following types of messages:
+
+\begin{itemize}
+ \item START - sent for starting a BitTorrent client.
+       \begin{itemize}
+\item first message contains the type, here START\_MSG
+\item second message contains a Python Dictionary data structure with the parameters
+       needed for starting the client.
+\end{itemize}
+ \item STOP - sent for stopping a running client.
+\begin{itemize}
+\item first message contains the type, here STOP\_MSG
+\item second message contains a string with the client process id.
+ \end{itemize}
+
+ \item ACK - contains $``ACK``$ and is sent by the server after receiving the message type
+ \item ACK PID - contains $''ACK <PID>''$ sent by the server after starting a client, PID is the process id.
+ \item ERROR - contains $"ERROR <error-message>``$ sent by the server when the parameters received are incorrect or the BT client can not be started.
+\end{itemize}
+We intend to extend this communication protocol with status messages sent by the Commander to check
+the BT client's progress.
+
 \begin{figure}[h]
 \begin{center}
 \includegraphics[width = 4.5in, height = 2.2in]{img/Diagram1.png}
 \end{center}
 \caption{Client-Server architecture for interaction with BitTorrent clients.}
+\label{fig:test-arch}
 \end{figure}
-
-
+\subsection{Commander}\label{sec:comm}
+\input{test/comm.tex}
+\subsection{Server}\label{sec:server}
 \input{test/server.tex}
\ No newline at end of file
diff --git a/report/test/comm.tex b/report/test/comm.tex
new file mode 100644 (file)
index 0000000..e69de29
index a51c00e..1ca8334 100644 (file)
@@ -1,2 +1,6 @@
 The server application resides on a virtual machine on which several BT clients are installed. It
-is started by connecting remotely using ssh, and executes as a daemon process\cite{daemon} 
+is started by connecting remotely using ssh, and executes as a daemon process\cite{daemon}.
+This server is written in Python, using modules for socket communication and process handling with
+functions similar to the ones from POSIX C. 
+
\ No newline at end of file