Chapter 12. The application server
Prev | Part IV. Reference manual | Next

## Chapter 12. The application server

refdbd is the RefDB application server, i.e. a program that runs in the background and handles the requests from the RefDB clients. This is the program that directly interacts with the database server and does most of the serious work.

refdbd can be configured at startup with the configuration file `refdbdrc` or by passing command-line options. The latter override the corresponding settings in the configuration files. While refdbd is running, most of the parameters can be changed remotely with refdba (see the refdba command confserv), but to make changes permanent you'll have to edit the configuration file or the script line that starts refdbd.

### Warning

In the current implementation, the remote administration via refdba uses a fairly indirect access control. If this is a concern, you should not enable remote administration (it is disabled by default). You can use the command refdbctl reload instead to cause refdbd to reread its configuration file while running. Then the usual access controls for editing the configuration file and for sending a signal to a process apply.

You can run refdbd as a standalone application or as a daemon. The main difference between the standalone process and a daemon process is the fact that the daemon is no longer associated with a particular terminal. This means that no output to stdout or stderr will ever show up on a terminal and that the process will keep running even if the terminal that started the process terminates. This is good if you want it running unattended, similar to a web server or a ftp server. On the other hand it can be handy for debugging purposes to directly get log output (or additional `printf()` output) on a terminal and to use the standard ways of process control, e.g. to kill refdbd with Ctrl-C. The `-s` command line switch lets refdbd run as a normal application for exactly this purpose.

The above holds true for almost any Unix-like operating system. On Windowsish operating systems the story is somewhat different. First of all, the Win95/98/ME family does not support daemons at all. WinNT/2000 do support daemons (they're called “services” here just for the sake of having a different name for the same thing). The simplest way to run refdbd as a NT service is to use a service installer as described in the Installation chapter. In this case you should run refdbd as a standalone application (i.e. include the `-s` switch), as the installer will take care of all the magic. Another possibility is to start refdbd from Cygwin inetd. In that case you'd run refdbd as a daemon again, but this is currently beyond the scope of this manual.

You can run refdbd as a daemon either from the command line, i.e. start it manually when you need it, or you can start the daemon at the system start. For the latter, refer to the Installation chapter.

This chapter explains how to control refdbd from the command line. The easiest and strongly recommended way is to use the provided control script that will be explained in the first section. If you need further control, you can use the command line of refdbd directly as explained in the second section. The third section describes the script which is usually run automatically by your system if you install refdbd as a daemon. The final sections describe the two applications which provide SRU access to RefDB databases.

Prev | Up | Next
Part IV. Reference manual | Home | refdbctl