4.9.1 Sample Simple Session Server

The albatross.simpleserver module is a sample session server. It can either be used stand-alone, or imported into other Python scripts.

The session server uses TCP sockets to communicate with the application mixin, by default listening on port 34343. The server port can be changed by using the -p or -port= command line argument. Internally the server uses a select loop to allow connections from multiple applications simultaneously.

Note that the daemon does not need to run as root, provided it listens on a port above 1024. If possible, you should run it under a user ID not shared by any other processes (and not nobody). You should also ensure that only authorised clients can connect to your session server, as the protocol provides no authentication or authorisation mechanisms.

Application constructor arguments which are relevant to the session server are: