From: Adriana Draghici Date: Thu, 11 Feb 2010 17:15:37 +0000 (+0200) Subject: report - described the commander-server interaction X-Git-Tag: getopt_long~163 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=849b87b0892ed36359bb51dd4bdc35187f691578;p=cs-p2p-next.git report - described the commander-server interaction --- diff --git a/report/test.tex b/report/test.tex index c3ac8f9..256f79b 100644 --- a/report/test.tex +++ b/report/test.tex @@ -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 ''$ sent by the server after starting a client, PID is the process id. + \item ERROR - contains $"ERROR ``$ 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 index 0000000..e69de29 diff --git a/report/test/server.tex b/report/test/server.tex index a51c00e..1ca8334 100644 --- a/report/test/server.tex +++ b/report/test/server.tex @@ -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