Overview: Need to integrate R library with a web server written in python. I have explored some of the options commonly mentioned on different blogs and stack overflow threads. The threads I have come across compare libraries like Rpy2 and pypeR and provide specific answers to integrate R and python. What I am looking for is a general solution so that the R code can be accessed by a multitude of programming languages/clients (for future extensibility).
Requirements:
- R code should run separately to handle heavy computation and not be embedded into the application server.
- R module should be scalable and easily maintainable. ex- any change to the application server (written in python) should not trigger changes in the R code.
- R module can be used as an API for further application development using web frameworks other than python.
Options already explored:
- rpy2, pypeR: One option is to write a separate python server and let that server handle R code using rpy2. The app server can send requests to the second server.
- Rserve and pyRserve: Use Rserve and pyRserve client to communicate between R and python.
- Apache Thrift and Protocol Buffer: rprotobuf is an interface for R to make it work with Protocol Buffer but I could not find any support for R in Apache Thrift. Will something like Thrift or protocol buffer be better than creating an R server.
- Rapache and Rook: Use Rapache and Rook package in R to setup a server for processing requests.
- deployR: Created by Revolution Analytics.
Which among these would be an ideal choice or any other option which is not in the list?