On Fri, Jan 28, 2005 at 12:30:53PM -0800, ebashi wrote:
> Perl is the common language to write CGI scripts which handle
> Forms. My question is that can R be as fast as perl to do the same
> job(with using CGIwithR package). Is it an optimal solution to
> connect R directly to a commercial HTML webpages,
First of all, why are you asking this on the r-sig-finance list? The
question does not belong there.
Secondly, if you care about speed and "optimal solutions", CGI is
absolutely the last thing you want to use, regardless of whether you
write your scripts in Perl, R, or any other language.
For high-performance dnamic web pages, the most typical approach is to
embed a scripting language interpretor directly into the web server -
Tcl for AOLserver, mod_perl for Apache, etc. Alternative approaches
include designs like FastCGI. This is basic web stuff that was all
figured out long ago, perhaps c. 1997. (Go google and read up on it.)
I don't have any links handy, but there are definitely some existing R
projects which let a web server efficiently evaluate R code by passing
it to an already running R process/server. That's what most people
want, not to build a sophisticated dynamic website entirely in R.
On the general web front, here are some ancient (but good)
introductions to some of the basic concepts:
http://philip.greenspun.com/panda/
http://philip.greenspun.com/wtr/aolserver/introduction-1.html
And the docs for one good current toolkit which uses all those ideas:
http://openacs.org/doc/
--
Andrew Piskorski <atp at piskorski.com>
http://www.piskorski.com/