Say I want to have a simple web app that takes some user input, performs a quick calculation in some predefined R script, and returns some cool looking graphic with say ggplot. One way to do this would be:
- Have PHP accept some input from a web form
- Sanitize the user input in PHP
- Send the arguments to some pre-written R script using some combination of the PHP exec() command and Rscript
- R does some calculations and saves the plot graphic to the server as well as some meta info to a MySQL database
- The client can then access their cool new graphic from their web browser
This seems fairly straight forward to me. Thus my question is, what advantages would the rapache package have over the process described?