Changes between Initial Version and Version 1 of import_generic


Ignore:
Timestamp:
03/18/12 16:16:14 (9 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • import_generic

    v1 v1  
     1[[PageOutline]] 
     2 
     3= [wiki:Earthworm Earthworm] Module: import_generic = 
     4'''Contributed by: ''' 
     5 
     6== Function == 
     7Imports EARTHWORM messages over Internet (partner to export_generic) 
     8 
     9== Details == 
     10[wiki:Import-Export Import-Export Overview] 
     11 
     12=== EXAMPLE CONFIGURATION FILE === 
     13 
     14{{{ 
     15# 
     16# import_generic configuration file 
     17# 
     18# This is the companion receiver for export_generic and export_scn. It 
     19# initiates a connect request to the export specified in this file. It 
     20# will accept any legal message from the export it connected to, and put 
     21# it into the ring it's attached to. The logo of the message will the same 
     22# as it was in the originating system. 
     23# If the heartbeat string it receives doesn't match, it will quit operations. 
     24# If the expected heartbeat is not received within "SenderHeartRate" seconds, 
     25# it will re-initialize the connection. 
     26#Background: 
     27# Import/Export are the long-distance message transfer 
     28# modules. They operate as one-on-one pairs. There are two variants of 
     29# export: export_generic, which ships messages with specified logos, and 
     30# export_scn which ships only trace data, but with specified SCN names. 
     31# 
     32# Import/Export send heartbeats to each other, as well as into their 
     33# local earthworm systems. If the heartbeat from the distant partner is 
     34# not received whithin the expected time period (RcvAliveInt) the link is 
     35# terminated, and an attempt to reconnect is initiated. If things go 
     36# seriously wrong, the heartbeat into the local earthworm system in 
     37# stopped. The expectation is that "restartMe" has been set in the .desc 
     38# file, and we'll be killed and restarted. 
     39# 
     40# All socket operations are performed with a timeout. This is noramlly 
     41# defaulted, but can be set in this file (SocketTimeout). 
     42# 
     43# Export maintains a circular FIFO buffer of messages to be shipped. The 
     44# size of this buffer (RingSize) controls the maximum latency of the 
     45# data. 
     46# 
     47# 
     48#Configuration notes: 
     49# 
     50# "restartMe" should be stated in our desc file. 
     51# 
     52# The period of our local heartbeat (HeartBeatInt) must be safely smaller 
     53# (faster) than our advertised period in our .desc file (tsec:). 
     54# Otherwise we'll get continually restarted for no good reason. 
     55# Note that tsec:0 implies no heartbeats expected, and so we'll never get 
     56# restarted. 
     57# 
     58# The rate at which we send heartbeats to our distant partner should be 
     59# considerably faster than the rate at which our partner expects them. 
     60# Otherwise, a heartbeat delayed in transmission will cause our partner to 
     61# conclude that the link is broken, and cause them to break the link and 
     62# reinitialize. Which will cause us to do the same. 
     63# 
     64# For export, the ServerIPAdr is  the address of the port to be used in 
     65# the exporting machine.  This is to specify a network card case the 
     66# exporting machine has several network cards. 
     67# 
     68# If SocketTimeout is specified, it should be at least as large as the 
     69# expected period of heartbeats from our distant partner. 
     70# 
     71 
     72 MyModuleId     MOD_IMPORT_GENERIC   # module id for this import, 
     73 RingName       PICK_RING            # transport ring to use for input/output, 
     74 HeartBeatInt   120                  # Heartbeat interval in seconds 
     75#                                     Should be >= SenderHeartRate 
     76 LogFile        1                    # If 0, don't write logfile at all, 
     77 
     78 MaxMsgSize     65000           # maximum size (bytes) for input/output msgs 
     79# Note: If an oversized message is received, it will be discarded, the 
     80#       socket will be closed, log an error, and it will connect and try 
     81#       again. 
     82 
     83 MyAliveString  "MenloAlive"    # heartbeat text to foreign server machine 
     84 MyAliveInt     120             # seconds between alive msgs sent to server 
     85                                # 0 => no alive messages to sending machine 
     86 
     87# Sender description follows: 
     88SenderIpAdr     aaa.bbb.c.ddd   # Ip address of the machine we're to listen to 
     89SenderPort      16005           # IP port number used by sender 
     90SenderHeartRate 60              # Sender's heart beat interval in seconds 
     91                                # 0 => no heartbeat expected 
     92SenderHeartText    "alive"      # Sender's heartbeat text 
     93 
     94# Optional commands: 
     95 
     96#SocketTimeout 60000 #Timeout for Socket_ew calls in milliseconds 
     97                     #Should be atleast the SenderHeartRate 
     98                     # Will default to SenderHeartRate 
     99#HeartbeatDebug 0    #Change this to 1 to get heartbeat debug messages. 
     100#SocketDebug 1       #Change this to 1 to get socket debug messagese. 
     101}}} 
     102 
     103== Helpful Hints ==