AcePerl

 view release on metacpan or  search on metacpan

docs/ACEDB.HOWTO  view on Meta::CPAN

Now examine and edit the file ~acedb/wspec/passwd.wrm.  This contains
the names of user accounts that are allowed to write to the database.
Make this file readable by everyone, but only writable by you (and
other trusted users).  If you will be running an ACeDB server, you
should examine the file ~acedb/wspec/server.wrm.  This contains read
and write policies for the server.  You can restrict who can read and
write to the database, although currently you are limited to
restricting read and write privileges to local users versus non-local
users.

Creating a new database from scratch is somewhat more difficult,
because you have to create an appropriate models (schema) file.
Please see NEW_DB.HOWTO for help.

Now confirm that the database is correctly installed by running the
xace program.

	xace ~acedb/elegans  (or whatever)

You should be able browse the data, view graphics, and so on.

INSTALLING AN ACE SERVER

ACEDB comes with two servers called "saceserver" and "sgifaceserver".
The difference between the two is that sgifaceserver has the ability
to serve graphical pictures.  Aceserver is text-only. In general, you
will want to use sgifaceserver unless you know you will never need to
serve pictures.  If you download a binary distribution of ACEDB, the
two executables may have the name of the operating system appended to
them.  Never fear.  Just rename the files to "saceserver" and
"sgifaceserver."

A full description of installing s(gif)aceserver is given in the ACEDB
web pages at:

  http://www.acedb.org/Development/wdoc/Socket_Server/SOCKET_aceserver.html

However, it is a rather technical description.  Here's a brief summary
of what you need to do:

1) Set up server password permissions:
	a. Choose an administrative username and password.  For example "admin"
	   and "acepass"

	b. Generate a "hash" of the username and password using the makeUserPasswd
	   program (this comes with the acedb binaries):
               % makeUserPasswd admin
		// Please enter passwd: ******
		// Please re-enter passwd: ******
		// The following line is a valid entry for wspec/serverpasswd.wrm

		admin e5cc20aa1a8f3e7e5b29728bbd1355d8

        c. Find the file named serverpasswd.wrm located in the wspec/ subdirectory
	   of the acedb database directory.  Add these two lines to the end of the file:

                admin: admin
	        admin e5cc20aa1a8f3e7e5b29728bbd1355d8

            The first line tells the server that the "admin" user has administrative
            access, and can start and stop the server.  The second line says that
	    "admin" has the password encoded in the numbers.

        d. If you want to create additional users with read-only or read/write,
           permissions, you can do so by generating more user names and password
	   hashes with makeUserPasswd, and entering them into the serverpasswd.wrm
	   file as described before.  Here is an example that grants "fred" and "ethel"
           read/write access, and grants "ricky" read-only access:

           admin: admin
           write: fred ethel
           read: ricky

 	   admin e5cc20aa1a8f3e7e5b29728bbd1355d8
           fred 08b622ddf7eb7c8e44cdb3bd6362f966
           ricky 64c12094434c3c4a1a24cdd21ad06485
           ethel f95557500f46122aacd59ce920aae6e8

2) Try to start the server under your own account, using saceclient.

Assuming that you have installed the acedb databases using your own
user permissions, you can try to run the web server as yourself.  Open
up two command windows on your system.  In one type this command:

 	% ~acedb/bin/sgifaceserver ~acedb/elegans 5000

This is telling the server to run on port 5000 and to read data from
the database directory located at ~acedb/elegans.  If all is well, you
will see messages like this:

   // Database directory: /usr/local/acedb/elegans
   // Shared files: /usr/local/acedb
   // #### Server started at 2003-05-12_11:54:13
   // #### host=brie3.cshl.org  listening port=5000
   // #### Database dir=/usr/local/acedb/elegans/
   // ####  Working dir=/usr/local/acedb/elegans/
   // #### clientTimeout=600 serverTimeout=600 maxbytes=102400 autoSaveInterval=600

The messages will stop, indicating that the server is waiting for
incoming connections.

In the other window, launch saceclient with this command:

      % ~acedb/bin/saceclient localhost -port 5000

It will prompt you for a userid (type "admin") and a password (type
the password).  If all goes well, you will get this prompt:

      acedb@localhost> 

and the server will accept queries.  For example, try the command
"Find Model".

3) Try to communicate with the server using aceperl.

When you installed AcePerl, it should have installed a small interface
script named ace.pl.  Confirm that it can talk to the server:

    % ace.pl -host localhost -port 5000

By default, you will get an "anonymous" read only connection, and you



( run in 0.594 second using v1.01-cache-2.11-cpan-39bf76dae61 )