Service Configuration
Services are described to websocketserver via a service config file. This is a JSON format file provided by the end-user. It includes a list of “services” and a link to a Python script that encapsulates the startup and shutdown of a service instance. The script is responsible for initiating and terminating a socket connection that the websocketserver engine will make available via the websocket protocol using a URL containing the service specific token. An example might look like this:Each key is the name of a type of service. The value of each key is another object.
There are three required keys in the object:
- script : the name of a Python script file responsible for creating an object that can start and stop a service.
- count : the maximum number of simultaneous instances of this service type
- options : a dictionary of optional data items that can be used by ADR to customize the web interface and any additional data items that can be used by the session instance