Open topic with navigation

TIBCO Rendezvous® 8.8.0

# Program Design Hints

These hints can help you design programs that minimize message latency.

## Reduce Message Size

Minimize message size. Larger messages consume more network bandwidth, which can increase latency for all messages on the network.

Consider the following techniques:

| • | Pack data as efficiently as possible within messages.

| • | Use tight (rather than verbose) subject names and field names.

| • | Use field identifiers rather than field names.

## Re-Use Message Objects

It takes time to create and destroy outbound message objects, and to populate them with data. You can reduce these costs by re-using a pool of pre-initialized messages, and modifying only a subset of their data fields (as needed).

Notei | However, you must use caution when implementing this strategy. Under some conditions, message objects involved in re-use can exhibit memory growth as a side-effect. To avoid this side-effect in C, use the functions `tibrvMsg_MarkReferences()` and `tibrvMsg_ClearReferences()`. For further information, see Validity of Data Extracted From Message Fields, in TIBCO Rendezvous C Reference.

## Reduce Input/Output

I/O activity slows programs. Minimize non-critical I/O, extensive logfile output and terminal output.

When logging is required for monitoring or auditing, shift the I/O burden to another computer to log messages without introducing a time penalty.

## Avoid Feature Overhead

Some advanced features of TIBCO Rendezvous—such as fault tolerance, certified delivery, and distributed queues—involve additional overhead costs to applications that use them. These costs include I/O and protocol messages, which can have a large effect on latency.

## Careful Memory Management

Memory management overhead can significantly slow program execution. Design programs carefully to avoid both explicit and hidden memory management costs.

The garbage collection feature in some programming languages can cause variability in data latency. When programming in such languages, avoid creating short-lived objects whenever possible.

## Minimize Processing within Callbacks

Blocking and longing-running callback functions can delay delivery of other events. Avoid these behaviors.

When inbound messages require lengthy processing, shift the processing load asynchronously. Quickly extract data from the message, and process it in another thread.

## Examples

Usage examples are incorporated within two programs:

| • | `tibrvsend`

| • | `tibrvlisten`

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.