roq-service-manager

$ conda install \
      --channel https://roq-trading.com/conda/stable \
      roq-service-manager
$ conda install \
      --channel https://roq-trading.com/conda/unstable \
      roq-service-manager

roq-service-manager

$ roq-service-manager [FLAGS]

Description

The roq-service-manager service can be used as a front-end for all services (gateways, bridges and strategies).

This service will monitor the state of each service by listening to systemd using dbus.

This service must operate in one of two possible systemd modes: user or code:root.

This service will attempt connect to a service’s --service_listen_address upon being notified by systemd that the service has reached the ready state.

The service manager will the proceed to subscribing state from the service. The service will in turn send its current state (snapshot) followed by any changes (update).

The underlying service will encode object state using JSON. The initial snapshot will include a schema as well as the list of objects currenctly cached.

The service manager will cache objects by service name as in their raw (textual) JSON representation. This is done to allow the service manager to support many underlying services potentially using different JSON schemas (different software versions).

Clients can connect to the service manager using HTTP and optionally upgrade to WS.

The HTTP protocol supports fetching Prometheus metrics.

The WS protocol was designed to support both publish/subscribe and request/response. This is useful for building user interfaces.

Finally, the service manager can serve files, typically HTML/CSS/JS used by a web application.

References

Flags

$ roq-service-manager --help
--name

service identifying name

--config_file

config file (path)

--service_listen_address

bind address for service connections (path)

--client_listen_address

bind address for client connections (path)

--url_prefix

prefix (uri)

--web_dir

Directory containing static files, e.g. $CONDA_PREFIX/share/roq/web

--systemd_scope

systemd scope (system|user)

--user (false)

user stream? (dbus)

--system (false)

system stream? (dbus)

--encode_buffer_size (10485760)

Encode buffer size

--decode_buffer_size (10485760)

Decode buffer size

Configuration

$ $CONDA_PREFIX/share/roq-service-manager/config.toml

Important

The template will be replaced when the software is upgraded. Make a copy and modify to your needs.

[services]

[services.deribit]
service_listen_address="unix:///home/thraneh/run/metrics/deribit.sock"