Open topic with navigation

# Direct Publishers and Subscribers

Direct publishers and subscribers use direct memory access to achieve the fastest data transfer and lowest latency.

A publishing application writes data directly into memory that is accessible to subscribing applications. Subscribing applications read data directly from memory written by the publishing application.

The implementation minimizes or eliminates sources of latency.

The following table summarizes the differences between regular and direct publishers and subscribers. Subsequent topics contain greater detail.

Aspect | TIBCO FTL Publishers and Subscribers | Direct Publishers and Subscribers
--- | --- | ---
Messages | Applications exchange message objects. | Applications exchange data in buffers.
Structuring Data | Applications structure message objects using fields that contain typed data. | Applications structure data within buffers using an array of sizes.
Copying Data | The library copies message data as needed. | The library eliminates copying data wherever possible. The sending application populates a data buffer, and receiving applications have direct access to that same data buffer.
Memory Management | Applications can create and destroy publisher and subscriber objects. The library and application programs can both create and destroy message objects. | Applications create direct publisher and subscriber objects, but cannot reclaim their memory. Application programs neither allocate data buffers, nor free them.
Subscribers and Threads | Subscribers are thread-safe. | Applications must not use a direct subscriber in more than one thread. Instead, applications can create a separate direct subscriber for each thread.
Delivery | The library distributes inbound messages through event queues. | Applications dispatch inbound data buffers directly to callback methods.
Content Matchers | Applications can use content matchers to select a sub-stream of messages. | Applications receive the entire data stream. Selectivity based on data content is not available.
API Language Support | The API supports multiple programming languages. | The API supports only the C language.
Protection | The implementation protects against many common types of programming errors. | The implementation protects against fewer types of errors. For example, programmers must be careful to not overrun the length of data buffers, because the library does not guard against this error.
Publishers | Many publishers can send through an endpoint. | A direct shared memory bus supports only one direct publisher object.
Transport | Choose from a variety of transport types. | Only a direct shared memory transport can implement a direct publisher or subscriber endpoint.
Persistence | Available. | The persistence feature does not support direct publishers and subscribers.

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 FTL® - Enterprise Edition

Copyright © 2009-2024. Cloud Software Group, Inc. All Rights Reserved.