stam.serve               package:stam               R Documentation

_S_t_A_M _s_e_r_v_e_r _l_a_u_n_c_h _a_n_d _i_n_s_t_a_l_l_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     stam.serve installs StAM's server feature if it has not been
     installed  before. Moreover it launches the StAM server needed to
     use StAM output  interactively through the internet.

_U_s_a_g_e:

     stam.serve(tmp.path = NULL, cgi.path = NULL, cgi.url = NULL)

_A_r_g_u_m_e_n_t_s:

tmp.path: the path to the directory where files are stored for 
          communication between your WWW-server and the StAM-server.

cgi.path: the path to the directory in which the StAM-related CGI 
          scripts are to be stored. Make sure that your WWW-server can
          execute  CGI scripts from here and that access rights are set
          correctly.

 cgi.url: the URL prefix needed to access the CGI scripts, i.e. the 
          directory specified in cgi.path.

_D_e_t_a_i_l_s:

     The stam package provides a feature to manipulate some parameters
     interactively using HTML forms. This feature needs a WWW browser
     which is able to execute CGI scripts. The HTML output used to work
     with interactively must be generated with the stam.write.forms
     option turned on. 

     StAM provides a set of CGI scripts which are called from the forms
     written into  the HTML code when the above mentioned option is
     turned on. This scripts write  task files into the directory given
     by tmp.path. This directory must have write permission for the WWW
     server. The StAM server regularly checks this directory for such
     tasks and executes them. 

     stam.serve installs the StAM server feature when it is called the
     first time after  the installation of the stam package. Firstly,
     this consists of registering the  three parameters of stam.serve
     into the package installation such that they can be  reloaded when
     the packages is loaded into R the next time. For this purpose a 
     dataset is written into the installation, thus you need write
     permissions in the  corresponding directory. Secondly, the cgi.url
     is written into StAM's CGI scripts  and these scripts are written
     into the cgi.path. 

     When the installation of StAM's server feature is complete,
     stam.serve starts  checking the directory where it expects the
     tasks written by the CGI scripts and  is thus ready for operation.
     After the server feature has been installed the server can be
     launched simply by calling stam.serve() without parameters. A
     second call with parameters modifies the StAM server installation
     accordingly.

_N_o_t_e:

     *  You need write permission in the stam installation directory 
        in order to install StAM's server feature.

     *  You need write permission in the directory where the CGI
        scripts are to be deposited in order to install StAM's server
        feature.

     *  You must regenerate all HTML you want to work with through the 
        stam server after installation of the server feature.

     *  You must turn on the stam.write.forms option when generating
        HTML for use with the server feature.

_A_u_t_h_o_r(_s):

     Claudio Lottaz

_S_e_e _A_l_s_o:

     'stam.writeHTML'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     # make sure subsequent calls to stam.writeHTML generate forms
     options(stam.write.forms=TRUE)

     # first call to stam.serve after installation of the stam package
     stam.serve(tmp.path = "/home/myhome/upload", 
                cgi.path = "/home/myhome/cgi-bin/stam",
                cgi.url  = "http://www.myserver.com/cgi-bin/stam")

     # subsequent calls to launch StAM server without modifying the installation
     stam.serve()
     ## End(Not run)

