Guidance Forums / Reginald Rexx / Variable Server

Search 搜索
Home Home

Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Variable Server
Posted by: PeterJ 2009-01-06 18:14:49 Last edited by: guidance 2009-01-08 08:34:48 (Total edited 6 times)
I uploaded a variable server which allows to keep rexx stem variables and let client
rexx scripts use and change them:

    - Reginald installation
    - newest REXGUI (uploaded by Jeff 1.1.09)
    - RXCLIP
    - RXCMD

Those of you, who are not keen on concepts, proceed to II Samples.
Documentation: not available, but can be produced if someone is interested. 

I Concepts
1 Variable Server
    - Reading saved variables on start up time   
    - Responsible for keeping the variables
    - Save variables on a frequent basis
    - Wait for requests of a Client Task (CT)  
    - Run Client Processing Tasks (CPT) and return output to the CT
2 Variables kept by the server
    - the variables kept by the server are always stems.
    - they must declared in VarserverINI together with the save directory
    - all subsequent tails will be shared, saved, and reloaded on startup
3 Client Processing Task (CPT)
    - is the variable processing task, accessing and manipulating the variables
    - all server variables are visible to it
4 Client Task (CT)
    - triggers the server to “run” a specific rexx script as CPT
    - the CPT may produce output, which will be returned to the CT.

II Sample
The sample which I implemented contains 2 stems which are managed by the server
Cities contains all cities with a population greater than 1 million, together with the population and the country. Look at CITIES.rex
Countries contains all countries, together with the capitol, the population and the size -> countries.rex. The list may not complete

1. to setup the server unpack the files and save them in a directory of your
   choice (keep them separate from your normal rexx scripts.
2. As the server is empty we need to load up the data
   a. RUN the script LOADDATA.rex
   b. The server will start up automatically
   c. And the scripts countries.rex and cities.rex will be executed
     (triggered from LOADDATA.rex)
3. Now the data (stems) are placed in the server and are accessible
4. Take a look at the Variable Server window, you will find the last
   actions monitored
5. You can press now the save button, which will save the contents of the stems
   on flat files. If you don’t save manually, it will be done every 3
   minutes automatically, or if you shut down the server.
6. Run now ReportData1.rex and ReportData2.rex. They contain a call to 2
   procedures which report on the Server variables. ReportData1 and
   ReportData2 are actually passing the request to the server where it’s
7. The output which is returned from the server is displayed with
   say statements. 
8. After Save of shutdown you will find the save data in:
9. if you restart the server these data will automatically fetched and are
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
© Wed 2024-2-21  Guidance Laboratory Inc. Hits:0