Kit Agent

Kit agent, and the accompagning kit-agent experience, is a minimal version of kit that starts, manages and controls larger kit instances.

Based upon the controlport extension, kit-agent exposes a connection that can be addressed via HTTP. It will route requests to full instances of kit, and if none are running, it will spin one up.

To use kit-agent, on Windows launch kit-agent.bat on Linux launch kit-agent.sh.

By default it will listen on port: 8010 this can however be changed by passing –/ext/omni.kit.agent/port=<desired port>.

At that point, all HTTP traffic send to that port will be automatically redirected to a full instance of kit. If that full instance of kit were to crash, kit-agent will make sure to respawn the instance.

Kit Agent, currently manages a single instance of kit but can be extended to handle multiple. By default the kit-remote-render experience runs on port 8012. This can be managed by setting: –/exts./omni.kit.controlport/port.

Implementation:

There are 3 components that make up the kit-agent.

  • The Control port extension

  • The Kit facility

  • The Kit controller

Control port:

This is based of off the omni.kit.controlport and is responsible for accepting and routing the request to the right handlers within kit Agent. The currently implemented handlers are generic handlers for POST and GET. They will accept the request, translate them and pass them onto the Kit Facility.

Kit Facility:

Facilities are a special type of object and provide stateful interfaces to larger infrastructures. In general they are meant to handle Database connections, connection pooling etc. In this specific case the Kit Facility handles Kit controller instances. An instance of the Kit facility is passed into the POST and GET handlers and provide an interface to instances of the Kit controller.

Kit controller:

The Kit controller is what handles and manages an instance of kit. It knows how it was started, where it is running and how to connect to its controlport. If the child process of the kit controller were to crash the kit controller will spawn a new instance. When requested it can shutdown the instance of kit it manages. It is ultimately responsible for talking to the controlport within its managed kit instance and passes on the request the control port of the kit-agent received.