Session Management
  • Definition of “session”
    • Persists from session initialization to session termination
    • Contains a set of streams which operate as defined by the infrastructure and lifecycle groups
    • Contains the credentials necessary to access the nodes and agents operated upon by streams within the session
    • Has a unique session handle which may be used by a tool to connect to the session in conjunction with the appropriate security credentials
    • Can be decoupled from the front-end tool
    • Active streams remain active and are persistent within the session while no front-end tool is connected to the session, unless infrastructure or agent behavior dictate otherwise. However, data flow through the infrastructure may be blocked.
  • STCI Provides to Tool/UI
    • List of available agents
    • List of available plugins
    • List of existing sessions/session handles
  • Session initialization parameters
    • Authentication credentials
    • List of desired agents
    • List of desired plugins
    • Error policy (associated with individual agents): e.g. initiate session teardown when any agent failure is detected
    • Disconnect policy (associated with individual agents): e.g. redirect stdout from agent to /dev/null when session is decoupled from tool
    • A newly initialized session is associated with a unique session handle
  • Active session operations
    • Add stream. Plugins and agents available to new streams within a session are limited to those specified at session invocation or added to the session afterward. The creation of a new stream produces a stream handle which is contained by the session.
    • Remove(close?) stream.
    • Disconnect. Enacts any disconnect policy items and close connections to the Tool/UI.
    • Reconnect. Requires session handle and authentication credentials. Reverses disconnect policy items. Resumes communication with the Tool/UI making the request.
  • Session termination
    • Initiated by connected, properly credentialed client
    • Initiated by superuser without logging in
    • Results in clean teardown of all streams contained within the session
  • Adding new Agents
    • New agents can be added throughout the lifetime of a session within its initial allocation
    • Agents cannot be added to a session that are outside of its initial allocation
      • A new session must be created to include agents on nodes outside the initial allocation
      • This new session can be merged with the existing session to create a third session
      • This third session would contain all of the agents

Block diagrams for initialization and termination


There are two types of Stream termination:

  • Orderly termination, where resources are not released until all relevant processes are done using the resource.
  • Forced termination, where resources are released, regardless of their state. This may be done, for example, in abnormal termination scenarios.

Note: We need to decide if streams can be used by multiple "higher-level" objects (probably not). If this is the case, we would want to use a reference count to avoid resource replication.

Stream termination needs to be asynchronous. Local information is not sufficient to decide if the resource is no longer needed (i.e., one may need positive confirmation from other procecces that they will not be generating any more traffic to a given end-point).

Block diagrams for connecting and spawning

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License