Introduction
The G2 to G2 interface lets two or more G2 processes connect for the purpose of exchanging data. G2 supports either a DECnet or TCP/IP protocol. Once two systems are connected, you can exchange various types of data. This chapter describes how to connect two (or more) G2 systems, and how to prepare a KB for remote data service or value and item passing across that connection.
Two sample KBs that demonstrate item and object passing are:
Both are available in the kbs/samples directory.
This chapter also describes the process of cutting and pasting data between two G2 processes.
Exchanging Data Using the G2 to G2 Interface
The G2 to G2 interface is the general facility that permits one G2 to communicate with another. Each of the G2s can send and receive data. This lets you create applications that use distributed information processing on distinct G2s.
To enable communications between two or more G2s, you create a G2-TO-G2-DATA-INTERFACE object on the client G2, which is the G2 making a connection to a remote server G2. This object specifies the protocol to use, along with other useful information about the remote system. This chapter calls such an object a data interface object.
A data interface object acts as a doorway between two G2s. Through the interface object, the KB receives data from a remote G2 and sends data to that remote process. The client G2 requires only one data interface object for the connection, though multiple interface objects can be used in a single KB. The G2 server manages the connection with the client G2 internally and does not create or require a corresponding data interface object.
An active data interface object provides:
Once you create and complete the data interface object and start both G2 systems, communication begins. The local system requests a connection to the remote system. If the connection is valid, the two systems connect and the status of the interface object is running. Once both G2 processes are started and the connection is running, the two systems can exchange data.
Two G2s can pass knowledge between each other in these ways:
All data service and value or item passing requires the use of at least one data interface object for each remote G2.
Copyright © 1997 Gensym Corporation, Inc.