next up previous
Next: Building the Catalog Archive Up: No Title Previous: Objectivity

Organization and variables

The Science Archive Source Code Tree:



sxGeneral --> libsxGeneral.a    
SpatialIndex --> libSpatialIndex.a    
sxSchema --> libsxSchema.a    
sxDatabase --> libsxDatabase.a    
  --> libsxIndex.a    
sxLoader --> libsxLoader.a    
sxAtlas --> libsxAtlas.a    
  --> libsxAtlasSchema.a    
sxTools --> libsxTools.a    
  --> libsxToolsFits.a    

CVS subdirectories within each module:

bin/ executables
app/ executables & utilities
src/ library source files
lib/ library .a files
etc/ misc. or config files
doc/ documentation
doc/www/ online doc files
CVS/ CVS files
include/ .h files
cgi-bin/ cgi scripts

The .sxrc file (see also next table):

# SX environment variables and aliases
# set sxdb version
if ( $SX == "edr " ) then
setenv SX_DIR /d001/sx
setenv OO_FD_PATH /d001/edr
setenv OO_FD_NUMBER 1001
else if ( $SX == "atlas" ) then
setenv SX_DIR /d001/sx
setenv OO_FD_PATH /d001/sx/atlasDB
setenv OO_FD_NUMBER 9900
else if ( $SX == "test" ) then
setenv SX_DIR /d001/test
# setenv OO_FD_PATH /d001/staging/testDB
# setenv OO_FD_NUMBER 9903
setenv OO_FD_NUMBER 2732
setenv OO_FD_PATH /d001/testing/edr
# set the environment variables
setenv OBJECTIVITY_DIR /home/object/linux86
setenv LD_LIBRARY_PATH $OBJECTIVITY_DIR/lib:/usr/local/lib
setenv XAPPLRESDIR $OBJECTIVITY_DIR/etc/app-defaults
setenv PYTHONPATH /d001/sx/sxCL
alias sxCL 'python -c "import sxCL; sxCL.main()"'
setenv SX_CLIENT_DIR $SX_DIR/etc
setenv SX_PASSWD_DIR ~/sxpasswd
setenv DERVISH_DIR $SX_DIR/dervish
setenv CFITSIO_DIR $SX_DIR/cfitsio
setenv LIBFITS_DIR $SX_DIR/libfits
setenv LIBPNG_DIR $SX_DIR/libpng
setenv PHOTOSCH_DIR $SX_DIR/photoSch
setenv SXGENERAL_DIR $SX_DIR/sxGeneral
setenv SXLOADER_DIR $SX_DIR/sxLoader
setenv SXDATABASE_DIR $SX_DIR/sxDatabase
setenv SXSCHEMA_DIR $SX_DIR/sxSchema
setenv SXATLAS_DIR $SX_DIR/sxAtlas
setenv SXQT_DIR $SX_DIR/sxQT
setenv SPATIALINDEX_DIR $SX_DIR/SpatialIndex
setenv OO_LOCKSERVER_HOST wiglaf
# setenv SDSS_RUNS /data1/sx
setenv OO_RPC_TIMEOUT 1000
# make links to the proper sxbuild and sxmake versions
/bin/rm -f ~/bin/sxbuild ~/bin/sxmake
ln -s $SXGENERAL_DIR/bin/sxbuild ~/bin
ln -s $SXGENERAL_DIR/bin/sxmake ~/bin
# set some aliases
alias cdoo 'cd $OO_FD_PATH'
alias ootool 'cdoo; ootoolmgr&'
alias cdqt 'cd $SXQT_DIR'
alias cdsx 'cd $SXDATABASE_DIR'
alias cdd 'cd $SXDATABASE_DIR'
alias cdg 'cd $SXGENERAL_DIR'
alias cdl 'cd $SXLOADER_DIR'
alias cdp 'cd $SPATIALINDEX_DIR'
alias cds 'cd $SXSCHEMA_DIR'
alias cdlog 'cd $SX_CLIENT_DIR/log'
alias psx 'ps -ef | grep sx'
alias sxm 'sxmake -debug -terse -filter'
alias sake 'sxmake -debug -terse -filter'
alias sxa 'cd ../src; sake all; cd ../app; sake '
alias sxs 'cdsx; sake lib; cd app; sake sxServer'
alias sxr 'cdsx; sake lib; cd app; sake sxRemoteThreadServer'
alias sxruns 'rm -f $SX_CLIENT_DIR/log/dbglog;
rm -f $SX_CLIENT_DIR/log/sess?.log;
rm -f $SX_CLIENT_DIR/log/sess??.log;
./sxServer -d \!* >& $SX_CLIENT_DIR/log/dbglog &'
alias sxrunr 'rm -f $SX_CLIENT_DIR/log/dbgrts;
./sxRemoteThreadServer -d \!* >& $SX_CLIENT_DIR/log/dbgrts &'
alias sxrunt 'rm -f dbgtst; ./sxTestServer -d \!* -c ./config >& dbgtst &'

