Changes between Version 4 and Version 5 of ew2mseed


Ignore:
Timestamp:
02/26/12 15:59:35 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ew2mseed

    v4 v5  
    7474WaveServer 136.177.31.10 16022 
    7575}}} 
    76 2. All available !WaveServers are first registered in the configuration structure of ew2mseed.  If we follow the example configuration above, in particular, there will be created a WaveServer linked list containing 3 WaveServers. 
     762. All available !WaveServers are first registered in the configuration structure of ew2mseed.  If we follow the example configuration above, in particular, there will be created a !WaveServer linked list containing 3 !WaveServers. 
    7777 
    78783.  ew2mseed calls a function  int processWsAppendMenu (RINGS *rn, WS_MENU_QUEUE_REC *menu) , which uses EW library function wsAppendMenu() in a loop for each !WaveServer. wsAppendMenu() can either append a current !WaveServer menu or return an error indicating that the connection to the !WaveServer is not available. The main task of processWsAppendMenu () is to fill up the !WaveServers structure WS_MENU_QUEUE_REC *menu. This structure is later used for getting data snippets. As long as at least a single !WaveServer is available, the WS_MENU_QUEUE_REC *menu structure is not NULL and function processWsAppendMenu () returns the number of available !WaveServers from the list. If no !WaveServers are available, processWsAppendMenu () does not return. In this case it idles for 20 seconds and attempt to connect to !WaveServers again. An operator can examine the log file and kill the instance of '''ew2mseed''' manually if he/she realizes that the !WaveServers declared in the configuration will not be available. 
     
    80804. Let us suppose that we passed the stage (3) and found out that, for example, two out of three !WaveServers declared in the configuration file are running and their data are available.  We now search through every available !WaveServer and create a list of available PSCNLs. If no PSCNLs is available, the program quits. 
    8181 
    82 5. If we are here, it means that more than 0 !WaveServers provide more than zero PSCNLs.  In other words we entered the main loop of ew2mseed. In the main loop, the core call is to int wsGetTraceBin (TRACE_REQ* getThis, WS_MENU_QUEUE_REC* menu_queue,  int timeout).  wsGetTraceBin() is a library function from WaveClient library and it is declared as being able to extract data from multiple !WaveServers. Here is an extract from wsGetTraceBin() documentation: 
     825. If we are here, it means that more than 0 !WaveServers provide more than zero PSCNLs.  In other words we entered the main loop of ew2mseed. In the main loop, the core call is to int wsGetTraceBin (TRACE_REQ* getThis, WS_MENU_QUEUE_REC* menu_queue,  int timeout).  wsGetTraceBin() is a library function from !WaveClient library and it is declared as being able to extract data from multiple !WaveServers. Here is an extract from wsGetTraceBin() documentation: 
    8383{{{ 
    8484                 Retrieves the piece of raw trace data specified in the  
     
    9494=== Catch-up algorithm (new in version 02-Apr-2002) === 
    9595 
    96 The problem description: ew2mseed receives high volume of data from heterogeneous set of channels; due to the various reasons (connection speed is the most important), some channels are later than the others. We implemented an algorithm which forces  ew2mseed to request more information from the later channels. 
     96The problem description: ew2mseed receives high volume of data from heterogeneous set of channels; due to the various reasons (connection speed is the most important), some channels are later than the others. We implemented an algorithm which forces ew2mseed to request more information from the later channels. 
    9797 
    98   1) Each channel has a configuration structure. We add a new integer field "Priority" which indicates  a factor at  which we increase the parameter !RecordNumber for a given station. That is, if  Priority  is 2 for a channel, it will poll twice  more data form the !WaveServer relative to the channels with GetTraceTimes = 1. At the init stage each channel sets "Priority" to the default 1. 
     98  1) Each channel has a configuration structure. We add a new integer field "Priority" which indicates  a factor at  which we increase the parameter !RecordNumber for a given station. That is, if  Priority  is 2 for a channel, it will poll twice  more data form the !WaveServer relative to the channels with !GetTraceTimes = 1. At the init stage each channel sets "Priority" to the default 1. 
    9999 
    100100 2)  We count number of loops over all channels.  After '''!LoopsBeforeService''' (configurable parameter, default value = 50)  production loops  for each channel we compute the TIME of the snippet we currently process and  AVERAGE TIME for all channels.