 
  
  
  
  
ToolTalk User's Guide
2  An Overview of the ToolTalk Service
Contents of Chapter:
- 2.1 ToolTalk Architecture
- 
- 2.2 Starting a ToolTalk Session
- 
- Background and Batch Sessions
- 
- X Window System 
- 
- Locating ttsession 
- 
 
- 2.3 Maintaining ToolTalk Files and Databases
- 
- 2.4 Demonstration Programs
- 
As computer users increasingly demand that independently developed applications work together, inter-operability is becoming an important theme for software developers. By cooperatively using each other's facilities, inter-operating applications offer users capabilities that would be difficult to provide in a single application. The ToolTalk service is designed to facilitate the development of inter-operating applications that serve individuals and work groups.
 The following ToolTalk service components work together to provide inter-application communication and object information management:
- ttsession is the ToolTalk communication process. 
 This process joins together senders and receivers that are either using the same X server or interested in the same file. One ttsession communicates with other ttsessions when a message needs to be delivered to an application in another session. 
 
- rpc.ttdbserverd is the ToolTalk database server process. 
 One rpc.ttdbserverd is installed on each machine which contains a disk partition that stores files of interest to ToolTalk clients or files that contain ToolTalk objects. 
 File and ToolTalk object information is stored in a records database managed by rpc.ttdbserverd. 
 
- libtt is the ToolTalk application programming interface (API) library. 
 Applications include the API library in their program and call the ToolTalk functions in the library. 
 
The ToolTalk service uses the ONCTM  Remote Procedure Call (RPC) to communicate between these ToolTalk components.
 Applications provide the ToolTalk service with process and object type information. This information is stored in an XDR format file, which is referred to as the ToolTalk Types Database in this manual. 
 Figure 2-1 illustrates the ToolTalk service architecture.
Figure 2-1  ToolTalk Service Architecture
 

 The ToolTalk message server ttsession automatically starts when you open communication with the ToolTalk server. This background process must be running before any messages can be sent or received. Each message server defines a session. 
Note: A session can have more than one session identifier.
 To manually start a session, enter the following command on the command line:
ttsession [-a level][-d display][-spStvh][-{E|X}][-c command]
Table 2-1  ttsession Command Line Options 

 ttsession responds to two signals. 
 Run your application as its own session if it runs as a background job, in a batch session, or in a session bound to a character terminal. To run your application in its own session, use the -c parameter with the ttsession command, as follows:
ttsession -c [ command-to-run-in-batch ]
Note: The -c parameter must be the last option on the command line; any characters placed after the -c parameter on the command line are taken as the command to be executed.
 To establish a session under the X Window System, execute ttsession either without arguments (which takes the display from the $DISPLAY environment variable) or specify the display with the -d parameter as follows:
ttsession-d :0
   Locating ttsession 
 To display the sessid of the session for the Xdisplay:
xprop -root | grep _TT_SESSION
2.3  Maintaining ToolTalk Files and Databases
 The ToolTalk package contains a special set of shell commands you can use to copy, move, and remove ToolTalk files (that is, files mentioned in messages and files that contain ToolTalk objects). After a standard shell command (such as cp, mv, or rm) is performed, the ToolTalk service is notified that a file location has changed.
 The ToolTalk package also contains a database check and repair utility for the ToolTalk database, ttdbck, that you can use to check and repair your ToolTalk databases.
2.4  Demonstration Programs
 The ToolTalk service source files contain several interesting demonstration programs:
- CoEd
 A shared editor that uses ToolTalk messages to keep the shared edit session consistent across multiple editors.  
 
- ttsample1 
 A simple demonstration of the ToolTalk service sending and receiving messages.  
 
- ttsnoop
 A demonstration program that allows you to create and send custom-constructed ToolTalk messages. You can also use this program to selectively monitor any or all ToolTalk messages on your system.  
 
- edit_demo
 Two programs - cntl and edit - that demonstrate ToolTalk object-oriented messaging.  
 
 
  
  
  
  
Generated with CERN WebMaker