Environment variables (set by your .sxrc file):

$SX picks which server you want to run (e.g. edr)
$SX_DIR $\rightarrow$ $\sim$/$SX or wherever you have the source (e.g. /d001/sx/)
$SXGENERAL_DIR $\rightarrow$ $SX_DIR/sxGeneral
$SPATIALINDEX_DIR $\rightarrow$ $SX_DIR/SpatialIndex
$SXSCHEMA_DIR $\rightarrow$ $SX_DIR/sxSchema
$SXDATABASE_DIR $\rightarrow$ $SX_DIR/sxDatabase
$SXLOADER_DIR $\rightarrow$ $SX_DIR/sxLoader
$SXATLAS_DIR $\rightarrow$ $SX_DIR/sxAtlas
$SXPHOTOSCH_DIR $\rightarrow$ $SX_DIR/photoSch
$SXQT_DIR same as $SXGUI_DIR $\rightarrow$ $SX_DIR/sxQT
$SX_CLIENT_DIR $\rightarrow$ $SX_DIR/etc config and log files for sx server, and .pid files
$SX_PORTDAEMON_PORT port that portdaemon will come up on (e.g. 2005)
$SX_PORTDAEMON_HOST host that portdaemon is running on (e.g.
$SX_PASSWD_DIR where .passwd files are kept for SX (e.g. $\sim$/sxpasswd/)
$OO_FD_PATH Objectivity federation path (e.g. /d001/edr/)
$OO_FD_BOOT $\rightarrow$ $OO_FD_PATH/SXDB federation boot file
$OO_FD_NUMBER unique number assoc. with each federation
$OO_LOCKSERVER_HOST host of the lockserver (e.g. wiglaf)
$OO_RPC_TIMEOUT connection timeout (e.g. 1000s)
$DERVISH_DIR $\rightarrow$ $SX_DIR/dervish Dervish (Shiva) library directory
$CFITSIO_DIR $\rightarrow$ $SX_DIR/cfitsio FitsIO library directory
$LIBFITS_DIR $\rightarrow$ $SX_DIR/libfits Fits library directory
$LIBPNG_DIR $\rightarrow$ $SX_DIR/libpng PNG format library directory
$PYTHONPATH $\rightarrow$ $SX_DIR/sxCL Python library path
$OBJECTIVITY_DIR $\rightarrow$ /home/object/linux86 Objectivity directory

The Port Daemon and SX_PASSWD_DIR:

A separate Port Daemon (sxPortDaemon) must be run for each password directory used, thus there is a one-one association between the Port Daemon and the password directory pointed to by the environment variable SX_PASSWD_DIR. At a site that runs more than one Catalog Archive Server (e.g., one for the EDR and one for the collaboration), separate password files will have to be maintained for the public and private servers, hence more than one port daemon will have to be run. Each port daemon must be associated with its own password directory via the SX_PASSWD_DIR variable, and it will write its log output (portDaemon.log file) also to this directory. The password directory for the port daemon is analogous to the client directory for the server. There is also a hostname and port-number associated with a given port daemon via the SX_PORTDAEMON_HOST and SX_PORTDAEMON_PORT environment variables.

The config file for each Catalog Archive Server:

The config file in the client directory stores the configuration parameters for the server association with that client directory. A sample config file is listed below.

nAgents 50 number of agents (contexts)
maxFDsPerContext 20 maximal federated databases p. context
minCacheSize 50 2.2cm(.2,.8)}27cmCache parameter
maxCacheSize 250  
nodeTimeFactor 300.0 2.2cm(.2,.8)}27cmNode parameter
nodeCostFactor 0.1  
nodeSaveCost 1.0 3.2cm(.2,1.2)} 37cmQuery parameter
maxNodeCost 100.0  
nodeSaveDir qn  
maxBagSize 1150000  
defBagSize 5000  
stackBufSize 128  
maxSessions 10 Number of users (depends on Objy license)
maxDB 0  
splitDB 1  
homeDir /d001/sx/etc  
FDBootFileName /d001/edr Federated Database
portDaemonID sxROEMain 2.2cm(.2,.8)}27cmPort Daemon parameter
portDaemonPass serverPassword  
firstUserPort 2500 2.2cm(.2,.8)}27cmPort parameter
lastUserPort 8899  
useFluxIndex 0 not yet implemented
useSXPredicate 1 use always!

next up previous
Next: Building the Catalog Archive Up: No Title Previous: Objectivity

© The Johns Hopkins University 2000
Generated by Ani Thakar at 2002-01-18