IPC across the network

A QNX application can talk to a process on another computer on the network just as if it were talking to another process on the same machine. From the application's perpective, there is no difference between a local and remote resource. This transparency is made possible by virtual sircuits (VCs), which are paths the Network Manager provides to transmit messages, proxis, and signals across the network. VCs contribute to efficient overall use of resources in a QNX network for several reasons: A sending process is responsible for setting up the VC between itself and the process it wants to communicate with. To do so the sending process usually issues a qnx_vc_attach() function call. in addition to creating a VC, this call also creates a virtual process ID, or VID, at each end of the circuit. To the process at either end of the virtual circuit, the VID on its end appears to have the process ID of the remote process it wants to communicate with. Processes communicate with each other via these VIDs.

In the previous example the virtual circuit connects PID 1 to PID 2. On node 4 where PID 1 resides a VID represents PID 2. On node 5 where PID 2 resides, a VID represents PID 1. Both PID 1 and PID 2 can refer to the VID on their node as if it were any other local process, sending messages, receiving messages, raising signals, waiting, etc. For example, PID 1 can send a message to the VID on its end, and this VID will relay the message across the network to the VID representing PID 1 on the other end. This VID will then route the message to PID 2. Each VID maintains a connection that contains the following information:

You do not need to contact VC directly. When az application wants to access an I/O resource across the network, a VC is created by the open() function. To the application, the VC simply appears to be a PID.

A process might become unable to communicate over an established VC for various reason:

The process manager on each node checks the integrity of VCs on its node. It does this as follows:

  1. Each time a successful transmission takes place on a VC, a time stamp associated with the VC is updated to indicate the time of last activity.
  2. At installation-defined intervals, the Process Manager looks at each VC. If there's been no activity on a circuit, the Process Manager sends a network integrity packet to the Process Manager on the node at the other end of the circuit.
  3. If no response comes back, or if a problem is indicated, the VC os flagged as having a problem. An installation-defined number of attempts are then made to re-establish contact.
  4. If the attempts fail, the VC is dismantled; any processes blocked on the VC is made READY. (The process sees a failure return code from the communication primitive on the VC.)