What We Did Not Cover


The sections that follow briefly describe key topics that are not covered in this tutorial, and tell where you can go find more information about each topic.

C++ Class Library

This tutorial focused on how to gain access to all of TIBCO SmartSockets features using the C API. The entire C API has been encapsulated in a C++ library. Details on using TIBCO SmartSockets from C++ can be found in the TIBCO SmartSockets C++ User’s Guide reference.

Java Class Libraries

In addition to the APIs for the C and C++ languages, TIBCO provides fully compatible Java class libraries for TIBCO SmartSockets functions. Java class libraries are in a directory namedjava under the main TIBCO SmartSockets directory. See the TIBCO SmartSockets Java Library User’s Guide and Tutorial for more details on using these libraries.

TIBCO SmartSockets also supports the Java Message Services standard.

Burst Messages

To allow higher throughput and conserve network bandwidth, TIBCO has added a facility to allow grouping of multiple small messages into a single large message that can be sent as a burst. You can request information on using burst messages from TIBCO Customer Support.

Direct Peer-to-Peer Communication

This tutorial goes into great detail on how to use TIBCO SmartSockets RTclient and RTserver communications services, where RTserver provides a flexible publish-subscribe paradigm. It did not discuss TIBCO SmartSockets ability to do peer-to-peer communication directly between two processes without using RTserver. This is accomplished through connections and is described in detail in the chapter on connections in the TIBCO SmartSockets User’s Guide.

Multiple Connections to RTservers

To create multiple connections to RTservers, a completely different set of APIs is used. For more information on these APIs, see the TIBCO SmartSockets User’s Guide and the TIBCO SmartSockets Application Programming Interface.

Multicast

The examples in this tutorial use the default protocol for publish-subscribe communications in TIBCO SmartSockets, TCP unicast. In addition to unicast, TIBCO SmartSockets also allows messages to be sent between RTservers using a reliable multicast protocol. This is described in detail in the chapter on publish-subscribe in the TIBCO SmartSockets User’s Guide.

Request-Reply Communications

Throughout this tutorial, you are taught how to use TIBCO SmartSockets in a completely asynchronous manner, where messages are sent and the sender does not block, waiting for a reply. TIBCO SmartSockets also supports synchronous communications, where the sender waits for a reply before proceeding. This is described in detail in the chapter on publish-subscribe of the TIBCO SmartSockets User’s Guide.

Messages Within Messages

This tutorial describes how to define the grammar of a message type, which holds a description of the data part of the message. In the examples used throughout, you constructed our messages using simple data types, such as integers and strings. TIBCO SmartSockets also allows you to define a field of a message as holding another message. This is described in detail in the chapter on messages in the TIBCO SmartSockets User’s Guide.

Searching for Incoming Messages

Most of the example programs in this tutorial read and processed the messages in the order they were received. Occasionally, you may wish to search the message queue, without processing the messages for messages of a given type or for a specific message. This is described in the chapter on connections in the TIBCO SmartSockets User’s Guide. Also see TipcSrvMsgSearch and TipcSrvMsgSearchType in the TIBCO SmartSockets Application Programming Interface reference.

Sending Messages in a Heterogeneous Environment

TIBCO SmartSockets automatically handles conversion of data types, such as floating point, when sending messages from one type of platform to another. Details on this important feature are in the chapter on connections in the TIBCO SmartSockets User’s Guide.

Mixing Connections and Xt Intrinsics

If you are doing graphical user interface (GUI) development on UNIX or OpenVMS you may wish to integrate TIBCO SmartSockets into the event loop of an application. Connections can be used in a Motif (or any other Xt-based widget set) program through the use of the Xt Intrinsics functions XtAppAddInput and XtRemoveInput. This is described in more detail in the chapter on connections, in the TIBCO SmartSockets User’s Guide.

Mixing Connections and the Windows Message Loop

If you are doing GUI development on one of the Windows platforms, you may wish to integrate TIBCO SmartSockets with the Windows message processing loop. This is described in more detail in the chapter on connections in the TIBCO SmartSockets User’s Guide.

