Running the xgtd server

The server component of the xGT application is called xgtd. It is a linux daemon and is launched automatically at linux boot. You can examine and control the daemon using standard linux utilities:

sudo systemctl status xgtd
sudo systemctl stop xgtd
sudo systemctl start xgtd
sudo systemctl restart xgtd

Data considerations

The default location for xgtd to read and write data is the /srv/xgtd/data directory.

You can copy data to the this home directory or organize data into subdirectories. The load() method in the xgt python module will accepts a path name as one of the parameters.
When the path is a relative path, the server will look for the file name (or names, if wildcards are provided) in the default location.

The save() command uses the same default location.

To learn more about loading and saving, read the data management guide.

Configuring xgtd

Some parameters of xGT can be configured with a JSON-formatted .gemsconfig file located in the home directory of the user running the server process.

The folowing variables for configuring xGT are supported:

Example .gemsconfig file:

  "worker_threads" : 4,
  "pin_threads" : false,

To configure xGT on AWS you would login to the ec2 instance and add a .gemsconfig file to the /home/xgtd directory.

Then you would restart xGT daemon:

sudo systemctl restart xgtd

S3 Credentials

When loading a file using the load method and an s3: protocol prefix, xGT will check the ~/.aws/credentials file for the two variables aws_access_key_id and aws_secret_access_key. (These values may also be specified at runtime in user code by passing them to a Connection object.)

When reading an ~/.aws/credentials file, xGT also supports profile selection via the AWS_PROFILE environment variable. If no environment variable is found, xGT will use the default profile.