Installing a ModelDesigner developper workstation


Table of Contents
1. Introduction
1.1. Purpose of this document
1.2. Model Designer dependencies
2. Installation of Model Designer dependencies
2.1. Ant
2.2. J2SDK
2.3. Eclipse
2.4. CVS
2.5. Tomcat
2.6. DocBook
3. Configuration
3.1. Environment variables
3.2. Configuring SSH connection
3.3. Configuring Eclipse to use CVS
4. Installation of Model Designer for development
4.1. Model Designer Tomcat Server
4.1.1. What is the Model Designer Tomcat Server ?
4.1.2. How the server is organized ?
4.1.3. Deploying the Model Designer Tomcat Server
4.2. Model Designer modules
4.2.1. What is a module ?
4.2.2. How a source code module is organized ?
4.2.3. How the documentation module is organized ?
4.2.4. Getting a module from CVS
5. Working with Model Designer
5.1. Client application
5.1.1. Starting the GUI
5.1.2. Model Designer Client directory structure
5.2. Server application
5.2.1. Starting MDServer
5.2.2. Shutting down MDServer
5.3. Testing client-server system
6. Working on the Model Designer source code
6.1. Working on all modules
6.2. Working on the Core module
6.3. Working on the Appserver module

Chapter 1. Introduction

1.1. Purpose of this document

This document describes how to configure a computer running RedHat Linux to work on the development of the ModelDesigner platform.

This document is intended to be read by developpers working in the Symbiose team at IRISA, Rennes.


1.2. Model Designer dependencies

To work on the development of the Model Designer platform, the following libraries/softwares are required:

  • Ant 1.5.x, from the Apache Software Foundation,

  • Java 2 Software Development Kit - Standard Edition (J2SE), from Sun Microsystems.

  • Eclipse 3.x, from the Eclipse Foundation.

  • Concurrent Versions System (CVS), from Cyclic software.

  • Tomcat 5.5, from the Apache Software Foundation,

In addition, if you have to update the ModelDesigner documentation (such as this manual), you need DocBook.


Chapter 2. Installation of Model Designer dependencies

2.1. Ant

ModelDesigner development process uses release 1.5.4 of Apache Ant.

Change directory to /local:

nuon%  cd /local
Retrieve the Ant archive and deploy it in /local:
nuon%  cp /udd/belleann/Bio/ModelDesigner/install/apache-ant-1.5.4.tar.gz .
 
nuon%  gunzip apache-ant-1.5.4.tar.gz 
nuon%  tar xf apache-ant-1.5.4.tar 
nuon%  rm -f apache-ant-1.5.4.tar 


2.2. J2SDK

ModelDesigner development process uses J2SDK 1.4.2_05.

Change directory to /local:

nuon%  cd /local
Retrieve the J2SDK archive and deploy it in /local:
nuon%  cp /udd/belleann/Bio/archivage/ModelDesigner/install/j2sdk1.4.2_05.tar.gz . 
nuon%  gunzip j2sdk1.4.2_05.tar.gz 
nuon%  tar xf j2sdk1.4.2_05.tar 
nuon%  rm j2sdk1.4.2_05.tar 


2.3. Eclipse

Eclipse is already installed on your computer. You can check the installation by starting Eclipse manually:

nuon% /soft/jeclipse_hd/Linux/eclipse3.0.1/eclipse -data /udd/$USER/workspace -vm /local/j2sdk1.4.2_05/bin/java


2.4. CVS

CVS is already installed on your computer. You can check the installation by starting CVS manually:

nuon% cvs
You should see the cvs help message on the terminal window.

Note: the ModelDesigner project is located on the INRIA GForge server scm.gforge.inria.fr.


2.5. Tomcat

Do not proceed to this installation now.

Installation of Tomcat is explained in the section related to the deployment of the Model Designer Server application (Model Designer Tomcat Server).


2.6. DocBook

Do not worry about the installation of DocBook: at INRIA, the Linux based computers are shipped with DocBook. To be sure, you can try to execute the following DocBook tool:

nuon% docbook2html
As a result, you should see an help message.


Chapter 3. Configuration

3.1. Environment variables

Using your favorite text editor, open the file '.cshrc_perso' located in your home directory. In this file does not exist, create one. In the file, add the following lines:


#Java
setenv JDK_HOME /local/j2sdk1.4.2_05
set path=($JDK_HOME/bin $path)
setenv JAVA_HOME $JDK_HOME
# Ant
setenv ANT_HOME /local/apache-ant-1.5.4
set path=( $path $ANT_HOME/bin )
#CVS
setenv CVS_RSH /usr/bin/ssh

Then, execute the following command to 'install' the environment variables:

nuon% source ~/.cshrc_perso

3.2. Configuring SSH connection

In order to use the CVS server scm.gforge.inria.fr from Eclipse, you have to use the ssh public/private keys authentication system. For that purpose, you need to generate the public/private keys on your computer. If you already use that CVS server from Eclipse with another development project, you can skip the following procedure.

  1. Go in the directory '.ssh' located in your home directory :

    
    nuon%  cd /udd/$USER/.ssh 
        

  2. Generate the public/private keys:

    
    nuon%  ssh-keygen -t rsa 
        
    and follow the instruction on the screen.

  3. Register your private key to the ssh authentication system

    
    nuon%  ssh-add id_rsa 
        
    Note: you have to register that key EACH time you log into your computer and BEFORE you start Eclipse. If you fail to do so, CVS connections won't work from Eclipse.

  4. Go to the INRIA GForge web site to add your ssh public key. To do so, log in on the GForge, then select the ModelDesigner project. The project page contains several tabs, one of them is 'SCM'. Click on this tab, then follow the instructions on the 'SCM' page to upload your public ssh key on the GForge cvs server.


3.3. Configuring Eclipse to use CVS

Start Eclipse as follows:

nuon% /soft/jeclipse_hd/Linux/eclipse3.0.1/eclipse -data /udd/$USER/workspace -vm /local/j2sdk1.4.2_05/bin/java
That command line is quite long, so you can put it in a shell script file for easy reusability. Why this command is so long ? Simply because you have to specify your Eclipse workspace (the directory where Eclipse saves your configuration) and the Java Virtual Machine to use.

As soon as Eclipse is started, open the CVS perspective by choosing Window->Open perspective->Other in the menu bar. A dialog box opens where you can select the CVS perspective. Eclipse displays on the left of its window a frame entitled 'CVS repositories'. Right click on the middle of that frame, then select New->Repository location in the pulldown menu. Eclipse opens a dialog box, where you can enter the following values:

  • Host: enter the value scm.gforge.inria.fr

  • Repository path: enter the value /cvsroot/mdesigner

  • User: enter you login name

  • Password: does not enter anything

  • Connection type: select the value ext. Check on 'Use Default Port' and check off 'Use Port', 'Validate Connection on Finish' and 'Save Password'.

Close the dialog box by clicking on [Finish] so that Eclipse connects to the CVS repository of Model Designer.

That is all for the moment, we see later on how to use the repository to get the source code of Model Designer.


Chapter 4. Installation of Model Designer for development

Model Designer is a Client-Server application allowing to scan biological sequence databases using theoretical models written with a String Variable Grammar (SVG) based language. The Client application allows the user to do the job of designing graphically SVG based models, while the Server application is responsible for searching such models in the databases.

The Client application is a 100% pure Java 1.4.2 software, while the server consists in a set of Servlets (a Java-based technology) working together with a dedicated Prolog software.

Installing the development release of Model Designer requires to install the source code of the application as well as the server.

Model Designer client/server source code is distributed within several libraries, or modules (more details on modules are given in the section Model Designer modules). When working on the Model Designer source code, you have to install on your computer a local copy of some of these modules. This is done using the CVS server, as explained below (Getting a module from CVS). For the complete system to work, you also need to install the Model Designer Server.


4.1. Model Designer Tomcat Server

4.1.1. What is the Model Designer Tomcat Server ?

The Model Designer Tomcat server (hereafter called MDServer), is responsible for executing services invoked by the Model Designer client. Two types of services are handled by MDServer: query execution (i.e. execution of an SVG- based model against a sequence database), and database upload (i.e. a client sends to the server a new database).