Mixing Connections and the Select Function

The select system function is commonly used to check many file descriptors without polling each one individually. You can use select with TIBCO SmartSockets connections. Details are in the chapter on connections in the TIBCO SmartSockets User’s Guide.

Finding and Starting RTserver

Most of the examples used throughout this tutorial ran RTserver on the same node as the RTclient programs. RTserver can also run on a remote node in the network. Details on how an RTclient finds and starts RTserver are in the chapter on publish-subscribe in the TIBCO SmartSockets User’s Guide.

Warm Connections

Most example programs in this tutorial called on TipcSrvCreate to create a full connection to RTserver:

if (!TipcSrvCreate(T_IPC_SRV_CONN_FULL)) { 
  /* error */ 
} 

There are other types of connections that can be established with RTserver. For example, if the connection between RTserver and one of its RTclients is lost, you may still want each side of the connection to maintain information about the other so the connection can be easily reestablished. This can be accomplished using a warm connection and is described in the chapter on GMD in the TIBCO SmartSockets User’s Guide.

Dynamic Message Routing

In almost all examples of the TIBCO SmartSockets Tutorial, we were working with only a single RTserver. TIBCO SmartSockets allows any number of RTservers to be used in a project and they can be connected in any way. TIBCO SmartSockets will dynamically route messages through the network of RTservers using an open shortest path algorithm. Routing tables are updated in real time as RTservers come and go. For more details on dynamic message see the chapter on publish-subscribe in the TIBCO SmartSockets User’s Guide.

Context Bridging

TIBCO SmartSockets allows messages to hop across protocols in the delivery process; RTservers perform context bridging. This allows a message to be read by an RTserver with one protocol, such as TCP/IP, and forwarded on using another protocol. This is all accomplished transparently for you, based on how your RTservers are connected.

Options and Commands

Only a few of the commands, such as setopt and options, such as Server_Connect_Timeout, that are available in TIBCO SmartSockets are used in this tutorial. As you begin to tune your system in various ways, it becomes more important that you know what options and commands are available and how they work. For complete descriptions of available options and commands see the TIBCO SmartSockets User’s Guide.

Utility Library

Along with an extensive API to perform all the functions associated with messaging, TIBCO SmartSockets also comes with a utility library that is not discussed in this tutorial. The utility functions, are prefixed with Tut, perform a variety of tasks including:

There are also many other miscellaneous functions. See the TIBCO SmartSockets Utilities reference for more details on the utility library.

Threads and Thread Safety

On platforms with OS kernel-level threads, the utility library is thread-safe. In other words, all utility library functions behave the same in a multi-threaded environment as in a single-threaded environment. Of course, this assumes that the application program takes care either to avoid sharing individual data structures between threads, or to synchronize operations on shared data structures. The utility library does enough internal synchronization to maintain its own integrity, and uses thread-safe system calls where appropriate.

In addition, the utility library includes cross-platform support for thread creation, synchronization, and thread-specific data. This common API makes it possible to write both applications and layered libraries that make use of threads and yet remain source-portable across all supported platforms. These functions are layered on top of the native OS support, which means that they are interoperable with direct use of the native system calls.

In addition to the utility library being thread-safe, TIBCO SmartSockets connections are designed to serve as high-level synchronization objects in multi-threaded applications. Each connection has a set of mutual exclusion synchronization (mutex) objects that are used to ensure that threads sharing the same connection do not interfere with each other, yet operate concurrently where there is no chance of interference. For instance, one thread may be sending a message on a connection while a second thread is retrieving the next received message from the connection’s queue and a third and fourth thread are both running one of the connection’s process callbacks.

For more details, see the TIBCO SmartSockets Utilities reference and the TIBCO SmartSockets User’s Guide.

Weighted Server Connections

The examples in this tutorial referred to connections between RTservers in a cloud, but did not go into further detail. Weighted server connections allow you to assign costs to particular connections between server to favor particular paths between servers. For more details, see the chapter on publish-subscribe of the TIBCO SmartSockets User’s Guide.


TIBCO SmartSockets™ Tutorial
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com