In this tutorial, we only have one training file and one testing file. If, however, we have many testing files, we can use SNoW's -server mode to save time. SNoW's -server mode loads the network file and then waits for client programs to send examples to it. It classifies the examples and sends the results back to the client. This way, the network need not be reloaded for each testing file.
To instantiate SNoW in server mode, type the following:
> snow -server 4444 -F tutorial/test.net &
The port number has been set to 4444. Any valid port number can be
substituted. This command line will run SNoW in the background in -server mode. Next, using the example client script also provided in the
tutorial directory, we can send the examples in tutorial/testdata.snow to the server.
> cd tutorial
> ./example_client.pl -s 4444 -I testdata.snow > output.txt
Results sent back from the server are stored in the file output.txt7.2.
The example client can also be instantiated with:
> ./example_client.pl -help
to display usage notes including a list of command line parameters that correspond to SNoW command line parameters. Specifying any of those command line parameters to the example_client.pl script will make the script send them to the server. Take a look inside the example_client.pl script for detailed comments explaining how to write a client program that works with a SNoW server. Currently, the only way to stop the server is to kill it manually.