2.3. Data Exchange Protocols

The Cascade DataHub relays data between programs using DDE and TCP. It also mirrors data to Cascade Connect or other DataHubs over TCP. This section gives an overview of these protocols.

2.3.1. DDE Protocol

DDE (Dynamic Data Exchange) is a well-established mechanism for exchanging data among processes in MS-Windows. There are three DDE commands for establishing communication with Windows programs such as Excel. Which of these commands you use depends on how you plan to control the flow of data between the spreadsheet and the Cascade DataHub.

    DDEPoke writes a data value to the Cascade DataHub. For example, to send a value from an Excel spreadsheet to the DataHub, the DDEPoke command is run from within an Excel macro. For more details, please refer to Section 4.2.2, “Method 2 - Writing Excel macros that use the DDEPoke command”.

    DDERequest reads a data value from the Cascade DataHub. To get that value into Excel, for example, the DDERequest command is run from within an Excel macro. For more details, please refer to Section 4.1.2, “Method 2 - Excel Macros using DDERequest”.

    DDEAdvise creates a connection, called an advise loop, that updates a new data value automatically. The advise loop is a unidirectional link, established by a client program that wants to receive data from a server program. The client continues to receive new point values as long as the two programs are running, or until the advise loop is terminated.

    You can use DDEAdvise to read data from the Cascade DataHub by configuring the DataHub to act as a DDE Server. For an example using Excel, please refer to Section 4.1.1, “Method 1 - Drag and Drop using DDEAdvise”.

    Likewise, you can use DDEAdvise to write data to the Cascade DataHub, by configuring it to act as a DDE Client. For an example using Excel, please refer to Section 4.2.1, “Method 1 - Configuring DDEAdvise loops in the Cascade DataHub”.

For more information on DDE, please refer to Appendix G, DDE Overview.

2.3.2. TCP and Mirroring

The Cascade DataHub uses TCP to communicate over a LAN, WAN, or the Internet. You can join two or more Cascade DataHubs together over TCP and share exact copies of the data through data mirroring. Mirroring means that the data and any updates to that data on one DataHub are exactly mirrored across the network onto any other DataHub that is connected. Once a mirroring connection is established each participant maintains and updates an identical data set, as simultaneously as the TCP connection will permit. For more information on mirroring, please refer to Section 12.3, “Tunnel/Mirror”.

2.3.3. The DataHub API

The DataHub APIs for C++, Java, and .NET lets any TCP-enabled program interface with the DataHub.