Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.eso.org/projects/dfs/team/DFS-NEW-SYBASE-access-DB.html
Дата изменения: Wed Aug 8 18:01:16 2007
Дата индексирования: Sun Apr 13 22:49:07 2008
Кодировка:

Поисковые слова: п п п п п п п п п
How DFS components access databases
 [ ESO ]

DFS Department


How DFS components access databases ?

P2PP (java version)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED-TIME-OUT ** Milliseconds between checks of idle/old connections */ public final static long REAPER_SLEEPTIME = 5*1000; // in millisecs

/** Milliseconds a connection can remain idle before being closed */ public final static long MAX_IDLE_PERMANENTTIME = 60*1000; // in millisecs

/** Milliseconds an unallocated connection lasts before being closed */ public final static int MAX_PERMANENTTIME = 600*1000; // in millisecs

In other words, a connection can remain idle for at most 60+5 seconds before being closed. A connection should not last much longer than 600+5 seconds (just over 10 mins) before being closed, although this is possible if it is always allocated when the background 'reaper' thread inspects it. It is the reaper thread that actually does the closing.
NO DB server is defined in ~flowmgr/dfs/dataflowJava/config/p2pp-db.cf

This file contains : name and port number of DB server, plus encrypted username and password.

Username and password are encrypted via the ~flowmgr/dfs/dataflowJava/config/p2pp-db.src procedure

Path to IMPEX, CACHE and INSTRUMENT PACKAGES are defined in ~flowmgr/dfs/dataflowJava/config/site.cf.
BE AWARE !!! this file is overwritten by the ~/.p2pp.cf file, if this one exists.

Path to INSTRUMENT PACKAGES should be the same for P2PP and for OT : usually, under ~instmgr/instruments.

P2PP running via the Application Server if the server.cf file exists under ~flowmgr/dfs/dataflowJava/config. This file contains IP address of AppServer.
Functionality accessed DB SQL statements
View Phase 1 targets Opc70 S
Download observing runs Opc70 S
OB browsing obrep2 S
Check-in obrep2 S, I
Check-out obrep2 S, D
login (new login or login during an existing session) Opc70 S

More about P2PP checks to be performed when installing/configuring it.
Go to top of page

OT (tcl-tk version)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT TBD YES Several DB servers can be attached to OT tcl-tk; IP address and port number of each DB server are specified in the ~flowmgr/dfs/ohs/config/interfaces file.
The current DB server is set by the DSQUERY variable (pointing out to SEGSRV12 for instance).
Functionality accessed DB SQL statements
Check login permissions opc70 S
Create a queue obrep2 S, I, U
Append OBs to a queue obrep2 S
Save a queue obrep2 S, I, U (, D)
Load a queue obrep2 S
Update OB status obrep2 S, U
OB browsing obrep2 S

More about OT-tcl/tk checks to be performed when installing/configuring it.
Go to top of page

OT (Java version)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED-TIME-OUT TBD NO DB server is defined in ~flowmgr/dfs/dataflowJava/config/ot-db.cf

This file contains: name and port number of DB server, userID and password (in clear ...) and path to the Instrument Package: should be the same as the one used by P2PP !!!
Functionality accessed DB SQL statements
Check login permissions Opc70 S
Create a queue Obrep2 S, I, U
Append OBs to a queue obrep2 S
Save a queue obrep2 S, I, U (, D)
Load a queue Obrep2 S
Update OB status Obrep2 S, U
OB browsing Obrep2 S

More about Java-OT checks to be performed when installing/configuring it.
Go to top of page

FrameIngest
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT (the connection info is stored in a variable of the base class of all OLAS application and there is no need to disconnect, since that connection could be re-used) NONE NO See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (DPREP).
Functionality accessed DB SQL statements
Ingest FITS file keywords Observations, Asto & Ambient I, S
Write log informations in the olas_log table. BE AWARE, here, an OLAS routine spawns a child process to connect to the DB, log info message and exit. So, connection in ONLY WHEN NEEDED in that specific case. Observations S, U, I

Go to top of page

VcsOlac
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED : an OLAS routine spawns a child process to connect to the DB, log info message and exit NONE See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (DPREP).
Functionality accessed DB SQL statements
Write log informations in the olas_log table. Observations S, U, I

Go to top of page

