ToolTalk User's Guide

How can processes on different machines communicate using the ToolTalk service?

There are two ways in which processes on different machines can communicate using the ToolTalk service.

  1. They can connect to the same session.

  2. They can scope to a file that is NFS mounted on the machines involved.

Connecting to the Same Session

To connect the processes to the same session, you first need to determine a common interest for the processes (for example, a scheme that associates a session name with the common interest of the processes) and then you need to determine how to propagate the session name to all of the processes. The ToolTalk service does not provide a mechanism to distribute the session address (other than the possible advertisement of a session id on the TT_SESSION property of the root windows of X servers).

To get a session name, you can use the command

ttsession -p

which forks off a new session and prints its name to stdout; or you can the command:

ttsession -c

which sets the environment variable $TT_SESSION to the session id.

You then need to use some mechanism to put that session name in a place where the other processes can find it. Some examples of where you can place the session name are:

Alternately, the processes can use the session name in the tt_default_session_set call to connect to that session.

You could also send messages in the ttsession associated with a particular X server to advertise the newly-created ttsessions.

Scoping to a NFS-mounted File

File scoping is when a process registers a file scope pattern. The name of that session is placed on a list in rpc.ttdbserverd that is associated with the registered file. When a file-scoped message is sent, the ToolTalk service retrieves the list of sessions for the file and forwards the message to each of the sessions on the rpc.ttdbserverd list for that file.


Note –

To scope to a file that is NFS-mounted on the machines involved requires a file system to be NFS mounted on all the systems and rpc.ttdbserverd to be run on the NFS server.