gk::sessionmgr

Utilities to build session manager applications

Synopsis

gk::sessionmgr init
gk::sessionmgr run prog
gk::sessionmgr create confname conftype
gk::sessionmgr join id

Description

The gk::sessionmgr command provides various utilities needed to support the development of GroupKit session management applications (as opposed to conferences, the registrar, or other GroupKit processes). Primarily, this module maintains a set of runtime environments and generates a series of events, described under "Runtime", below.

The "gk::sessionmgr init" command initializes the session manager runtime. Normally, you do not need to invoke this directly, but can instead rely on the "gk::sessionmgr run" command, described momentarily. This routine will prompt the user for a registrar to connect to, establish the necessary connections to its registrar and environments, create the launcher server to spawn new conferences, and arrange for events to be generated. All of this is described in the section "Runtime".

The "gk::sessionmgr run" command is used to run a particular Tcl script as a session manager, initializing the session management facilities if this has not already been done. This is normally the routine invoked for example by shell scripts such as "open.reg".

To create a new conference, you can call the "gk::sessionmgr create" conference. While the name you specify for the conference is arbitrary, the type should designate one of the conference types specified in the GroupKit preferences file. If successful, this routine will generate a <CONF_CREATED> event (see below) and return the process id for the newly created conference process.

To join an existing conference, call the "gk::sessionmgr join" command, specifying the id of the conference (not of a specific process). If successful, this routine will generate a <CONF_JOINED> event (see below) and return the process id for the newly created conference process.

Runtime

There are several environments maintained by the gk::sessionmgr command, as well as several different events that are generated. You will need to interact with these environments and respond to these events to implement your own session manager applications.

The "gk::confs" environment maintains a list of all the current conferences. All of these are stored under the "c" key, and represented by their unique conference id number. Therefore, if you need to retrieve a list of all known conference id numbers, you can call "gk::confs keys c".

Each conference listed in the gk::confs environment also has its own environment, which maintains information about the conference name, type, and list of users. This environment is called "gk::confs_$confid", where "$confid" represents the unique conference id number. You can obtain the conference name via the "name" key, and its type via the "type" key. The list of users in the conference is stored (via unique id number for the user's conference process), under the "users" key.

When conferences or users are added or deleted, events are generated, which your application can capture via the "gk::event bind" command. The events to look for are <CONF_ADDCONF>, <CONF_DELCONF>, <CONF_ADDUSER> and <CONF_DELUSER>. All four of these events use the key "C" to hold the unique conference id number for the conference effected, while the latter two events also use the key "U" to hold the id for the user's conference process.

Two additonal events are generated for when the local session manager successfully creates a new conference or joins an existing one. These are the <CONF_CREATED> and <CONF_JOINED> events. Both of these use the key "C" to correspond to the conference unique id number, and "U" for the id of the user's process.


GroupKit Reference Manual. Last updated March 30, 1998 by Mark Roseman.