The entire MDServer is written using a particular Java technology known as Servlet. This technology enables the creation of distributed application using the state of the art Web protocol: HTTP. Since MDServer itself is just a Servlet application that has to work in association with an HTTP server, it requires a Servlet engine. The standard Java Virtual Machine is used to execute a Java application on a desktop, so it is for Servlet: a Java Application Server is required to execute a Servlet-based application. To run the MDServer, we use Tomcat, the Servlet engine freely provided by the Apache Software Foundation.


4.1.2. How the server is organized ?

The Model Designer server has the following directory structure:


<ServerHomeDir>
     |
     |- databases
     |- prolog
     |- tmp
     |- tomcat

Directory ServerHomeDir is the location of the Model Designer Server application. As explained in the next section, that directory should refer to /local/mdesigner_devel.

Directory databases contains some databases that can be used to test the whole client/server system. It is the content of this directory that is used to create the list of available databases sent to the client when a user start a query submission to the server.

Directory prolog contains the Prolog programs that form the search engine of Model Designer Server application. This directory also contains the Unix shell script allowing to start the Prolog servers.

Directory tmp contains queries and databases sent by the client to the server.

Directory tomcat contains the ready-to-run Tomcat server along with the compiled Model Designer servlets.


4.1.3. Deploying the Model Designer Tomcat Server

To install the Model Designer server (hereafter called MDServer), do the following:

  1. Go in the directory /local :

    
    nuon%  cd /local 
        

  2. Create the MDServer directory, and go into that directory:

    
    nuon%  mkdir mdesigner_devel 
        nuon%  cd mdesigner_devel 
        

  3. Retrieve the MDServer archive from the CVS server:

    
    nuon%  cvs -d :ext:$USER@scm.gforge.inria.fr:/cvsroot/mdesigner checkout devel_appserver_bundle 
        
    Note: CVS may return a 'checkout aborted' error. Do not worry about that, the archive should be ok.

  4. Deploy the MDServer:

    
    nuon%  mv devel_appserver_bundle/mdserver.tar.gz . 
        nuon%  rm -rf devel_appserver_bundle/ 
        nuon%  gunzip mdserver.tar.gz 
        nuon%  tar xf mdserver.tar 
        nuon%  rm -f mdserver.tar 
        

You have now install in the /local directory of your computer the directory structure (along with some files) required by the ModelDesigner server. Chapter Working with Model Designer will explain how to deploy, start and stop the server itself (i.e., the set of servlets).


4.2. Model Designer modules

4.2.1. What is a module ?

Model Designer source code is distributed within three modules:

  • appserver: the source code of MDServer,

  • core: the source code of the core of Model Designer client/server application.

  • gui: the source code of the Graphical User Interface of Model Designer client application.

In addition, there is a documentation module, doc, that contains the DocBook source files that made the ModelDesigner manuals (like this one).

To work on these modules, you have to get a copy from the CVS server. The following sections explain how to do so.


4.2.2. How a source code module is organized ?

Each Model Designer development module has a particular directory structure:


<Module>
     |
     |- conf
     |- jar
     |- lib
     |- scripts
     |- src

Directory conf contains configuration files needed by the module.

Directory doc contains the compiled Javadoc of the module.

Directory jar contains librairies needed to compile/run the module.

Directory lib contains compiled source files (.class).

Directory scripts contains Ant scripts to manage a module from the command-line.

Directory src contains the Java source files of the module (.java) along with some Javadoc source files (.html).

In addition to those directories, the appserver module also has a directory named logol containing some Prolog source files needed by the Model Designer server.

For each module, all but the doc and lib directories are stored in the CVS repository. Directories doc and lib are automatically created while working on a module. It is strictly forbidden to commit them in the CVS repository.

Each module comes with some Ant scripts that can be used to handle the development process of a module from the command-line. To be used, those scripts have to be copied from the scripts directory to the module directory.


4.2.3. How the documentation module is organized ?

The organization of the doc module is described in the README file located in the root directory of that module. This file is available as soon as you check out the doc module from CVS.


4.2.4. Getting a module from CVS

