Using the Rover Server


There are two ways to use the Rover server: standalone daemon and as a forked server.

Standalone Daemon Server Advantages

  1. It avoids the fork associated with running as a CGI-BIN program.
  2. It maintains persistent state on the basis of a tuple consisting of: <Host, user, service>.
  3. It reuses output buffers across calls.
  4. It guarantees FIFO processing of client requests. The server uses the MSGID, USER, and HOST fields of requests to order incoming requests.

Standalone Daemon Server Disadvantages

  1. It executes each operation as the target user; to do that it needs to be able to setuid to any user. It does this by running as root and setting its effective uid to the target user. It does not change the real uid; this is a potential security hole.
  2. It is currently single-threaded.
  3. It only accepts requests using the POST method.

Forked Server Advantages

  1. Server state is guaranteed to be completely reset before each request is serviced (since a new server is started for each request).
  2. Several servers can be simultaneously executed to service multiple, simultaneous requests.
  3. It accepts requests using either the POST or GET methods.

Forked Server Disadvantages

  1. It has a start-up performance penalty caused by the extra processing done in the httpd to support general purpose HTTP requests and because the forked server is started by a fork and exec operation.
  2. It does not always preserve the FIFO ordering of requests. Multiple outstanding requests may be serviced out of order if the kernel accepts the incoming connections or schedules the forked servers in a non-FIFO order.

Performance

Overall, performance-wise, the Standalone Daemon server is a better choice than the Forked server. However, memory leaks may cause problems with the Standalone Daemon that would not negatively affect the Forked server.


Using the Standalone Daemon Rover Server

The executable for the Standalone Daemon Rover server is located in the httpd server's cgi-bin/rover directory under the name nph-rover. The server is setuid root and logs all debugging output to stderr. Upon startup, the server creates a child process. The child process listens for incoming requests either on port 9090, or on the port specified by the optional command line argument (-port number). If the child server ends for any reason (e.g., fatalError), the parent server will report the cause of the termination and start a new child server. The Standalone Daemon Rover server only recognizes requests using the POST method.

Sample usage:
nph-rover [-port number] >& debug_log

Using the Forked Rover Server

The executable for the Forked Rover server is located in the httpd server's cgi-bin/rover directory under the name nph-e-mailwrap. The server is setuid root, has no command line arguments, and logs all debugging output to stderr (which the httpd server redirects to the logs/error-log file). The httpd server can pass requests to the Rover server using the POST or GET methods.

The Rover server is started automatically by the httpd server.


Last updated by $Author: adj $ on $Date: 1997/12/02 00:43:18 $.
Copyright © 1995-1998 Anthony D. Joseph and Massachusetts Institute of Technology