Transactional publish/subscribe
Authors: Chan Arvola 
Published: November 2005

For many years, TIBCO (the Information Bus Company) has pioneered the use of Publish/Subscribe—a form of push technology — to build flexible, real-time loosely-coupled distributed applications. Today, Publish/Subscribe is used by 300 of the world's largest financial institutions, deployed in 6 of the top 10 semiconductor manufacturer' factory floors, utilized in the implementation large-scale Internet services like Yahoo, Intuit, and ETrade, and chosen by many of the world's leading corporations as the enterprise infrastructure for integrating disparate applications. In this paper, we will:

Contrast the Publish/Subscribe event-driven interaction paradigm against the traditional demand-driven request-reply interaction paradigm;

Explain the concepts of subject-based addressing and self-describing messages, the cornerstones of Publish/Subscribe;

Describe the scalable implementation of Publish/Subscribe via multicast and broadcast, and the proposed Pragmatic General Multicast Internet standard; and

Categorize the qualities of service needed by different kinds of event-driven applications.

Today, TIBCO products support:

Reliable delivery
for front-office applications which require update notifications only while they are online;

Guaranteed delivery
for back-office applications that cannot afford to lose messages despite network and application failures; and

Transactionally guaranteed
delivery for those applications that must update databases, consume messages on one set of subjects, and publish messages on another set of subjects, all within properly bracketed atomic transactions.

Three different implementations of transactional Publish/Subscribe can be found in:

A generic, database independent implementation embodied in TIBCO's Enterprise Transaction Express (ETX) product. ETX optimizes two-phase commit for those applications that span a single database and the messaging system by using the last resource manager optimization. It also supports more complicated transactions by playing the role of an XA-compliant resource manager, leaving the transaction coordination to standard-based transaction monitors.

An Informix Universal Server specific extension package called the TIBCO Message Blade. This extends the SQL language with TIBCO-provided User Defined Routines (UDRs) for synchronous Publish / Subscribe operations. In general, UDRs can be used inside stored procedures and triggers to publish and consume (potentially complex) structured messages. The need for two-phase commit is finessed by storing messages in the same database that houses application tables.

A bidirectional bridge between Oracle 8's Advanced Queueing (AQ) facility and TIBCO's TIB/Rendezvous guaranteed message delivery implementation. Oracle AQ supports enqueue and dequeue operations to queues (actually implemented as Oracle tables) that can be performed as part of database transactions. The bridge dequeues from Oracle queues and republishes on the Information Bus. Conversely, the bridge subscribes to TIB/Rendezvous messages and enqueues them to Oracle queues for consumption by Oracle applications. Multiple bridges can be used to route AQ messages from one Oracle database to another.