Dhs
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED : an OLAS routine spawns a child process to connect to the DB, log info message and exit NONE See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (DPREP).
Functionality accessed DB SQL statements
Write log informations in the olas_log table. Observations S, U, I

Go to top of page

DhsSubscribe
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT NONE the connection info is stored in a variable of the base class of all OLAS application and there is no need to disconnect, since that connection could be re-used
Functionality accessed DB SQL statements
Read the rename schema from the table rename_schema S
Write log informations in the olas_log table.
BE AWARE, here only, connection is when NEEDED : an OLAS routine spawns a child process to connect to the DB, log info message and exit. See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (DPREP).
Observations S, U, I

Go to top of page

ASTO
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED NONE YES DB defined in $ASTO_CONFIG_DIR/libAm.config and in $ASTO_CONFIG_DIR/libAd.config
Functionality accessed DB SQL statements
Insert files in table media_files Asto I
Split files into volumes Asto I, U, D
Prepare a physical volume Asto S, U
Write a physical volume Asto S, U
Remove files from disk(already in db) Asto S, U
Insert files,present on media, in the asto DB Asto I
Mark a media as "On-line" Asto S, U
Cross check two asto tables Asto S

Go to top of page

AstoControl (GUI for ASTO system)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED NONE YES DB defined in $ASTO_CONFIG_DIR/libAm.config and in $ASTO_CONFIG_DIR/libAd.config
Functionality accessed DB SQL statements
Shows the current status of queues and volumes asto S
Mark a completed volume as "Done" asto U

Go to top of page

DataSubscriber
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED NONE YES DB server defined in DSQUERY
Functionality accessed DB SQL statements
Update Pi_subscriber table Asto S, U
Insert a line representing the translation table used by FTU Asto I

Go to top of page

Dfslog GUI
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED NO
Functionality accessed DB SQL statements
Read log messages generated by DFS processes Observation S

Go to top of page

Dfslog Daemon
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT YES
Functionality accessed DB SQL statements
Transfer syslog messages from DFS processes Observation I

Go to top of page

Juke-box SW (tracer)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED NONE YES DB server defined in DSQUERY
Functionality accessed DB SQL statements
Record files in the database Archive I, U

Go to top of page

Package Queue
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT NONE YES DB defined in $ASTO_CONFIG_DIR/libAm.config and in $ASTO_CONFIG_DIR/libAd.config
Functionality accessed DB SQL statements
Queue a volume (prepared by Dppacker) to the ASTO database Asto I

Go to top of page

Gasgano
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
NEEDED NO
Functionality accessed DB SQL statements

Go to top of page

Corrfits
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT YES See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (DPREP).
Functionality accessed DB SQL statements
Create new FITS files with updated header Ambient S

Go to top of page

Dppacker
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT YES See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (ASTOREP).
Functionality accessed DB SQL statements
Preparing volumes for writing external devices (CDs, DVDs Asto S, U
Queue a volume (specific -dbalias option when running ddppacker) Asto I

Go to top of page

DpmkSpace (part of SAS)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT NONE YES See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (ASTOREP).
Functionality accessed DB SQL statements
Free disk space on the DHS workstation by removing data files that have been already archived on permanent media ASTO & Observations S, D

Go to top of page

Cdb server (part of calibDB, in Garching only)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT NONE YES See the file ~/.dbrc. For every possible connection defined in the .dbrc file it is possible to define an alias that identify uniquely the connection. It is possible then to specify the -dbalias as command line option of the olas applications, otherwise a default value is used (CALIB)
Functionality accessed DB SQL statements
Cgi-bin server used to submit/retrieve calibration data from the Science Archive Idc I, S, U

Go to top of page

Dpserver (part of SA, in Garching only)
Connection type: PERMANENT=connection opened during the whole life of the DFS component;
NEEDED=only when needed and without any time-out; NEEDED-TIME-OUT=only when needed and with time-out
Deconnection time-out Running with an interface file able to handle several entries ? DB definition
PERMANENT NONE YES Hard-coded connection parameter
Functionality accessed DB SQL statements
Cgi-bin server for accessing the Science Archive Observations S

Go to top of page


 [Project and Developments]  [Overview page for this document]  [ESO]  [Index]  [Search]  [Help]  [News]