Inter-process Communication

White Papers:
Prev | Connecting QNX and MS-Windows | Next

# 2. Inter-process Communication

Inter-process communication (IPC) consists of an agreement among programs on a method by which they can share data. These methods are often specific to the operating system, and are optimized to the particular needs of the applications using them. When programs communicate across a network, they must use a common IPC protocol, normally implemented as part of the operating system or as an add-on to it. The most common of these protocols is called TCP/IP and is designed to work well in both wide area and local area networks. Almost all operating systems provide TCP/IP services. All versions of Microsoft Windows (3.11, 95, and NT) have built-in or freely available TCP/IP services. QNX offers a TCP/IP add-on to QNX 4 for an additional fee.

Both MS-Windows and QNX also implement a proprietary IPC protocol. In Windows, the protocol is DDE (Dynamic Data Exchange), which implements both synchronous and asynchronous communication between tasks. DDE works reasonably well between tasks on the same computer, but suffers from speed and reliability problems when implemented across a network (as with Net-DDE). In QNX, the proprietary protocol is known as FLEET, an extremely quick and robust synchronous IPC protocol optimized for local area networking. For tasks interacting on a single machine or on a QNX LAN, FLEET exhibits reliability and speed properties far in excess of TCP/IP.

In order for QNX processes to interact with MS-Windows processes, there must be some agreement on the protocol being used. This agreement normally takes one of two forms:

1. Implement one or the other of the proprietary IPC protocols on the other platform. This would consist of implementing Net-DDE on QNX, or FLEET on MS-Windows. This technique has the advantage that a programmer need only see one programming API regardless of which environment is being used. The disadvantage is that the programmer must typically program in a non-native API, and often must have access to the source code for both interacting programs. Third-party products that implement both FLEET in MS-Windows and DDE in QNX are available.

2. Agree on a commonly supported IPC protocol. This essentially means TCP/IP, since it is the most widely supported of any open standard. In this case, the programmer deals with a native protocol on neither system, and must have full control over both processes that will be communicating. This is generally not an acceptable solution when either of the two processes in QNX and MS-Windows is beyond the control of the programmer. TCP/IP add-ons for MS-Windows are available from Microsoft at www.microsoft.com. A TCP/IP add-on for QNX is available from QNX Software Systems Ltd. (613) 591-0931.

Prev | Home | Next
Connecting QNX and MS-Windows | Up | File System and Peripheral Sharing

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.