Skip to content

The Node

Matthew Neeley edited this page Oct 28, 2015 · 10 revisions

The LabRAD Node is a server that is used for starting and stopping other servers.

The code for the node is in the labrad.node package. See the docstring for detailed documentation and requirements (including e.g. registry keys).

Running the Node

The node is implemented as an executable python package. As long as the labrad package is in your pythonpath, you can run the node like this:

python -m labrad.node

where -m means "execute a module" and labrad.node is the package name. (Note that either installing pylabrad with setup.py or putting the pylabrad checkout folder in your pythonpath is sufficient.) The node runs continually and attempts to reconnect to the manager whenever the connection is lost.

To see documentation about the command line options available to configure the node, you can invoke it with the --help option:

python -m labrad.node --help

For example, you can configure the TLS policy with the --tls command line argument (or, equivalently, the environment variable LABRAD_TLS). Passing --tls=off will disable TLS entirely, which will be necessary when connecting to legacy managers that do not support TLS.

Using the Node

Each node has a name which can be set at the command line with the --name option or through the LABRADNODE environment variable. If neither of those is provided, it will use the system's hostname.

You must point the node to the folder where your servers are stored. There is a folder in the registry for the node, >> Nodes >> [node name], with the key "directories", which is a list of directories (strings) that the node looks to for servers. (This registry directory may be created automatically when the node is first run with a given node name.)

The node is fairly self-explanatory to use; key settings are available_servers, running_servers, start, stop, status, etc.

Known issues

If the node can start a server but then can't find it after it has started it (this manifests in the browser as an eternally spinning icon) then you probably just have the names mismatched. Python class variable for the server name must match the name in the node info section of the server. See the documentation here and the ini file documentation here for more info.

Clone this wiki locally