There are two non compatible ways to manage the development process of the Model Designer platform using CVS:

  1. using the command-line CVS client application,

  2. using Eclipse.

Depending on your choice, there is no way back: if you choose to work using CVS on the command-line, you CAN NOT use the CVS embedded in Eclipse at the same time.

Getting a Model Designer development module from the CVS repository means that you will have a complete copy of the development files in your home directory. For that purpose, you need to prepare the following directory structure:


/udd/$USER
        |
        -- ModelDesigner
                    |
                    -- devel
                          |
                          |- appserver
                          |- core
                          -- gui

Starting from your home directory, you thus have to create a directory that will be called the Model Designer development home directory. Here that directory is ModelDesigner (in this example, that directory is directly under your home dir, but you can put the Model Designer development home directory anywhere else). In that directory, you have to create the devel directory, and then there you create the module directories: appserver, core and gui. Note that if you are going to only work on a unique module, you just have to create the directory for that module.

The directory structure is now prepared to receive the Model Designer source code modules from the CVS repository.

If you plan to work on the ModelDesigner documentation (for example, if you plan to update this manual), you need to add a doc directory under the ModelDesigner one, as follows:


/udd/$USER
        |
        -- ModelDesigner
                    |
                    -- devel
                    |     |
                    |     ...
                    |
                    -- doc


4.2.4.1. Using CVS on the command-line

Here is the procedure to get a Model Designer development module using CVS on the command-line. The module names that have to be passed to CVS are as follows: devel_core, devel_gui, devel_appserver (these are the three source code modules) and doc.

