notes and other things concerning combox
git clone git://
Log | Files | Refs

commit baad1e8c36e9f14fd703cfc19eeb76ba46b8a921
parent f15de3fe273145e79ce4c95a0517c1b9294eebd2
Author: Siddharth Ravikumar <>
Date:   Thu,  4 Feb 2016 11:04:11 -0500

fleshed out a bit of "combox modules over" section.

report/chapters/4-arch-d.tex | 81++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
report/combox-report.pdf | 0
report/combox.tex | 3++-
3 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/report/chapters/4-arch-d.tex b/report/chapters/4-arch-d.tex @@ -1,3 +1,4 @@ + \chapter{Structure and Design} \epigraph{In general, when modeling phenomena in science and @@ -9,7 +10,6 @@ \section{Structure of combox} - \begin{figure}[h] \includegraphics[scale=0.6]{4-combox-structure} \caption{High level view of combox on two computers.} @@ -26,6 +26,85 @@ \section{combox modules overview} +combox is spread into modules that have functions and/or classes. As +of \verb+2016-02-04+ combox is considerably a small program: + +\begin{verbatim} +$ wc -l combox/*.py + 144 combox/ + 178 combox/ + 241 combox/ + 891 combox/ + 541 combox/ + 454 combox/ + 0 combox/ + 71 combox/ + 278 combox/ + 29 combox/ + 2827 total +\end{verbatim} + +This section gives an overview of each of the combox modules with +extreme brevity: + +\begin{description} +\item[combox.cbox] This module contains \verb+run_cb+ function runs + combox; it creates an instance \verb+threading.Lock+ for database + access and a shared \verb+threading.Lock+ for the + \ and + \; it initializes an instance + \ that monitors the combox + directory and an instance of \ for + each node directory for monitoring the node directories. This + modules also houses the \verb+main+ function that parses commandline + arguments, starts combox configuration if needed or loads the combox + configuration file to start running combox. +\item[combox.config] Accomodates two import functions -- + \verb+config_cb+ and \verb+get_nodedirs+. The \verb+config_cb+ is + the combox configuration function that allows the user to configure + combox; this function was designed in a such way that it was + possible to use for both CLI and GUI methods of configuring + combox. The \verb+get_nodedirs+ function returns, as a list, the + paths of the node directories; this function use used in numerous + places in other combox modules. +\item[combox.crypto] This has functions for encrypting and decrypting + data; encrypting and decrypting shards (\verb+encrypt_shards+ and + \verb+decrypt_shards+); a function for splitting a file into shards, + encrypting those shards and spreading them across node directories + (\verb+split_and_encrypt+); a function for decrypting the shards + from the node directories, reconstructing the file from the + decrypted shards and put the file back to the combox directory + (\verb+decrypt_and_glue+). Functions \verb+split_and_encrypt+ and + \verb+decrypt_and_glue+ are the two functions that that are + extensively used by the \ module; all other + functions in this module are pretty much helper functions are + \verb+split_and_encrypt+ and \verb+decrypt_and_glue+ functions and + are not used by other modules. +\item[] This module took the most time to write and test + and it is the most complex module in combox at the time of writing + this report. It contains just two classes -- \verb+ComboxDirMonitor+ + and \verb+NodeDirMonitor+. The \verb+ComboxDirMonitor+ inherits the + \ and is responsible for + monitoring for changes in the combox directory and doing the right + thing when change happens in the combox directory. The + \verb+NodeDirMonitor+ also inherits + \ and similarly responsible + for monitoring a node directory and doing the right thing when a + change happens in the node directory; subjectively, + \verb+NodeDirMonitor+ is slightly more complex than the + \verb+ComboxDirMonitor+. +\item[combox.file] This is the second largest module in combox. It + contains utility functions for reading, writing, moving + files/directiores, hashing files, splitting a file into shards, glue + shards into a file, manipulating directories inside combox and node + directories. +\item[combox.gui] +\item[combox.log] +\item[combox.silo] +\item[combox.\_version] + +\end{description} + \section{Language choice and DRY} \section{Operating system compatibility} diff --git a/report/combox-report.pdf b/report/combox-report.pdf Binary files differ. diff --git a/report/combox.tex b/report/combox.tex @@ -298,7 +298,8 @@ \begin{listofabbreviations} \abbreviation{YAML}{YAML Ain't Markup Language} - + \abbreviation{CLI}{Command Line Interface} + \abbreviation{GUI}{Graphical User Interface} \end{listofabbreviations}