hp Reliable Transaction Router

hp Reliable Transaction Router

Application Design Guide

Order Number: AA-REPMC-TE


February 2003

This guide explains how to design application programs for use with HP Reliable Transaction Router.

Revision/Update Information: Revision/Update Information: This manual supersedes the Reliable Transaction Router Application Design Guide for Version 4.1.

Software Version: Reliable Transaction Router Version 4.2

Hewlett-Packard Company
Palo Alto, California


© 2003 Hewlett-Packard Development Company, L.P.

Microsoft, MS-DOS, Windows, and Windows NT are US registered trademarks of Microsoft Corporation.

Intel is a US registered trademark of Intel Corporation.

UNIX is a registered trademark of The Open Group.

Confidential computer software. Valid license from HP and/or its subsidiaries required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's commercial license.

Neither HP nor any of its subsidiaries shall be liable for technical or editorial errors or omissions contained herein. The information in this document is provided "as is" without warranty of any kind and is subject to change without notice. The warranties for HP products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty.

Contents Index


Preface

Purpose of this Manual

The goal of this document is to assist the experienced application programmer in designing applications for use with Reliable Transaction Router (RTR). Here you will find conceptual information and some implementation details to assist in:

As an application programmer, you should be familiar with the following concepts:

If you are not familiar with these software concepts, you will need to augment your knowledge by reading, taking courses, or through discussion with colleagues. You should also become familiar with the other books in the RTR documentation kit, listed in Related Documentation. Before reading this document, become familiar with the information in Reliable Transaction Router Getting Started.

This document is intended to be read from start to finish; later you can use it for reference.

Related Documentation

Table 1 describes RTR documents and groups them by audience.

Table 1 RTR Documents
Document Content
For all users:  
Reliable Transaction Router Release Notes 1 Describes new features, changes, and known restrictions for RTR.
Reliable Transaction Router Getting Started Provides an overview of RTR technology and solutions, and includes the glossary that defines all RTR terms.
Reliable Transaction Router Commands A pocket-sized handbook that lists all RTR commands, their qualifiers and defaults.
Reliable Transaction Router Software Product Description Describes product features.
For the system manager:  
Reliable Transaction Router Installation Guide Describes how to install RTR on all supported platforms.
Reliable Transaction Router System Manager's Manual Describes how to configure, manage, and monitor RTR.
Reliable Transaction Router Migration Guide 2 Explains how to migrate from RTR Version 2 to RTR Version 3 or 4 (OpenVMS only).
   
For the application programmer:  
Reliable Transaction Router Application Design Guide Describes how to design application programs for use with RTR, with both C++ and C interfaces.
Reliable Transaction Router C++ Foundation Classes Describes the object-oriented C++ interface that can be used to implement RTR object-oriented applications.
Reliable Transaction Router C Application Programmer's Reference Manual Explains how to design and code RTR applications using the C programming language and the RTR C API. Contains full descriptions of the basic RTR API calls.


1Distributed on software kit.
2Softcopy only.

You can find additional information about RTR, including the Software Product Descriptions, on the RTR website found through http://www.hp.com links to middleware products or at http:://www.hp.com/go/rtr.

Section and Appendix Moved

  • The section on Journal Sizing from Chapter 2 has been moved to the Reliable Transaction Router System Manager's Manual, Section 2.3, Creating a Recovery Journal.
  • Appendix G, Dual-Rail Setup, has been moved to the Reliable Transaction Router System Manager's Manual, Section 2.14, Network Transports.

Other books that can be helpful in developing your transaction processing application include:

A web search for "Oracle SQL" can provide tutorial and other useful references.

Reader's Comments

HP welcomes your comments on this manual. Please send us your comments by email to rtrdoc@hp.com. Please include the following with your comments or suggestions: the title of the manual, date from the title page, section and page numbers.

Conventions

Convention Description
Example code Programming examples are shown in a monospaced font.
Title Titles of manuals and books are shown in italics. Italics are also used for emphasis.

Reading Path

The reading path to follow when using the Reliable Transaction Router information set is shown in Figure 1.

