Hi all,

I'd like to bring a little program to your attention that may or may not
be useful to you: merovingian.

Merovingian is meant as end-user program to start and stop one or more
MonetDB databases.  The program allows itself to be naturally used into
start and stop scripts, as well as manual use from the console.  It is
aimed at MonetDB5/SQL users.

In short, merovingian performs two basic tasks:
1. handle connections from clients and redirect those connections to
   the appropriate mserver process, and
2. start an mserver process in case it is not running (any more).
Currently, an appropriate mserver process is defined by the database a
client requests for.  Since each mserver process only serves one
database, multiple mserver processes are necessary to deal with multiple
databases.
Because merovingian can start mserver processes on demand, it has the
potential to (attempt to) restart an mserver after it has crashed.

Since merovingian will (currently only) start mserver processes, output
of those processes might get confusing, especially when multiple servers
are started.  Also, interacting with them is non-trivial.  For this
reason, merovingian starts mserver processes as daemon processes in the
background and catches their outputs to display it in a log-like
fashion.  Distinction is made between messages and errors.  Not
surprisingly both outputs can be written to a logfile on disk or just
outputted to the console.  An example output on the console would look
like this:

% merovingian demo
MSG merovingian[30160]: Merovingian 0.3 starting ...
MSG mserver5[30162]: executing 'bin/mserver5' for database 'demo'
MSG merovingian[30160]: monitoring dbfarm var/MonetDB5/dbfarm
MSG merovingian[30160]: listening for connections on pegasus.ins.cwi.nl:50000
MSG merovingian[30160]: starting database 'demo'
ERR mserver5[30162]: #warning: please don't forget to set your vault key!
ERR mserver5[30162]: #(see etc/monetdb5.conf)
MSG mserver5[30162]: # MonetDB server v5.1.0, based on kernel v1.19.0
MSG mserver5[30162]: # Serving database 'demo'
MSG mserver5[30162]: # Compiled for x86_64-pc-linux-gnu/64bit with 64bit OIDs 
dynamically linked
MSG mserver5[30162]: # Copyright (c) 1993-2007 CWI, all rights reserved
MSG mserver5[30162]: # Visit http://monetdb.cwi.nl/ for further information
MSG mserver5[30162]: # Listening for connection requests on 
mapi:monetdb://127.0.0.1:50001/

In this example merovingian was requested to start database demo
upfront, without waiting for a client to ask for it.  Without the demo
argument, merovingian waits for connections that ask for a database and
starts it at that time.  An arbitrary number of databases can be given
as "pre-start" arguments.  Pre-starting databases can be important when
clients are used that do not request for a specific database.  In such
case, the client is redirected to the first database that is running at
that moment.

Please look at the Merovingian section in the etc/monetdb5.conf file for
more options for merovingian.  The section is still small, but it might
grow.

Merovingian is available in the development branch (CVS head) of the
MonetDB5 repository.  Feedback is welcome.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MonetDB-users mailing list
MonetDB-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monetdb-users

Reply via email to