Next Previous Up Contents
Next: Plot Service
Up: Top
Previous: Adding User-Defined Functions

## 11 Server Mode

STILTS is generally run by issuing commands from some kind of command line. However, facilities are also included to run it as a service, accepting commands via HTTP. The basic implementation of this is in the form of some Servlet implementations that can be run in a servlet container. At present the following servlets are provided:

- `PlotServlet`
- `TaskServlet`
- `FormServlet`

In order to run them there are a few options:

STILTS `server` command
  The simplest is to use the STILTS `server` command. If you run this, the services will start up immediately and print information about the base URL. Some configuration of available functions and data access is offered by the command line parameters. This command is a thin wrapper around the Jetty servlet engine which is included in the STILTS distribution.
Deploy in a servlet container
  For more control you can deploy the servlet or servlets you want to run in a servlet container of your choice, for instance Tomcat. The servlets can be configured by setting context parameters in a `web.xml` file in the usual way; look at the `StiltsContext` class to see the available configuration parameters.
Docker
  In the case of the plot server, a Docker container has been provided for convenience. At time of writing this is available, with some more discussion about how to deploy it, at https://hub.docker.com/r/mbtaylor/plotserv.

In all cases, look at the base URL of the running service for more information and usage examples. For instance if the server is running at the default base URL, then pointing your browser at

        http://localhost:2112/stilts/

will show you links to documentation for the available services.

The different services are described further in the following subsections.

Note: The `server` command and associated servlet code are somewhat experimental. If you have requirements which are not currently provided, please contact the author for discussion.

- 11.1 Plot Service

- 11.1.1 Usage
- 11.1.2 RESTful API
- 11.1.3 Caching and Performance

- 11.2 Task Service
- 11.3 Form Service

Next Previous Up Contents
Next: Plot Service
Up: Top
Previous: Adding User-Defined Functions

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk