From 68ceb60f067a1a9c2f2ae6ab66be3df747dab67f Mon Sep 17 00:00:00 2001 From: Marius Sandu-Popa Date: Thu, 11 Feb 2010 20:26:20 +0200 Subject: [PATCH] report - added and finished database chapter --- report/database.tex | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 report/database.tex diff --git a/report/database.tex b/report/database.tex new file mode 100644 index 0000000..91c7f89 --- /dev/null +++ b/report/database.tex @@ -0,0 +1,36 @@ +In our infrastructure the database stores all the parsed logging data. For its implementation we choose sqlite[referinta todo] because it provides an easy and fast way to manage a database: the entire database is stored as a single file. During the experiment all the peers store their status and verbose information in a local sqlite database file. All the files eventually get merged to form our database. + +In Figure [todo] we have a detailed look on the database schema. The tables in the database store the following information: +\begin{itemize} + \item swarms: information about a BitTorrent session(swarm) + \item btclients: information about the tested the BitTorrent clients + \item client\_sessions: client sessions information + \item status\_messages: client status information extracted from status log files + \item verbose\_messages: information about sent/received BitTorrent messages; extracted from verbose log files +\end{itemize} + +\subsubsection{Database Helper Objects} + +Our infrastructure also provides database helper objects to make database operations easier: +\begin{itemize} + \item db\_init: a simple shell script that creates a SQLite BitTorrent message logging database file. + \item DatabaseAccess.py: + \begin{itemize} + \item implements low-level Python operations for managing a BitTorrent message logging database (created through the use of the db\_init script) + \item exports methods allowing insertion, selection and deletion of table entries in the database. This methods are directly used by the DatabaseCommander.py and DatabaseWriter.py objects. + \item can be called from the command line. This enables a small test case of the exported functions and fills the database initial entries. + \end{itemize} + \item DatabaseCommander.py: +\begin{itemize} + \item provides command line access to and interaction with the BitTorrent information database. + \item allows adding, deleting and showing entries in the swarms and client\_sessions table. +\end{itemize} + \item DatabaseWriter.py: +\begin{itemize} + \item enables access to the status\_messages and verbose\_messages tables. + \item offers a programmer interface which exports six methods for adding, deleting and listing entries. + \item offers a command line interface similar to the one belonging to the DatabaseCommander. +\end{itemize} +\end{itemize} + + -- 2.20.1