GPMSWiki/CoreDocumentation/Implementation: Difference between revisions
No edit summary |
imported>LutzKrause No edit summary |
(No difference)
|
Revision as of 17:53, 18 April 2005
Implementation
\section{Implementation} %% this section contains some details about the implementation of the GPMS: %% database model, O2DBI, Perl, MySQL This chapter contains details about the implementation of the \GPMS. We describe the datamodel for the relational database and explain the attributes of each class. Sample descriptions for the definition of \roles{} and \rights{} complement this section by illustrating the implementation of fine-grained access control.
\subsection{Database schema for the \GPMS} The \PMS{} was developed as an object-oriented application based on the data model described in the previous section. Since the GPMS required a persistent storage backend we decided to use the O2DBI-2 system \cite{otodbi2} which automatically maps the XML class descriptions onto tables that can be stored in a relational database (auto-generated object-relational mapping of Perl objects). At the same time, O2DBI-2 provides a client-server architecture that allows remote connections to the system via a Perl or C++ client. The automatically generated Perl server modules for all described classes have been extended with additional functionality and thus form the \gpms-API. MySQL is currently used as the database backend but other relational database management systems (RDBMS) can be used as they are supported by the O2DBI-2 software. Figure \ref{fig:data_model} displays the current database schema for the GPMS database (\GPMSDB) as it has been generated by O2DBI-2.
\begin{figure}%[H]
\begin{center} \includegraphics[width=0.7\columnwidth]{../../../src/dbschema/gpms} \end{center} \caption[Database schema of the Project Management System.]{The database schema of the \GPMS{}. Black lines mark references between two classes and red lines show inherited class relationships.} \label{fig:data_model}
\end{figure}
\input{class_descriptions}
\input{RolesRights}
\newpage \section{Interfaces} In this section we describe several ways for accessing and using the \GPMS. In addition to the API that allows programmers to directly manipulate all objects stored in the database we provide a number of scripts for maintaining the system and a Gtk graphical user interface for the management of \users{} and \project{} \members{}. A simplified web frontend was also implemented that supports a restricted user management for "external" maintainers of \projects.
\subsection{GPMS scripts} The scripts listed in table \ref{tab:gpms_scripts} can be used to initially set up the system and for maintaining \projects, \users, and their memberships.
%\begin{tabular}{ll}\hline \begin{table}[H] \small \begin{longtable}{|l|l|} \multicolumn{2}{c}{\rule[-3mm]{0mm}{8mm} \textbf{\gpms \ scripts}}\\ \hline %\multicolumn{2}{c}{\textbf{adding datasets}}\\ \hline name & description \\ \hline add\_host & add a new {\it Host} to the \gpms\\ add\_datasource\_type & register a new {\it DataSource}\\ add\_db\_api\_type & register a new {\it API\_Type}\\ add\_dbms\_type & create a {\it DBMS\_Type}\\ add\_db & create a new {\it Database}\\ add\_project\_class & create a new {\it ProjectClass}\\ add\_project & create a new {\it Project}\\ add\_datasource2project & add a {\it DataSource} to a {\it Project} \\ add\_project\_config & add configurations to a {\it Project}\\ add\_role & read and store the {\it Role} definitions for a {\it ProjectClass}\\ add\_rights & parse a {\it Right} definition-file and store it in the \gpms\\ add\_user & register a new {\it User}\\ add\_member & add an existing {\it User} as a new {\it Member} to a {\it Project}\\ add\_meta\_project & create a new {\it MetaProject}\\ add\_project2meta\_project & add a {\it Project} to a {\it MetaProject}\\ %add\_biomake\_project & adds a new biomake project to the \gpms\\ %add\_emma\_project & add a \emma {\it Project} to the \gpms\\ %add\_gendb\_project & add a \gendb {\it Project} to the \gpms\\\\ %add\_prodb\_project & create a \prodb {\it Project}\\ % & \\ \hline %\multicolumn{2}{c}{\textbf{deleting data}}\\ \hline %% name & description \\ \hline del\_host & remove a {\it Host}\\ del\_datasource\_type & delete a {\it DataSource\_Type} \\ del\_datasource & remove a {\it DataSource} from the \gpms\\ del\_db\_api\_type & delete a {\it DB\_API\_Type}\\ del\_dbms\_type & remove a {\it DBMS\_Type} from the \gpms\\ del\_project\_class & delete a {\it ProjectClass} from the \gpms\\ del\_project & delete a {\it Project}\\ del\_project\_config & remove configurations from a {\it Project}\\ del\_role & remove roles from a {\it ProjectClass}\\ del\_rights & delete rights from a {\it ProjectClass}\\ del\_user & remove a {\it User} from the \gpms\\ del\_member & remove a {\it User} from a {\it Project}\\ %& \\ \hline % \caption[Available scripts for manipulating the \gpms.]{All currently % implemented scripts for manipulating the \gpms{} are listed above. Executing a % script without parameters will print a detailed description and a complete % list of available options.} % \label{tab:gpms_scripts} \end{longtable} \end{table} \normalsize
\begin{table}[H] \small \begin{longtable}{|l|l|} \multicolumn{2}{c}{\rule[-3mm]{0mm}{8mm} \textbf{\gpms \ scripts cont.}}\\ \hline %\multicolumn{2}{c}{\textbf{other scripts}}\\ \hline %% name & description \\ \hline change\_member\_role & change the {\it Role} of an existing {\it Member}\\ export\_members & print a list of all {\it Member}s of a {\it Project} or\\
& all {\it Member}s of all {\it Project}s of a {\it ProjectClass} to a file\\
%%%%% !!! These should be named 'del_...' !!! %%%%% rem\_datasource\_from\_project & remove a {\it DataSource} from a {\it Project}\\ rem\_project\_from\_meta\_project & remove a {\it Project} from a {\it MetaProject}\\ list\_project\_members & print a list of all {\it Members} of a {\it Project}\\ list\_projects & print a list of all {\it Project}s and {\it Roles} available for the {\it Project}\\ list\_user\_projects & display a list of all {\it Projects} that can be accessed by a {\it User}\\ list\_extern\_user & print list of all extern {\it Users} \\ gui & start the graphical user interface to maintain the \gpms\\ \hline
\caption[Available scripts for manipulating the \gpms.]{All currently
implemented scripts for manipulating the \gpms{} are listed above. Executing a script without parameters will print a detailed description and a complete list of available options.}
\label{tab:gpms_scripts} \end{longtable} \end{table} %\end{tabular} \normalsize
All scripts listed above are executed using the wrapper script {\bf gpms} which sets several installation specific environment variables. Executing this script without parameters will list all available scripts and print a usage message. The following paragraphs describe the use of each script and introduce their options. %\input{script_descriptions} \input{scripts}
\subsection{Using an Application Frame} In addition to the standard classes of the \PMS{} described in section \ref{classes}, we have implemented a general framework that simplifies the necessary steps for accessing a project's data. Such an \textit{Application Frame} uses the \gpms{} for accessing the \datasources{} of a \project{} and it also provides a number of useful methods that are often needed by the end applications. The following description was directly included from the documentation of the Perl module. \input{application_frame}
Author: Lutz Krause