8. Der Requester

Der Requester empfängt Anfragen über einen Web-Server von einem Internet Browser.

8.1 Setup

Der Requester wird von Magic in dieses Verzeichnis installiert:
Uns interessieren zwei Dateien
  • mgrqcgi   - der Requester
  • mgreq.ini - die Ini-Datei des Requesters
Die beiden Dateien müssen in das Script-Verzeichnis des Web Servers kopiert werden. In dem Verzeichnis
sind die Einstellungen für Apache abgelegt. Dort muß man nur noch nach dem Begriff "ScriptAlias" gesucht werden. Bei Red Hat heißt dieses Verzeichnis "/home/httpd/cgi-bin" und bei SuSE "/usr/local/httpd/cgi-bin". Die beiden Dateien müssen jetzt dort hin kopiert werden.


Wenn der Requester initialisiert wird, wird "MGREQ.INI" eingelesen.
Gateway =  1 Gateway Describes the middleware that will be used by a requester. Gateway = 1 means use Magic Broker.
Syntax: Gateway = number
MessagingServer = 
AltMessagingServer = 
2001 The addresses of the Magic Request Brokers (MRB) that will receive the requests 
Syntax: MessagingServer = node name/port number
BrokerTimeout =    The maximum time, in seconds, that the request waits for an available engine to be returned by the MRB. If the MRB cannot provide an available engine within this time, the requester returns on of the following two error codes:
APP-NOT-FOUND - the application is not listed in the MRB's internal database.
APP-IN-USE - the application is listed but the supporting engine is busy. If the value is 0, the Magic engine never returned by the MRB.
Syntax: BrokerTimeout = n
ServerTimeout =    The interval, in seconds, that the Magic engine will return an I-AM-ALIVE message during the task execution, for SYNC calls only. The client determines thetimeout interval when submitting the request. The equivalent for MAGIC.INI is the Communication Interval parameter in the Multi-User section of the Evironment dialog.
If the value is 0, the Magic engine does not send I-AM-ALIVE messages to the requester.
Syntax: ServerTimeout = n
RequesterTimeout =    The maximum time, in seconds, that the requesters waits for the completion of a task. If the value is 0, the completed task execution time is unlimited.
Syntax: RequesterTimeout = n
Priority =  0 Optional. 
The default priority for requests that were not assigned a specific queue priority, 0 to 9 with 9 as the highest priority. The priority is used by the MRB only, to assign free engines to unprioritized requests.
Syntax: Priority = 0
Username = 
Password = 
Optional. The default username and password that is submitted with requests that are unidentified.
Username = magicadm
Password = magicpasswd
DefPath = 
DefName = 
  Optional. A directory and filename default for a requests specified without a filename.
DefPath = /usr/magicadm/cgi-bin/
DefName = webapp.html
DefHtml =    A filename that can be queried by an Internet requester that can be display if the called program does not retrun an HTML result.
HttpVars =  REMOTE_ADDR,
A list of enviroment variables that are sent from the Web server to the activated task, using different requesters: NSAPI, ISAPI, or CGI. Insert an space before and after "=" on no spaces between the variables!
Syntax: httpVars = VarName1,VarName2
Appl =    Allowed application names separated by a comma. When not specified all applications are allowed.
Syntax: Appl=applic 1, test 2, abc,...
LocalHost =     
Log =  REQ.LOG y s A log file that can be used to view the low-level activities of the Code Partitioning mechanism: sending and receiving messages & tcp/ip activities.One log file or several at a time can be used for all the components involved in the architecture : The Broker, The Engines & the Requesters (Magic 8 client, Command Line
Requester, Internet Requesters).For the Broker & Magic 8 (Requester & Engine) this is the ONLY entry that will be relevant. All other entries will in as usual in MAGIC.INI.
Syntax : Log=(FileName Sync Mode)FileName: Any valid name, not including spaces.
  1. Y  The log file will be opened & closed for each line. This enables deletion of the file while components are still loaded in memory.
  2. N  The log file will be opened & closed only during the component initialization / termination, respectively.
  3. F  Each line to be printed will be flushed to the log file,but the log file will still be opened & closed only during the component initialization / termination.
  1. C  Minimal. Only remote calls creation, submission (for Requesters) & execution (for the Broker & Engines). This mode will also display the parameters sent / received.
  2. S  Average. High level protocol (MRI) & low level protocol (TCP/IP) will also be displayed.
MGSRVR02 =  MGMQC20.dll, N, mq.log, LogSyncFlush, MQseries parameters  
MGSRVR02 =  MGMQS20.dll, N, mq.log, LogSyncFlush, MQseries parameters  
MGSRVR03 =  MGDQ.dll, N, dq.log, LogSyncFlush, Data-queue parameters