Setting up an Alignment Server
An extensive presentation of the alignment API can be
found at http://gforge.inria.fr/docman/?group_id=117. We also have
an on-line tutorial on using it.
Requirements
Using the alignment server requires an SQL database server.
We see here how to use mysql (http://dev.mysql.com/doc/refman), but
the server also works with Postgres.
Creating the MySQL database
In order to use the Alignment server, it is necessary to create its database. This can simply be done by the following shell instructions:
$ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &
$ /usr/local/mysql/bin/mysqladmin -u root password <mysqlpassword>
$ /usr/local/mysql/bin/mysql -u root -p<mysqlpassword>
sql> CREATE DATABASE AServDB;
sql> GRANT ALL PRIVILEGES ON AServDB.* TO adminAServ@localhost IDENTIFIED BY 'aaa345';
sql> quit
The database schema will be created upon the first launch of the
server.
Of course, you are advised to use different user, password and
database name. This can be achieved either:
- by changing values of DBMSBASE, DBMSUSER and DBMSPASS in AlignmentServer.java and recompiling;
- by passing parameters dbmsbase, dbmsuser and dbmspass to
AlignmentServer.
It is also possible to use Postgres instead of MySQL, but then you
should know how to do it.
Launching the Alignment server
The Alignment server requires that the corresponding database management system server be running. In our case, this can be achieved through:
$ sudo /usr/local/mysql/bin/mysqld_safe --user=mysql &
Running the Alignment server is achieved through (use the corresponding options):
$ java -jar lib/alignsvc.jar -H
The alignment server is then available through HTTP with:
http://localhost:8089/html/
The possible switches to the server launcher are:
$ java -jar lib/alignsvc.jar -h
usage: AlignmentService [options]
options are:
--html[=port] -H[port] Launch HTTP service
--jade[=port] -A[port] Launch Agent service
--wsdl[=port] -W[port] Launch Web service
--jxta[=port] -P[port] Launch P2P service
--oyster -O Register to Oyster directory
--serv=class -i class Launch service corresponding to fully qualified classname
--output=filename -o filename Redirect output to filename
--dbmshost=host -m host Use DBMS host
--dbmsport=port -s port Use DBMS port
--dbmsuser=name -u name Use DBMS user name
--dbmspass=pwd -p pwd Use DBMS password
--dbmsbase=name -b name Use Database name
--dbms=name -B name Use Database Management System
--debug[=n] -d[n] Report debug info at level n
-Dparam=value Set parameter
--help -h Print this message
Alignment server 4.3 (1709:1716M) ($Id$)
Embedding more methods in the Alignment Server
Adding new matcher, renderer, evaluators, or services in the
Alignment Server, is really easy. This requires that your class be
an implementation of respectively AlignmentProcess, AlignmentRenderer,
Evaluator or AlignmentServiceProfile. It suffices to add all the
necessary jarfiles in the MANIFEST file of the Alignment Server
jarfile used to launch the server (typically alignsvc.jar) and to
put these jarfiles in the same location as this last one.
For instance:
Manifest-Version: 1.0
Created-By: your.MailAddress@example.org
Class-Path: alignsvc.jar olgraph.jar procola.jar
Main-Class: fr.inrialpes.exmo.align.service.AlignmentService
is the required MANIFEST file for embedding our OLA algorithm which
requires two jarfiles: procola.jar and olgraph.jar.
Ports used by the Alignment Server (by default)
The alignment server is a communicating system that communicates through
TCP sockets which are bound to ports on your machines. We provide here the
list of default ports and options to change them as well as the necessity
for the firewalls to open these ports:
| default | option | open? |
HTTP | 8089 | -H | Y |
MySQL | 3306 | --dbmsport | N (if on the same machine) |
Jade | 8888 | -A |
// | 1099 | | ? (RMI) |
| 7778 | | Y (MTP HTTP) |
WSDL | 7777 | -W | Y |
JXTA | 6666 | -P | Y |
Oyster | 1099 | -O | Y (RMI/Kaon2) |
Of course, the ports need only to be open if there is an access from
the outside to the server with the corresponding plug-in. The only
compulsory ports for the server is the MySQL one.
Setting up a back-up for your database
Sample backup of the server content:
$ /usr/local/mysql/bin/mysqldump -u adminAServ -paaa345 AServDB > toto.sql
And restoring:
$ /usr/local/mysql/bin/mysql -u adminAServ -paaa345 AServDB
sql> source toto.sql;
http://alignapi.gforge.inria.fr/aserv.html
$Id$