parallel_doc: pserver

Next: pconnect, Previous: Authentication, Up: Cluster execution [Index]

### 3.3 Starting servers

Loadable Function: pserver ()
Loadable Function: pserver (options)

  This function starts a server of the parallel cluster and should be called once at any server machine.

  It is important to call this function in a way assuring that Octave is quit as soon as the function returns, i.e. call it e.g. like `octave --eval "pserver"` or `octave --eval "pserver (struct ('fieldname', value))"`.

  If a directory path corresponding to the current directory of the client exists on the server machine, it will be used as the servers current directory for the respective client (multiple clients are possible). Otherwise, `/tmp` will be used. The Octave functions the server is supposed to call and the files it possibly has to access must be available at the server machine. This can e.g. be achieved by having the server machine mount a network file system (which is outside the scope of this package documentation).

  The parent server process can only be terminated by sending it a signal. The pid of this process, as long as it is running, will be stored in the file `/tmp/.octave-<hostname>.pid`.

  If a connection is accepted from a client, the server collects a network identifier and the names of all server machines of the network from the client. Then, connections are automatically established between all machines of the network. Data exchange will be possible between all machines (client or server) in both directions. Commands can only be sent from the client to any server.

  The opaque variable holding the network connections, in the same order as in the corresponding variable returned by `pconnect`, is accessible under the variable name `sockets` at the server side. Do not overwrite or clear this variable. The own server machine will also be contained at some index position of this variable, but will not correspond to a real connection. See `pconnect` for further information.

  options: structure of options; field `use_tls` is `true` by default (TLS with SRP authentication); if set to `false`, there will be no encryption or authentication. Field `auth_file` can be set to an alternative path to the file with authentication information (see below).

  The client and the server must both use or both not use TLS. If TLS is switched off, different measures must be taken to protect ports 12501 and 12502 at the servers and the client against unauthorized access; e.g. by a firewall or by physical isolation of the network.

  For using TLS, authorization data must be present at the server machine. These data can conveniently be generated by `parallel_generate_srp_data`; the helptext of the latter function documents the expected location of these data.

  The SRP password will be sent over the encrypted TLS channel from the client to each server, to avoid permanently storing passwords at the server for server-to-server data connections. Due to inevitable usage of external libraries, memory with sensitive data can, however, be on the swap device even after shutdown of the application.

  See also: pconnect, reval, psend, precv, sclose, parallel_generate_srp_data, select_sockets.

Next: pconnect, Previous: Authentication, Up: Cluster execution [Index]