blob: 6710c3ef84e753b5c779f7eb3ecdffadd192ae96 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-Style-Type" content="text/css"/>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"/>
<title>R Remote Console - R Server</title>
<meta name="copyright" content="Copyright (c) 2009, 2019 Stephan Wahlbrink and others. SPDX-License-Identifier: EPL-2.0 OR Apache-2.0"/>
</head>
<body>
<h1>R Server (RJ)</h1>
<h2 id="general">General</h2>
<p>The RJ server is an R server using Java for process control and communication.
It uses Java <b>R</b>MI technology [<a href="#ref1">1</a>] for the client server communication
and <b>J</b>RI [<a href="#ref2">2</a>] for the integration of R in Java.
One server provides a single R session. You can start multiple servers for the same or for
different user on one machine without problems. The different R sessions are registered in
the RMI registry and distinguishable by their names.</p>
<p>The RJ server is designed for usage in an intranet, but it also offers the option to use an
SSH tunnel for the connections in less secure networks.</p>
<h4>Security</h4>
<p>Because of the single session approach of the RJ server, one usually starts the server
under the user account of the R user. So the R users have the same permissions like in a
SSH shell. The login name of the user account defines the "owner" of the R session.</p>
<p>To make sure that no other user obtains the rights of the R session owner, the client
server protocol supports login authentication. The default package provides several methods
e.g. using PAM of the host system. See the startup script for a list of available methods
and their configuration. You may also develop and use your custom methods. It is possible to
disable the authentication by setting it to the method <code>none</code>. All methods provided by
the package uses public key mechanism to encrypt the login data (but no host validation).</p>
<p>The R exchanged data like user input and result output are not encrypted.</p>
<h2>Requirements</h2>
<p>Because the server is based on Java, it works theoretically on any platform fulfilling the
following requirements:</p>
<ul>
<li>Java: Java version &ge; 6 (1.6), Standard Edition (SE) or greater</li>
<li>R</li>
<li>R package 'rj'</li>
<li>R package 'rj.gd' for graphic support</li>
</ul>
<p>Note that the version of the parts of RJ in StatET, the console server and the R packages
must be compatible (same major and minor version, if not published otherwise).</p>
<h2>Setup / Startup</h2>
<p>A server bundle containing all files is provided on the homepage. The bundle contains all
program files and startup scripts, but not the requirements listed above.</p>
<p>The server requires a running Java RMI registry. The program <code>rmiregistry</code> is usually
included in the Java distribution. In most case a single RMI registry per computer is
sufficient; sometimes it can be handy to use a registry per user. For example you can setup a
system job for the registry or insert a start command for the registry in the startup script.</p>
<h4>Setup</h4>
<ol>
<li>Make sure all requirements listed above are installed on the server.</li>
<li>Download the <i>consoleserver</i> file from the homepage and extract it into
a directory of your choice (default is '~/.RJServer/').</li>
<li>Read the instructions in the startup and set the required configuration variables.</li>
<li>Start the RMI registry, if not yet done, e.g.:
<code>${JAVA_HOME}/bin/rmiregistry &amp;</code> .</li>
</ol>
<h4>Startup</h4>
<ol>
<li>Start a server session as shown in the instructions of the startup file, e.g.:
<code>startup.sh mysession</code> .</li>
<li>In StatET, <a href="r_remote_console-launch.xhtml">create a R Remote Console</a> for the
server and finally start the R session.</li>
</ol>
<p>It is also possible to run the first step automatically when starting the session in StatET
(second step) by using the launch type "Start over SSH" in the launch configuration of the R
Remote Console.</p>
<h4>Troubleshooting</h4>
<ul>
<li>Check the log files, they are located in the directory specified by the configuration
variable <code>RJS_WORK</code> (by default '~/.RJServer/') of the startup script.</li>
<li>Enabled the debug mode by using the argument <code>-debug</code> for the startup script,
e.g.: <code >startup.sh mysession -debug</code>
(does not work in combination with the launch type "Start over SSH").</li>
</ul>
<br/>
<p>
<a id="ref1">[1]</a> Java Remote Method Invocation (RMI), http://java.sun.com/javase/technologies/core/basic/rmi<br/>
<a id="ref1">[2]</a> Java/R Interface (JRI), http://www.rforge.net/JRI<br/>
</p>
</body>
</html>