Client/server mode

If --server and --port options are specified, a server will be launched which starts listening for incoming requests.
E.g.:

 analyze -f en.cfg  --server --port 50005 &
To launch the server, the script follows the same steps described in previous section, but with the options --server --port 50005 passed to the final call to the analyzer executable.


Once the server is launched, clients can request analysis to the server, with:

 analyzer_client 50005  <myinput  >myoutput
 analyzer_client localhost:50005  <myinput  >myoutput
or, from a remote machine:
 analyzer_client my.server.com:50005  <myinput  >myoutput
 analyzer_client 192.168.10.11:50005  <myinput  >myoutput

The server will fork a new process to attend each new client, so you can have many clients being served at the same time.

You can control the maximum amount of clients being attended simutaneously (in order to prevent a flood in your server) with the option --workers. You can control the size of the queue of pending clients with option --queue. Clients trying to connect when the queue is full will receive a connection error. See section 6.4.1 for details on these options.




Lluís Padró 2013-09-09