Figure 1 RTR Reading Path



Chapter 1
Introduction

This document is for the application programmer who is developing an application for use with Reliable Transaction Router (RTR). Here you will find information on using RTR in the design and development of an application. The main emphasis is on providing design suggestions and considerations for writing the RTR application. Example designs describing existing applications that use RTR show implementations exploiting RTR features, and provide real examples where RTR is in use.

Note

Before reading this manual, read the prerequisite: Reliable Transaction Router Getting Started, which describes basic RTR concepts and terminology.

RTR provides both a C++ object-oriented application programming interface (API) and a C API. Most of the material in this document is generic to RTR and not specific to either interface. However, some implementation specifics for each API are shown in separate chapters and appendices.

Each API also has its own reference document, the Reliable Transaction Router C++ Foundation Classes manual for the C++ API, and the Reliable Transaction Router C Application Programmer's Reference Manual for the C API.

In designing your application, Compaq recommends that you use object-oriented analysis and design techniques, whether or not you are using the new object-oriented API. This methodology includes the following:

Discussing this methodology is outside the scope of this document, but you can find more information in the following books, among others:

When designing your application:

A design flaw can be very expensive or impossible to correct in your application, so doing a thorough design, fully discussed and understood by your team, is essential to the ultimate success of your application in operation. One goal of this document is to help you understand some of the finer subtleties of the product, to help you design an optimum application.

Reliable Transaction Router

RTR is transactional messaging middleware used to implement highly scalable, distributed applications with client/server technologies. With RTR, you can design and implement transaction management applications, take advantage of high availability, and implement failure-tolerant applications to maximize uptime. RTR helps ensure business continuity across multivendor systems and helps maximize uptime.

Implementing an application to use RTR embeds high availability capabilities in the application. Furthermore, RTR greatly simplifies the design and coding of distributed applications because, with RTR, client-server interactions can be bundled together in transactions. In addition, RTR applications can easily be deployed in highly available configurations.

RTR supports applications that run on different hardware and different operating systems. RTR has not been built to work with any specific database product or resource manager (file system, communication link, or queuing product), and thus provides an application the flexibility to choose the best product or technology suited for its purpose. There are in addition some resource managers with which RTR provides tight coupling.

(For more information on using this tighter coupling, see the section in this manual on Using XA.) For specifics on operating systems, operating system versions, and supported hardware, see the Reliable Transaction Router Software Product Description for each supported operating system.

RTR provides several benefits for your application:

RTR Application Programming Interfaces

RTR provides programming interfaces for use in implementing applications that work with RTR, including:

The C++ API

The C++ API is an object-oriented application programming interface for RTR. With the C++ API, as an application developer, you can design and implement applications to take advantage of object-oriented (OO) design principles, including patterns and code reuse. As Figure 1-1 illustrates, the C++ API sits on top of the C API, which is a layer on top of RTR.

Figure 1-1 RTR Layers


Client applications and server applications can use both the C++ API and the C API or just the C++ API. The C++ API maps RTR data elements, data structures, and C API functionality into the object-oriented design world.

The C++ API:

C++ API and RTR Technology

The C++ API provides an object-oriented framework through which you can implement fault-tolerant systems. C++ API code resides beneath application or business logic code. Thus, the C++ API interfaces directly with RTR while application code does not. This transparency simplifies the development and implementation of transaction processing solutions with RTR.

OO Benefits

The C++ API was created to assist RTR customers who:

The benefits include:

With the C++ API, applications can inherit functionality from RTR.

The C++ API Provides Ease of Use

The C++ API provides a simplified way for you to implement RTR solutions. With the C++ API:

C++ API Design
The C++ API upgrades RTR technology by providing a set of classes that streamlines the development and implementation of RTR transaction processing applications. The C++ API has been designed to:

Use of the C++ API
The C++ API can be used to:

The C API

The C API enables applications to be written with RTR calls using the C programming language. The C API is described in the Reliable Transaction Router C Application Programmer's Reference Manual.


Next Contents Index