Depending on the module you want to check out from the CVS repository, you first have to go in the corresponding directory. For the purpose of this document, we suppose that you want to get the gui module (it contains the ModelDesigner client application). Here is the procedure:

  1. Register your ssh private key, so that CVS won't ask anymore for a password :

    
    nuon%  ssh-add /udd/$USER/.ssh/id_rsa 
        

  2. Go into the Model Designer development home directory:

    
    nuon%  cd /udd/$USER/ModelDesigner/devel
        

  3. Check out the module gui:

    
    nuon%  cvs -d :ext:$USER@scm.gforge.inria.fr:/cvsroot/mdesigner checkout -d gui devel_gui
        

  4. Change directory to gui, then copy the Ant scripts from the scripts directory into the current directory of the gui module:

    
    nuon%  cd gui 
        nuon%  cp ./scripts/* . 
        

    (do not pay attention if cp complains about copying CVS directory)

  5. start the compilation:

    
    nuon%  ant comp
        

    You are done, the ModelDesigner client application is ready to be used !

A similar procedure can be used to get the ModelDesigner documentation module, doc. Here is the procedure:

  1. Only if it is not already done, register your ssh private key, so that CVS won't ask anymore for a password :

    
    nuon%  ssh-add /udd/$USER/.ssh/id_rsa 
        

  2. Go into the Model Designer doc home directory:

    
    nuon%  cd /udd/$USER/ModelDesigner/doc
        

  3. Check out the module doc:

    
    nuon%  cvs -d :ext:$USER@scm.gforge.inria.fr:/cvsroot/mdesigner checkout -d doc doc
        

  4. Open the ./doc/README file to get more information about the ModelDesigner documentaion managament.


4.2.4.2. Using CVS from Eclipse

Here is the procedure to get a Model Designer development module using Eclipse.

  1. Register your ssh private key, then start Eclipse :

    
    nuon%  ssh-add /udd/$USER/.ssh/id_rsa
        nuon%  /soft/jeclipse_hd/Linux/eclipse3.0.1/eclipse -data /udd/$USER/workspace -vm /local/j2sdk1.4.2_05/bin/java
        

  2. Switch to the CVS perspective and locate the ModelDesigner repository, which should appear as :ext:$USER@scm.gforge.inria.fr:/cvsroot/mdesigner. If you cannot see the ModelDesigner repository, try to reconfigure Eclipse to target the CVS server by using extssh instead of ext. To do that, go back to section Configuring Eclipse to use CVS and, for Connection Type, select extssh instead of ext.

  3. Unroll the :ext:$USER@scm.gforge.inria.fr:/cvsroot/mdesigner branch.

  4. Unroll the Head branch, then select one of the Model Designer development modules (appserver, core or gui).

  5. Right-click on the module you need, then select the command Checkout As to open the Checkout As dialog box.

  6. In that dialog box, select Check out as a project configured using the New Project wizard, then click on the [Next] button to switch to the Select Tag dialog box.

  7. In that dialog box, be sure that Head tag is selected, then click on the [Finish] button.

  8. Eclipse automatically starts the New Project Wizard. There, you select Java Project, then click on the [Next] button to switch to the New Java Project dialog box.

  9. In that dialog box, you start by entering a project name. That name should be formatted as ModelDesigner_devel_xxx where xxx is the module name (appserver, core or gui). Then, you select Create project at external location and click on the [Browse button] to open the Browse directory dialog box.

  10. In that dialog box, go within one of the directory you created above to store you local copy of the Model Designer development modules (for exemple, if you are in the process to check out the core module, go in the directory /udd/$USER/ModelDesigner/devel/core). Click on the [Ok] button to go back to the New Java Project dialog box, and click on the [Finish] button.

  11. Eclipse displays a dialog box to ask you to switch to the Java perspective. Click the [Ok] button. Eclipse then starts to check your module out from the CVS repository. After that, Eclipse starts an automatic build of the project... which should fail, because Eclipse is not yet configured to do such a build.

  12. Locate your project in the Java perspective, right-click on it and select the command Properties to open the Properties dialog box.

  13. In that dialog box, select Java build path on the left pane of the Properties dialog box to display, on the right pane, the Java properties of your project.

  14. Select the Source tab in the the right pane. There are two parts in that tab. Source folders on build path on the top, and Default output folder on the bottom.

    Configuring the source folders to compile

    1. Click on the [Add Folder...] button to open a dialog box where you can check the src directory (it contains all the Java sources of the Model Designer module you are going to work on). Click on the [Ok] button to close that dialog box.

    Configuring the default output folder

    1. Click on the [Browse...] button to open the Folder selection dialog box. Select the project itself, then click on the [Create new folder button]. Using the newly opened dialog box, enter the name lib in the appropriate field. Close that dialog box, then close the Folder selection dialog box.

  15. Select the Librairies tab in the the right pane of the Properties dialog box. Click on the [Add JARs...] button to open a dialog box listing all your Eclipse projects. Locate the current project you are configuring right now, and unroll it. Unroll the jar directory which contains all the libraries needed to compile the project. Select all of them, then close the dialog box.

  16. Now, you can close the Properties dialog box by clicking on its [Ok] button. Eclipse displays a dialog box to inform you that something changed in the configuration of your project. Click on [ok] to let Eclipse proceed further to recompile the entire project... without any errors.

    You are done!


Chapter 5. Working with Model Designer

5.1. Client application

The client application of Model Designer is spreaded across the two modules core and gui. The core module contains the low level librairies of Model Designer which mainly consists in the modelling system and their associated graphical interfaces. The gui module contains high level graphical user interfaces of the Model Designer client application.

The gui module is currently the only one that contains the code to start a standalone application, namely the Model Designer client application. More precisely, the class model.designer.ui.MDesigner contains the main() method, i.e. the starter code of the whole application. For that reason, we begin to explain how to work on Model Designer GUI, and how to start it.


5.1.1. Starting the GUI

The following section supposed that you checked the gui module out from the CVS repository. If it is not the case, please refer to the section Getting a module from CVS. There are two ways to start the Model Designer GUI: from the command-line and from Eclipse.


5.1.1.1. From the command-line

  1. Go into the Model Designer GUI development directory:

    
    nuon%  cd /udd/$USER/ModelDesigner/devel/gui
        

    According to your configuration, that directory has to be adjusted: it has to point to the directory containing the gui module of Model Designer. Refer to the section Getting a module from CVS for more information on the directory structure of the development release of Model Designer.

  2. If it is not yet done, copy the Ant scripts from the scripts directory into the current directory of the gui module:

    
    nuon%  cp ./scripts/* . 
        

    (do not pay attention if cp complains about copying CVS directory)

  3. start the client:

    
    nuon%  ant run
        

    You are done ! However, you just have started the client... and you do not have any access to the Model Designer server. We shall explain how to do that later on.


5.1.1.2. From Eclipse

  1. While being in the Java perspective, select Run->Run... to show the Run dialog box.

  2. Click on the [New] button located on the bottom left corner of that dialog box. Eclipse creates a new Configuration and it selects it in the list located above the [New] button. On the right of that list, you can see a tabbed panel that allows you to configure your application so that it can be started from Eclipse.

  3. Switch your attention to that right panel. Give a name to your application: MDesigner. Then, proceed to the Main tab located just below the application name.

  4. Click on the [Browse] button located on the right of the Project: field. In the newly displayed dialog box, select the ModelDesigner_devel_gui project, then close the dialog box.

  5. Click on the [Search...] button located on the right of the Main class: field. In the newly displayed dialog box, select the MDesigner class, then close the dialog box.

  6. Select the Arguments tab.

  7. Enter the following values in the field entitled VM Arguments:

    
    -Xmx256M -Xms256M -Dmodeler.devel=true -Dmodeler.home=/udd/$USER/ModelDesigner/devel/gui
        

    According to your configuration, the value associated to modeler.home has to be adjusted: it has to point to the directory containing the gui module of Model Designer. Refer to the section Getting a module from CVS for more information on the directory structure of the development release of Model Designer.

  8. Click on the [Apply] button (located at the bottom right corner of the Run dialog box) to save that configuration.

  9. Click on the [Run] button (located at the bottom right corner of the Run dialog box) to start Model Designer (client only).

This procedure has to be done only once. To start again Model Designer (client only), just go to the Run menu, then select MDesigner.

The first time you start Model Designer client application, it has to create a particular directory structure (see Model Designer Client directory structure) and it needs you your email address (used by the Model Designer server to send you an email notifying that a query is done). At the end of this procedure, Model Designer stops.


5.1.2. Model Designer Client directory structure

The first time the client application of Model Designer is started, a particular directory structure is created in your home directory:


/udd/$USER
        |
        -- .mdesigner_devel
               |
               |- conf
               |- databases
               |- models
               |- queries

Directory conf contains configuration files needed by the client.

Directory databases contains the list of databases uploaded by you (while using the client application) onto the Model Designer server.

Directory models contains examples of SVG-based models.

Directory queries contains the list of queries sent by you (while using the client application) to the Model Designer server.

Directory .mdesigner_devel itself contains log files created by the Model Designer client application during its execution. Those log files may be usefull to track bugs.


5.2. Server application

Before trying to start the Model Designer server (hereafter called MDServer), you have to install it, as explained in the section Model Designer Tomcat Server.


5.2.1. Starting MDServer

Here is the procedure to start MDServer from the command-line (this cannot be done from Eclipse):

  1. Go into the Model Designer GUI development directory:

    
    nuon%  cd /udd/$USER/ModelDesigner/devel/gui
        

    According to your configuration, that directory has to be adjusted: it has to point to the directory containing the gui module of Model Designer. Refer to the section Getting a module from CVS for more information on the directory structure of the development release of Model Designer.

  2. If it is not yet done, copy the Ant scripts from the scripts directory into the current directory of the gui module:

    
    nuon%  cp ./scripts/* . 
        

    (do not pay attention if cp complains about copying CVS directory)

  3. start the Prolog servers:

    
    nuon%  ant prolog &
        

    This has to be done only ONCE: as soon as the Prolog servers are started, they will be up and running until either you kill them or you restart you computer. To check if the Prolog servers are running, use the following command:

    
    nuon%  ps -ef | grep prolog
        

    If you cannot see any Prolog servers running, then you should start them.

  4. start the MDServer:

    
    nuon%  ant start &
        

    Again, this has to be done only ONCE: as soon as the MDServer is started, it will be up and running until either you stop it or you restart you computer. To check if the MDserver is running, use the following command:

    
    nuon%  ps -ef | grep tomcat
        
  5. To check if the MDServer is up and running, switch to your web browser, and try the following URL:

    
    http://localhost:8090/mdserver/version
        

    This URL invokes MDServer and displays its current status. Another way to test MDServer consists in using the Model Designer client!

You have to be aware that using the MDServer means that some network ports on your computer are opened to the IRISA internal network. There is no real security problems here, but keep in mind that ports 8090 (opened by Tomcat, i.e. the Java Application Server running MDServer) and 760X (opened by several Prolog servers running in parallel; X ranges from, and including, 0 to 9) are opened. Now, if you prefer to close those ports when not using Model Designer, you have to shut the server down.


5.2.2. Shutting down MDServer

  1. Go into the Model Designer GUI development directory:

    
    nuon%  cd /udd/$USER/ModelDesigner/devel/gui
        

  2. stop the MDserver:

    
    nuon%  ant stop
        

  3. to stop the Prolog servers, you have to kill them manually:

    
    nuon%  ps -ef | grep prolog
        

    As an example, you should see on the terminal window something like that:

    
    pdurand   7097  5048  0 16:57 pts/2    00:00:00 
             /bin/sh /local/apache-ant-1.5.4/bin/ant prolog
        pdurand   7111     1  2 16:57 pts/2    00:00:00 
             /soft/sicstus/bin/sicstus -l /local/mdesigner_devel/prolog/mdserver.pl 
               --goal main(7600,'127.0.0.1').
        pdurand   7112     1  2 16:57 pts/2    00:00:00 
             /soft/sicstus/bin/sicstus -l /local/mdesigner_devel/prolog/mdserver.pl 
               --goal main(7601,'127.0.0.1').
        

    The line ant prolog refers the ant command used to start the Prolog servers, while the two other lines refer to two Prolog servers. You have to kill them all:

    
    nuon%  kill 7097
        nuon%  kill 7111
        nuon%  kill 7112
        


5.3. Testing client-server system

Before proceeding further in this section, be sure you have installed the entire Model Designer client-server application and that the server is started.

To test the whole system, you just need to send a query to the server. Proceed as follows:

  1. Start the Model Designer client as explained in section Starting the GUI. When the GUI starts, select 'Protein' as the sequence type.

  2. Select the command File->Open. In the 'Open' dialog box, enter in the directory models/protein, then open the model called 'mip_motif1.mdx'.

  3. Select the command Query->Send. In the 'Databases' dialog box, select the Aquaporines database (it is a small db with only 36 sequences, which is enough for testing purpose). Click on the button [Ok] to send the query to the server. Model Designer display a dialog box containing the ID of your query.

    Note: if you get an error when selecting command Query->Send, it means that the server is not started or not well-configured. In such a case, please check your Model Designer server installation.

  4. Select the command Query->Check status to display the dialog box where you can see the execution status of your query. As soon as the status is 'done' (refresh the content of the dialog box by using the [Refresh] button), click on the [Fetch] button to retrieve the results. Model Designer will then display the results of your query in the Model Analyser module.


Chapter 6. Working on the Model Designer source code

6.1. Working on all modules

As soon as you have made some update in the documentation, source code, scripts, configuration files of ModelDesigner, commit you changes using CVS. Of course, do these commits only after valid testing of the changes!


6.2. Working on the Core module

The core module is used by gui and appserver. So, you have to create a Java archive file containing the core module. Here is the procedure to create the core library:

  1. Go into the core directory:

    
    nuon%  cd /udd/$USER/ModelDesigner/devel/core
        

  2. make the library (it'll be placed in the /udd/$USER/ModelDesigner/devel/core/distrib directory):

    
    nuon%  ant distrib
        

Now, you have to manually copy the freshly created core library to the jar directory of gui and appserver modules (and do not forget to commit the new library).


6.3. Working on the Appserver module

The appserver module is used by gui. So, you have to create a Java archive file containing the appserver module. Here is the procedure to create the appserver library:

  1. Go into the appserver directory:

    
    nuon%  cd /udd/$USER/ModelDesigner/devel/appserver
        

  2. make the library (it'll be placed in the /udd/$USER/ModelDesigner/devel/appserver/distrib directory):

    
    nuon%  ant distrib
        

Now, you have to manually copy the freshly created appserver library to the jar directory of gui module (and do not forget to commit the new library).