Node Services


Node Service Programmers Manual

API reference can be found at http://www.mcs.anl.gov/fl/research/accessgrid/documentation/developer/api_2_4

 

Example 1 - DebugService

 

  1. Download DebugService.zip
  2. Install the service

    agpm.py -z DebugService.zip

    Notes:
    On OSX, you must have sourced the setupenv.sh file
    On Windows, agpm.py must be run from the install directory
  3. In the VenueClient
    1. Preferences->Manage My Node
    2. Service->Add, DebugService
    3. Select DebugService, then Service->Configure
    4. Note GUI for configurable parameters

  1. Enter a Venue.  Open DebugService.log; note output logged in various method calls, if debug is on (which it is by default).

Exercise 1 - DebugService

 

  1. Extract DebugService.zip to a directory
  2. Open DebugService.py in an editor.
    1. Add TextParameter named ‘executable’ to service configuration
    2. Add code to run the executable specified in the parameter, when the Start method is called
    3. Add code to the Stop method to terminate the process
  3. Open DebugService.svc in an editor
    1. Modify the version to be 1.1, to indicate that this is a newer version of the DebugService
  4. Create DebugService.zip, containing DebugService.py and DebugService.svc
  5. Install the modified service

    agpm.py -z DebugService.zip
  6. Add the DebugService and enter a Venue (steps 3 and 4 in the example above).Open the service configuration (Service->Configure) and set the value in the executable field to a valid executable file (e.g. /usr/bin/xterm, c:\windows\notepad.exe)



  7. Enter a Venue; the specified executable should be run.When changing Venues, the executable should be stopped and restarted.

    Solution:DebugService_Solution.py

Example 2 - ClientAnnouncerService

 

  1. Download ClientAnnouncerService.zip
  2. Install the service

    agpm.py -z ClientAnnouncerService.zip
  3. In the VenueClient
    1. Preferences->Manage My Node
    2. Service->Add, ClientAnnouncerService
    3. Select ClientAnnouncerService, then Service->Configure
  4. Enter the specified Venue (ask if it hasn’t been specified).  Your name should appear in the ClientViewer

Exercise 2 - ClientAnnouncerService

 

  1. Open the ClientAnnouncerService.py file in an editor
  2. Uncomment the two sections specified in the code
  3. Open the ClientAnnouncerService.svc file in an editor
    1. Increment the version number to 1.1
  4. Create ClientAnnouncerService.zip, containing ClientAnnouncerService.py and ClientAnnouncerService.svc
  5. Install the modified service

    agpm.py -z ClientAnnouncerService.zip
  6. Add the ClientAnnouncerService and enter the specified Venue (steps 3 and 4 in the first example).  Your name should appear in the ClientViewer.
  7. Open service configuration for the ClientAnnouncerService, setting the widearea parameter to ‘Off’.   Your name should move from the Global ClientViewer to the Venue ClientViewer.

Additional Example - ClientViewer

 

  1. Download ClientViewer.zip
  2. Extract the ClientViewer.zip file to a directory
  3. Run the program

    python ClientViewer.py address port