Page 3 - Contents; Preface; vii; Introduction
Contents Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii 1 Introduction Reliable Transaction Router . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1 RTR Continuous Computing Concepts . . . . . . . . . . . . . . . . . ...
Page 4 - Frontend Recovery
3 Reliability Features Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–1 Failover and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2 Router Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
Page 7 - Purpose of this Document; This document contains the following chapters:
Preface Purpose of this Document The goal of this document is to assist an experienced systemmanager, system administrator, or application programmer tounderstand the Reliable Transaction Router (RTR) product. Document Structure This document contains the following chapters: • Chapter 1, Introductio...
Page 8 - Related Documentation; Additional resources in the RTR documentation kit include:; Document; RTR Commands
Related Documentation Additional resources in the RTR documentation kit include: Document Content For all users: Reliable TransactionRouter Release Notes Describes new features, changes, andknown restrictions for RTR. RTR Commands Lists all RTR commands, theirqualifiers and defaults. For the systemm...
Page 9 - Convention; New term; User input; Terms and titles; FE; Reading Path
Reader’s Comments Compaq welcomes your comments on this guide. Please send your comments and suggestions by email to [email protected] include the document title, date from title page, ordernumber, section and page numbers in your message. For productinformation, send email to [email protected]....
Page 10 - Figure 1 RTR Reading Path; System Manager
Figure 1 RTR Reading Path Coverletter ZKO-GS015-99AI SPD ReleaseNotes GettingStarted System Manager Application Programmer InstallationGuide MigrationGuide SystemManager'sManual Commands If V2 to V3 = Tutorial ApplicationDesignGuide C++FoundationClasses C ApplicationProgrammer'sReferenceManual If C+...
Page 11 - Introduction; Reliable Transaction Router; Introduction 1–1
1 Introduction This document introduces RTR and describes RTR concepts. It isintended for the system manager or administrator and for theapplication programmer who is developing an application thatworks with Reliable Transaction Router (RTR). Reliable Transaction Router Reliable Transaction Router (...
Page 12 - RTR Continuous Computing Concepts; –2 Introduction
RTR Continuous Computing Concepts RTR Continuous Computing Concepts RTR provides a continuous computing environment that isparticularly valuable in financial transactions, for examplein banking, stock trading, or passenger reservations systems.RTR satisfies many requirements of a continuous computin...
Page 13 - RTR Terminology; Introduction 1–3
RTR Terminology RTR Terminology The following terms are either unique to RTR or redefined when used in the RTR context. If you have learned any of these termsin other contexts, take the time to assimilate their meaning inthe RTR environment. The terms are described in the followingorder: • Applicati...
Page 14 - Figure 1–1 Client Symbol; –4 Introduction
RTR Terminology RTR Application An RTR application is user-written software that executeswithin the confines of several distributed processes. The RTRapplication may perform user interface, business, and serverlogic tasks and is written in response to some business need. AnRTR application can be wri...
Page 15 - Figure 1–2 Server Symbol; Introduction 1–5
RTR Terminology Figure 1–2 Server Symbol Channel RTR expects client and server applications to identify themselvesbefore they request RTR services. During the identificationprocess, RTR provides a tag or handle that is used for subsequentinteractions. This tag or handle is called an RTR channel. Ach...
Page 16 - Figure 1–3 Roles Symbols; Figure 1–4 Facility Symbol; –6 Introduction
RTR Terminology Figure 1–3 Roles Symbols FE BE TR Facility The mapping between nodes and roles is done using a facility.An RTR facility is the user-defined name for a particularconfiguration whose definition provides the role-to-node map fora given application. Nodes can share several facilities. Th...
Page 17 - Figure 1–5 Components in the RTR Environment; Introduction 1–7
RTR Terminology Figure 1–5 Components in the RTR Environment LKG-11203-98WI User Accounts Facility FE TR BE General Ledger Facility Client application Server application disconnected before all parts of the transaction are done, thenthe transaction remains incomplete. Transaction A transaction is a ...
Page 18 - –8 Introduction
RTR Terminology messaging, RTR ensures that a transaction is ‘‘all or nothing’’—either fully completed or discarded; either both the checkingaccount debit and the savings account credit are done, or thechecking account debit is backed out and not recorded in thedatabase. RTR transactions have the AC...
Page 19 - Figure 1–6 Two-Tier Client/Server Environment; DM; Figure 1–7 Three-Tier Client/Server Environment; Introduction 1–9
RTR Terminology Figure 1–6 Two-Tier Client/Server Environment LKG-11204-98WI Database Server DM Application Presentation and Business Logic (ODBC Model) Figure 1–7 Three-Tier Client/Server Environment LKG-11205-98WI Presentation/ User Interface Application Server/ Business Logic Database Server DB S...
Page 20 - Figure 1–8 Browser Applet Configuration; RTR Frontend
RTR Terminology All components can reside on a single node but are typicallydeployed on different nodes to achieve modularity, scalability,and redundancy for availability. With different systems, if onephysical node goes down or off line, another router and backendnode takes over. In a slightly diff...
Page 21 - Figure 1–9 RTR with Browser, Single Node, and Database; Figure 1–10 RTR Deployed on Two Nodes; Browser; Journal
RTR Terminology single node configuration can be useful during development, butwould not normally be used when your application is deployed. Figure 1–9 RTR with Browser, Single Node, and Database LKG-11207-98WI Browser TR BE FE DB When creating the configuration used by an application anddefining th...
Page 22 - Figure 1–11 RTR Deployed on Three Nodes
RTR Terminology In this example, the frontend with the client and the routerreside on one node, and the server resides on the backend.Frequently, routers are placed on backends rather than onfrontends. A further separation of workload onto three nodes isshown in Figure 1–11. Figure 1–11 RTR Deployed...
Page 23 - Figure 1–12 Standby Server Configuration
RTR Terminology Figure 1–12 Standby Server Configuration LKG-11210-98WI TR BE DB BE Server Server Primary Server Standby Server Transactionalshadowing To increase transaction availability, transactions can beshadowed with a shadow server. This is called transactionalshadowing and is accomplished by ...
Page 24 - Figure 1–13 Transactional Shadowing Configuration; Note
RTR Terminology Figure 1–13 Transactional Shadowing Configuration LKG-11211-98WI TR BE BE Server Server Primary Server Shadow Server FE With transactional shadowing, there is no requirement thathardware, the data store, or the operating system at differentsites be the same. You could, for example, h...
Page 25 - RTR Server Types; In the RTR environment, in addition to the placement of
RTR Server Types Figure 1–14 Two Sites: Transactional and Disk Shadowing with Standby Servers LKG-11212-98WI Disk Shadowing FE TR BE BE BE BE TR Transactional Shadowing Standby Server or Router RTR Server Types In the RTR environment, in addition to the placement of frontends, routers, and servers, ...
Page 27 - Figure 1–15 Standby Servers
RTR Server Types one node can contain the primary servers for one key range andstandby servers for another key range to balance the load acrosssystems. This allows the nodes in a cluster environment to actas standby for other nodes without having idle hardware. Whensetting up a standby server, both ...
Page 28 - Figure 1–16 Shadow Servers; Note that each shadow server can also have standby servers.
RTR Server Types Figure 1–16 shows a simple shadow configuration. The main(BE) Server at Site 1 and the shadow server (Shadow) at Site2 both receive every transaction for the data partition they areservicing. Should Site 1 fail, Site 2 continues to operate withoutinterruption. Sites can be geographi...
Page 29 - Figure 1–17 Concurrent Servers; Server1
RTR Server Types channels within a single process or as one channel in separateprocesses. Figure 1–17 Concurrent Servers BE Server1 A-N Server2 Server3 Server4 LKG-11275-98WI Callout server The callout server provides message authentication ontransaction requests made in a given facility, and could ...
Page 30 - Figure 1–18 A Callout Server; User Accounts Facility; Callout servers offer the following advantages:
RTR Server Types Figure 1–18 A Callout Server Transaction To Partition A TR Callout Server Application Server BE User Accounts Facility LKG-11276-98WI Authentication RTR callout servers provide partition-independent processing forauthentication. For example, a callout server can enable checksto be c...
Page 31 - Figure 1–19 Bank Partitioning Example; Appn
RTR Server Types Partition When working with database systems, partitioning the databasecan be essential to ensuring smooth and untrammeledperformance with a minimum of bottlenecks. When youpartition your database, you locate different parts of yourdatabase on different disk drives to spread both th...
Page 33 - Figure 1–20 Standby with Partitioning; Router; RTR Networking Capabilities
RTR Networking Capabilities Figure 1–20 Standby with Partitioning LKG-11214-98WI Router 1-19999 1-19999 1-19999 1-19999 Accounts: 1-19999 20000-39999 20000-39999 20000-39999 Application ServerA Application ServerB RTR Networking Capabilities Depending on operating system, RTR uses TCP/IP or DECnetas...
Page 35 - Architectural Concepts; The Three-Layer Model; Allows the database to be distributed geographically.; Architectural Concepts 2–1
2 Architectural Concepts This chapter introduces concepts on basic transaction processingand RTR architecture. The Three-Layer Model RTR is based on a three-layer architecture consisting of frontend(FE) roles, backend (BE) roles and router (TR) roles. The rolesare shown in Figure 2–1. In this and su...
Page 36 - Figure 2–1 The Three Layer Model; –2 Architectural Concepts
The Three-Layer Model Figure 2–1 The Three Layer Model DB BE Server BE Server TR FE Client FE Client FE Client DB Terminals Frontends (FE) Routers (TR) Backends (BE) Database (DB) DB FE Client TR BE Server ZKO-GS011-99AI • Allows performance or geographic expansion while protectingthe investments ma...
Page 37 - RTR Facilities Bridge the Gap; When an application calls the; Broadcasts; The RTR broadcast capability meets this requirement.; Flexibility and Growth; RTR allows you to cope easily with changes in:; Architectural Concepts 2–3
RTR Facilities Bridge the Gap RTR Facilities Bridge the Gap Many applications can use RTR at the same time withoutinterfering with one another. This is achieved by defining aseparate facility for each application. When an application calls the rtr_open_channel( ) routine to declare a channel as a cl...
Page 38 - Transaction Integrity; –4 Architectural Concepts
Flexibility and Growth • User access patterns • The volume of data Since an RTR-based system can be built using multiple systemsat each functional layer, it easily lends itself to step-by-stepgrowth, avoiding unused capacity at each stage. With yoursystem still up and running, it is possible to: • C...
Page 39 - The Partitioned Data Model; For use of the disk; Object-Oriented Programming; Architectural Concepts 2–5
The Partitioned Data Model The Partitioned Data Model One goal in designing for high transaction throughput isreducing the time that users must wait for shared resources. While many elements of a transaction processing system can beduplicated, one resource that must be shared is the database.Users c...
Page 40 - Figure 2–2 Partitioned Data Model; –6 Architectural Concepts
Object-Oriented Programming Figure 2–2 Partitioned Data Model DB BE Server BE Server TR FE Client FE Client FE Client DB Terminals Frontends (FE) Routers (TR) Backends (BE) Database (DB) DB FE Client TR BE Server ZKO-GS012-99AI 2–6 Architectural Concepts
Page 41 - Table 2–1 Functional and Object-Oriented Programming; Functional Programming; Objects; Architectural Concepts 2–7
Object-Oriented Programming Table 2–1 Functional and Object-Oriented Programming Compared Functional Programming Object-Oriented Programming A program consists of datastructures and algorithms. A program consists of a team ofcooperating objects. The basic programmingunit is the function, thatwhen ru...
Page 42 - Example 2–1 Objects-Defined Sample; Messages; Some principal categories of messages are:; –8 Architectural Concepts
Object-Oriented Programming Example 2–1 Objects-Defined Sample Dog.h:class Dog{ ...};main.cpp:#include "Dog.h"main(){ Dog King;Dog Fifi; } Messages Objects communicate by sending messages. This is done bycalling an object’s methods. Some principal categories of messages are: • Constructors: ...
Page 43 - Polymorphism; Fifi, of class Minipoodle, is a derived or child class of Dog.; Architectural Concepts 2–9
Object-Oriented Programming Polymorphism Polymorphism is the ability of objects, inherited from a commonbase or parent class, to respond differently to the same message.This is done by defining different implementations of the samemethod name within the individual child class definitions. Forexample...
Page 44 - XA Support; –10 Architectural Concepts
XA Support XA Support The XA interface is part of the X/Open DTP (DistributedTransaction Processing) standard. It defines the interface thattransaction managers (TM) and resource managers (RM) useto perform the two-phase commit protocol. (Resource managersare underlying database systems such as ORAC...
Page 45 - Reliability Features; Servers; Reliability Features 3–1
3 Reliability Features Reliability in RTR is enhanced by the use of: • Concurrent servers • Standby servers • Shadow servers • Callout servers • Router failover Servers Note that, conceptually, servers can be contrasted as follows: • Concurrent servers handle similar transactions which accessthe sam...
Page 46 - Failover and Recovery; Router Failover; Recovery Scenarios; –2 Reliability Features
Failover and Recovery Failover and Recovery RTR provides several capabilities to ensure failover and recoveryunder several circumstances. Router Failover Frontend nodes automatically connect to another router if theone being used fails. This reconnection is transparent to theapplication. Routers are...
Page 47 - Reliability Features 3–3
Recovery Scenarios BackendRecovery If standby or shadow servers are available on another backendnode, operation of the rest of the system will continue withoutinterruption, using the standby or shadow server. If a backend processor is lost, any transactions in progressare remembered by RTR and later...
Page 49 - RTR Interfaces; The command line interface or CLI; RTR Interfaces 4–1
4 RTR Interfaces RTR provides interfaces for management and applicationprogramming. You manage RTR with a management interface from the RTRmanagement station. The management interfaces are: • The command line interface or CLI • The browser interface The application programming interfaces (APIs) are:...
Page 50 - RTR Management Station; –2 RTR Interfaces
The RTR application programming interfaces are identicalon all hardware and operating system platforms that supportRTR. The object-oriented API is fully described in the manualReliable Transaction Router C++ Foundation Classes. The C-programming API is fully described in the Reliable TransactionRout...
Page 51 - The; RTR Interfaces 4–3
RTR Management Station The user is called user, the facility being defined is calledDESIGN, a client and a server are established, and a testmessage containing the words "Kathy’s text today" is sent fromthe client to the server. After the server receives this text, theuser on the server ente...
Page 52 - –4 RTR Interfaces
RTR Management Station [The user issues the following commands on the server application where RTR is running on the backend.] $ RTRCopyright Compaq Computer Corporation 1994.RTR> set mode/group%RTR-I-STACOMSRV, starting command server on node NODEA%RTR-I-GRPMODCHG, group changed from " "...
Page 53 - RTR Interfaces 4–5
RTR Management Station RTR> RTR_RECEIVE_MESSAGE/CHAN=S%RTR-S-OK, normal successful completion channel name: S msgsb msgtype: rtr_mt_msg1 msglen: 19 usrhdl: 0 Tid: 63b01d10,0,0,0,0,2e59,43ea2002 message offset bytes text 000000 4B 61 74 68 79 27 73 20 74 65 78 74 20 74 6F 64 Kathy’s text tod 00001...
Page 54 - –6 RTR Interfaces
RTR Management Station RTR> RTR_RECEIVE_MESSAGE/CHANNEL=C/tim [to get mt_opened or mt_closed] %RTR-S-OK, normal successful completion channel name: C msgsb msgtype: rtr_mt_opened msglen: 8 message status: normal successful completion reason: Ox00000000 RTR> RTR_START_TX/CHAN=C%RTR-S-OK, normal...
Page 55 - Application Programming Interfaces; RTR Interfaces 4–7
RTR Management Station RTR> RTR_RECEIVE_MESSAGE%RTR-S-OK, normal successful completion channel name: S ...msgtype: rtr_mt_accepted ... RTR> STOP RTR BrowserInterface With the RTR browser interface, your management station hasa network-browser-like display from which you can view RTRstatus and ...
Page 56 - Figure 4–1 RTR Browser Interface; Example of object creation in an RTR client program.; –8 RTR Interfaces
Application Programming Interfaces Figure 4–1 RTR Browser Interface Sample C++ clientcode Example of object creation in an RTR client program. //// Create a Transaction Controller to receive incoming messages// and events from a client.//RTRClientTransactionController *pTransaction = new RTRClientTr...
Page 57 - RTR Interfaces 4–9
Application Programming Interfaces Sample C++server code Example of object creation in an RTR server program. void CombinationOrderProcessor::StartProcessingOrdersAtoL(){//// Create an RTRKeySegment for all ASCII values between "A" and "L."//m_pkeyRange = new RTRKeySegment (rtr_keyse...
Page 59 - The RTR Environment; The RTR System Management Environment; The RTR Environment 5–1
5 The RTR Environment The RTR environment has two parts: • The system management environment • The runtime environment The RTR System Management Environment You manage your RTR environment from a management station,which can be on a node running RTR or on some other node.You can manage your RTR envi...
Page 60 - –2 The RTR Environment
The RTR System Management Environment • Handles all transactions and recovery RTRACP handles interprocess communication traffic, networktraffic, and is the main repository of runtime information. ACPprocesses operate across all RTR roles and execute certaincommands both locally and at remote nodes. ...
Page 61 - Figure 5–1 RTR System Management Environment; The RTR Environment 5–3
The RTR System Management Environment The Command Server Process executes commands both locallyand across nodes. Commands that can be executed at the RTRCOMSERV include: • START RTR • CREATE/MODIFY JOURNAL • SHOW LINK/FACILITY/SERVER/CLIENT (ACP must berunning) • Application programmer commands (for...
Page 62 - Monitoring RTR; RTR uses three transaction states to track transaction status:; –4 The RTR Environment
The RTR System Management Environment Monitoring RTR RTR Monitor pictures or the RTR Monitor let you view thestatus and activities of RTR and your applications. A monitorpicture is dynamic, its data periodically updated. RTR SHOWcommands that also let you view status are snapshots, givingyou a view ...
Page 63 - The RTR Runtime Environment; Client application; The RTR Environment 5–5
The RTR System Management Environment PartitionManagement Partitions are subdivisions of a routing key range of values usedwith a partitioned data model and RTR data-content routing.Partitions exist for each range of values in the routing key forwhich a server is available to process transactions. R...
Page 64 - Figure 5–2 RTR Runtime Environment; –6 The RTR Environment
The RTR Runtime Environment • Server application • RTR shareable image, LIBRTR • RTR control process, RTRACP • RTR daemon, RTRD Figure 5–2 shows these components and their placement onfrontend, router, and backend nodes. The frontend, router, andbackend can be on the same or different nodes. If thes...
Page 67 - Glossary; The RTR Application Control Process.; Glossary–1
Glossary A few additional terms are defined in the Glossary to theReliable Transaction Router Application Design Guide. ACID Transaction properties supported by RTR: atomicity, consistency,isolation, durability. ACP The RTR Application Control Process. API Application Programming Interface. applet A...
Page 68 - Glossary–2
branch A subdivision of a bank; perhaps in another town. broadcast A nontransactional message. callout server A server process used for transactional authentication. channel A logical port opened by an application with an identifier toexchange messages with RTR. client A client is always a client ap...
Page 69 - Glossary–3
common classes C++ foundation classes that can be used in both client and serverapplications. concurrent server A server process identical to other server processes running onthe same node. CPU Central processing unit. data marshalling The capability of using systems of different architectures (bige...
Page 70 - A C++ API management class that creates and deletes facilities.; Glossary–4
endian The byte-ordering of multibyte values. Big endian: high-orderbyte at starting address; little endian: low-order byte at startingaddress. event RTR or application-generated information about an applicationor RTR. event driven A processing model in which the application receives messagesand eve...
Page 71 - Glossary–5
frontend FE, the physical node in an RTR facility where the clientapplication runs. FTP File transfer protocol. inquorate Nodes/roles that cannot participate in a facility’s transactionsare inquorate. journal A file containing transactional messages used for recovery. key range An attribute of a key...
Page 72 - Information about the attributes of a partition.; Glossary–6
message A logical grouping of information transmitted between softwarecomponents, typically over network links. message handler A C++ API-derived object used in event-driven processing thatprocesses messages. multichannel An application that uses more than one channel. A server isusually multichanne...
Page 73 - Glossary–7
primary The state of the partition servicing the original data store ordatabase. A primary has a secondary or shadow counterpart. process The basic software entity, including address space, scheduled bysystem software, that provides the context in which an imageexecutes. properties Application, tran...
Page 74 - The RTR run-time and system management areas.; Glossary–8
rollback When a transaction has been committed on the primarydatabase but cannot be committed on its shadow, the committedtransaction must be removed or rolled back to restore thedatabase to its pre-transaction state. router The RTR role that manages traffic between RTR clients andservers. RTR confi...
Page 75 - Glossary–9
shadow The state of the server process that services a copy of the datastore or primary database. In the context of RTR, the shadowmethod is transactional shadowing, not disk shadowing. Itscounterpart is primary. SMP Symmetric MultiProcessing. standby The state of the partition that can take over if...
Page 76 - transactional message; A message containing transactional data.; transactional shadowing
transactional message A message containing transactional data. transactional shadowing A process by which identical transactional data are writtento separate disks often at separate sites to increase dataavailability in the event of site failure. See also disk shadowing. two-phase commit A database ...
Page 77 - Index; Index–1
Index A ACID, 2–4Anonymous client, 1–22API, 4–1Application distributed, 2–4software, 2–2 Authentication, 1–20 B Backend, 2–1 loss, 3–3 BE, 2–1Broadcast, 2–3 C Callout server, 1–20, 3–1 Client anonymous, 1–22processes, 2–1 Concurrent server, 3–1 D Database, 2–1, 2–2 locks, 2–5shared, 2–5 Data model p...
Page 78 - Index–2
N Network wide area, 1–18 Nodes, 2–2 O Object-oriented, 2–5Oracle RDBMS, 2–10 P Parallel execution, 2–4Partitioned data model, 2–5Processes client, 2–1server, 2–1 R RDBMS, 2–10Recovery, 3–2Reliability features, 3–1Resource manager, 2–10RM, 2–10Router, 2–1 failover, 3–2layer, 2–2loss, 3–3 RTR API, 4–...