Opened 14 years ago

Closed 12 years ago

#44 closed enhancement (worksforme)

Rasdaman Conf.

Reported by: s.juba@… Owned by: Dimitar Misev
Priority: trivial Milestone:
Component: applications Version: 8.1
Keywords: Cc: p.baumann@…
Complexity: Medium

Description

The rasdaman configuration are defined in different places and using different styles and it is very difficult to trace these configurations. For examples, the globals.hh file define many external variables that control the behavior of rasdaman. Another place of configuration is rasmgr.conf. In these two places one can observe that there are redundancy in the definitions. Another place where one can find general definitions of configuration is inline the source code. for example rasql.cc repeats the same definition in glabals.hh and rasmgr.conf

Please see below

rasql.cc
#define PARAM_SERV_FLAG 's'
#define PARAM_SERV "server"
#define HELP_SERV "<host-name> rasdaman server"
#define DEFAULT_SERV "localhost"

#define PARAM_PORT_FLAG 'p'
#define PARAM_PORT "port"
#define HELP_PORT "<p> rasmgr port number"
#define DEFAULT_PORT 7001
#define DEFAULT_PORT_STR "7001"

….

const char *serverName = DEFAULT_SERV;
r_ULong serverPort = DEFAULT_PORT;
const char *baseName = DEFAULT_DB;

const char *user = DEFAULT_USER;
const char *passwd = DEFAULT_PASSWD;

glabals.hh

/ default rasmgr listen port
#define DEFAULT_PORT 7001

/ name of env var pointing to rasdaman home dir (ex: "/opt/rasdaman")
#define RMANHOME_VAR "RMANHOME"

/ default name of server machine, if gethostname() fails
#define DEFAULT_HOSTNAME "localhost"

/ default database name
#define DEFAULT_DBNAME "RASBASE"
……

rasmgr.conf

define db RASBASE -dbh rasdaman_host

# define a rasdaman database server process with name N1
# parameters:
# -host h name of the host machine the server runs on
# (cf: man 1 hostname)
# -type t communication protocol type is t
# (one of: 'r' for RPC, 'h' for HTTP, 'n' for RNP);
# recommended: use 'n', all others are deprecated
# -port p port number for contacting this server is p
# (rasmgr by default uses 7001, so you may simply count up)
# -dbh d use database host d (see "define dbh" for allowed names

Change History (2)

comment:1 by Dimitar Misev, 13 years ago

Owner: set to Dimitar Misev
Status: newaccepted

comment:2 by Peter Baumann, 12 years ago

Priority: majortrivial
Resolution: worksforme
Status: acceptedclosed
Note: See TracTickets for help on using tickets.