Jesus Loves GRASS

Technical blog about GRASS/GIS,open source geoinformatics and MAPSERVER.

Thursday, August 02, 2007

RSOAP server

R is excellent for advance calculations like geostatistics or data set processing. In modern days with web 2.0 were everything is done in the web and not on the desktop it would be practical to have R as a server to process requests.

R can integrate in common internet languages like Python, Perl and PHP (this integration is still a bit weak....). These languages simple use R as an extension/module of their own features, another option is to access R as a web service, allowing for R to be a server replying to the requests of clients (what ever the client might be)

SOAP is a protocol for exchanging XML messages over networks, these messages can contain data, execution calls etc., using the RSOAP module (that was developed using RPy) it allows for R to work as a server replying to requests made using this protocol.

The RSOAP 1.1.4 depends on R>=1.4.1 ; Rpy >=0.3.0 ; PyXML >=0.7 ; Python >= 2.1 ; SOAPpy >= 0.9.8 and R-library session >= 1.0

All the necessary tools are simple to install and don't give major headaches.... (python setup.py install tango dance....)

The RSOAP runs as total independent process listening to a specific port. In the script directory or RSOAP (in my case: /usr/local/src/RSOAP-1.1.4/scripts) there is the RSOAPManager script that activates the RSOAP server. As specifications it is possible to define the port to be used as the SOAP server and to the lower and upper limit of the R session ports, and of course the always useful debug options

Basically RSOAP starts a SOAP server at port 9081, this port listens for requests of R sessions. After a request for a session is made, the server opens a port (starting with 9082+1 till 65535 ) for R command listening, this allows for 1 SOAP server to process different sessions from different clients at different ports.

Using the –debug option the .config.dumpSOAPout=1 and .config.dumpSOAPin=1 (options of the SOAP server object) will be activated dumping all the SOAP requests to the shell for debugging, this is very useful....

Labels: , ,

0 Comments:

Post a Comment

<< Home