[R] R as a web service
Martin Morgan
mtmorgan at fhcrc.org
Sat Sep 26 21:45:03 CEST 2009
Carlos J. Gil Bellosta wrote:
> Dear R-helpers,
>
> I have been inquired about the possibility of developing a web
> distributed scoring system: a model is created in a central location,
> users fill a form in their browsers, and the central server calls this
> model and returns a YES/NO answer to them.
>
> I am tempted into using R for this assignment. I have used Rapache for
> similar tasks, but I am afraid that it is too of a novelty for many
> backward looking IT departments. For a number of reasons, a Java based
> infrastructure (tomcat, web services, etc.) would be much more palatable
> for them.
>
> My wishlist is as follows:
>
> * Minimal infrastructure changes in case of (statistical) model updates
> or changes.
> * Solid management of concurrence, so that simultaneous connections do
> not interfere with each other.
> * Maximum efficiency so that new connections do not require a fresh R
> startup.
>
> Any ideas on how to achieve this? Any documentation available?
Hi Carlos --
See RWebServices
http://www.bioconductor.org/packages/bioc/html/RWebServices.html
as one possible solution. This produces a Java-based SOAP front end for
tomcat (probably good for the IT guys) with tasks dispatched to a series
of java-embedded R 'workers' to handle concurrency (probably not so good
for the IT guys, as this requires maintaining the infrastructure for the
service / worker communication and for handling gracefully the demise of
workers). The workers are persistent, and can have their R
implementation changed independent of the web service (though that is
not necessarily best practice). The relevant vignettes are 'Enabling
packages as web services' and 'Installing and testing...'. This is in
ongoing development, so use R-devel (and the appropriate RWebServices).
Martin
>
> Best regards,
>
> Carlos J. Gil Bellosta
> http://www.datanalytics.com
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M1 B861
Phone: (206) 667-2793
More information about the R-help
mailing list