Tuesday, December 16, 2008

Multithreaded XML-RPC Servers for Tag Extraction

There are now two extraction servers running new version of XML-RPC InteractiveServer: lxvm0341:10001 and voatlas18:10001.

Servers can be accessed using standard tools, via command line on CERN AFS:
# Get Java and Athenaeum
source /afs/cern.ch/sw/lcg/external/Java/bin/setup.sh
# Get list of available tasks
# Get Server Help
athenaeum http://voatlas18.cern.ch:10001 insider Help
# Get environment of the running Server
athenaeum http://voatlas18.cern.ch:10001 insider Info
# Get log of recent tasks
athenaeum http://voatlas18.cern.ch:10001 insider Log

or via Athenaeum Web Service:

Updated documentation is available at Server setup and Client example Wiki pages.

The XML-RPC server implementation (together with managemetn and testing tools) is available from the Database/TAGPoolServices CVS package. There are two important changes with respect to the original server provided within Atlantis:

  • The remore message is gzipped by the modified SimpleXMLRPCServer.py file.

  • The server is multithreaded, it can server several clients in parallel. The executed scripts should take that into account while handling global variables and environment. All stdout and stderr messages go into server log files. All returns from the functions should be passed using answer global array and process pid, like this:
    def MyFunction(pid,...)
    resultMsg = ""
    resultMsg += "done for " + pid
    global answer
    answer[pid] = resultMsg

    The calling function should specify pid formal argument, it will be filled by Athenaeum:

No comments:

Post a Comment