| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (6 out of 6)

Rerouting Telewindows Connections

You can organize your G2 application so that a client Telewindows on the user's computer provides a front-end interface to one or more G2s, each of which runs a KB, and whose collective knowledge is distributed (using, for instance, G2's G2-to-G2 data service features).

One G2 can switch or reroute a Telewindows connection to another G2 process. That is, the KB running on one G2 can pass the information associated with a Telewindows connection to another G2, where the same Telewindows attempts a new connection to that G2. To the user, the new connection represents a continuation of the previous application session that took place via the (now rerouted) connection to the previous G2.

To accomplish this, G2 supports opening and closing Telewindows connections in a programmatic manner:

These features enable a G2 application to provide a seamless means of routing a client Telewindows connection among more than one G2, subject to the availability of network resources and to the number of Telewindows connections authorized for those G2s.


Tip: The sample KB twtour.kb, shipped with your G2 product, demonstrates the basic features that a distributed G2 application should support, while also supporting reroutable Telewindows connections. See the Telewindows User's Guide for an overview of this KB.

Overview

A G2 process represents a Telewindows connection as a g2-window item whose G2-window-management-type attribute has the value remote. Such a g2-window item has other attributes whose values include, in order:

  1. When rerouting a Telewindows connection, the first G2 process passes the attribute values in that connection's G2 window to the second G2. This information, which was used to open the original Telewindows connection to the first G2, enables a new Telewindows connection with the second G2.

  2. If the attempt to open a new Telewindows connection with the second G2 is successful, the active KB on that G2 responds to the new connection as if the Telewindows user had just connected directly.

If the second G2 is, in fact, running on a particular machine name and network port, the attempt to open a new Telewindows connection to the second G2 may not be successful under these circumstances:

If the attempt to reroute the Telewindows connection to the second G2 is unsuccessful, the first G2 attempts to re-establish the connection that it attempted to reroute. For this attempt to succeed, the KB running on the first G2 must include an application-specific capability to accommodate this situation.

Rerouting a Telewindows Session to a Secure G2

There are two ways to start a Telewindows session to a secure G2:

Any user information entered in the G2 Login dialog is retained and passed to the receiving G2 when rerouting a Telewindows process. Password information is encrypted. Retaining and passing user information to a G2 process has the advantage that users need not enter their user information at the command level when starting the initial Telewindows process.

A Telewindows command line option, -discard-user-settings, exists to override the transfer of user information during rerouting. Telewindows users who do not want to transfer their user information should start the initial Telewindows session with this command line option:

Using this command line option causes a rerouted Telewindows process to discard user information.

Using System Procedures

You can use the g2-system-command system procedure to close a Telewindows connection programmatically. This procedure allows your G2 application to perform several G2 system-level operations that are otherwise available only using configurations.

Using G2 Window Attributes

The attributes in a g2-window item contain the knowledge that your application can pass between Telewindows sessions connected to different G2 processes.

Two attributes of a g2-window item support rerouting Telewindows connections:

Applications that Reroute Telewindows Connections

The g2-system-command and g2-reroute-window system procedures, and the relevant attributes of the g2-window class, provide very specific capabilities. The KBs that comprise your distributed G2 application must perform the bulk of the work required to reroute a Telewindows connection. The following subsections outline these requirements and offer recommendations on how to proceed.

Knowledge External to the KB

A G2 application that reroutes a Telewindows connection must acquire and manage knowledge of the application's system environment, such as:

Application Requirements

Overall context: The application must present the application user with a context (or application metaphor ) within which the rerouting of the Telewindows sessions takes place.

For example, the application can represent each G2 to which the application user can connect as a room in a virtual building that represents the scope of the application. This helps the user to understand intuitively that, in an actual building, he or she cannot occupy more than one room at a time.

Available candidates for rerouting: The application must support presenting to the application user a list of G2 processes that are suitable targets for rerouting.

Failed attempts at rerouting: The application must manage a failed attempt at rerouting a Telewindows connection, as in the case where no more available Telewindows connections were authorized for a particular G2 on a particular machine.

Depending on the licensing arrangements for G2 and Telewindows that the application users' organization has purchased, you might authorize one machine that runs G2 to allow connections with a maximum number of Telewindows users, while authorizing other machines that support your application to allow fewer concurrent Telewindows connections.

Continuity: The application can provide a continuing context (such as a history list of connections) for the application user, as the application opens and closes Telewindows connections on one machine after another.

For instance, the application can use the G2-window-initial-window-configuration-string attribute to accumulate information that the distributed KBs can use to reroute the application user's Telewindows back to some starting point.

| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (6 out of 6)

Copyright © 1997 Gensym Corporation, Inc.