Running the server requires two files:
The pipeline configuration file can be created manually or by using the pipeline editor. Once you have a pipeline configuration file, you can configure the server. A basic server configuration is the following:
<?xml version="1.0"?> <server xmlns="http://pipet.sf.net/schemas/server.xsl"> <port>8080</port> <setup file="pipelines.cfg"/> </server>
For the sake of this example, we will store this configuration in a file named server.cfg.
This configuration refers to the file pipelines.cfg which contains all the pipeline settings. The server will listen to the specified port, which is port 8080 in this case. The server is launched as follows:
java -jar pipet-server-1.2.15-standalone.jar server.cfg
The exported modules in pipeline.cfg are now available via HTTP. An exported module's URL is http://hostname:8080/module-name (where hostname is the name or IP address of the server, and module-name is the export path of the module. There are two ways in which you can access these modules:
Additionally, list of exported modules is available under http://hostname:8080/ (e.g. http://localhost:8080/).
By default, the server listens to all interfaces. This can be limited to a specific interface by specifying the IP address corresponding to the interface. For example, the following configuration makes the server listen to localhost only.
<?xml version="1.0"?> <server xmlns="http://pipet.sf.net/schemas/server.xsl"> <interface>127.0.0.1</interface> <port>8080</port> <setup file="pipelines.cfg"/> </server>
By default, the server logs to the standard output. The log output can be redirected to a file by specifying the filename in the requestLog element, as follows:
<?xml version="1.0"?> <server xmlns="http://pipet.sf.net/schemas/server.xsl"> <port>8080</port> <requestLog path="/var/log/pipet/access.log"/> <setup file="pipelines.cfg"/> </server>
Previous configuration examples use only one pipeline configuration. Alternatively, a server may serve several at once, each one with an alternative URL prefix. The following example uses two pipeline configurations.
<?xml version="1.0"?> <server xmlns="http://pipet.sf.net/schemas/server.xsl"> <port>8080</port> <setup base="/parsing" file="parsing.cfg"/> <setup base="/annotation" file="annotation.cfg"/> </server>
The modules exported in parsing.cfg will be accessible as http://hostname:8080/parsing/module-name, while the annotation modules can be used via http://hostname:8080/annotation/module-name. The module lists are provided by http://localhost:8080/parsing/ and http://localhost:8080/annotation/ respectively.