HP Reliable Transaction RouterGetting StartedOrder Number: AA-RLE1C-TEJune 2005This document introduces HP Reliable Transaction Router and describes i
ConventionsThis manual adopts the following conventions:Convention DescriptionNew term New terms are shown in bold whenintroduced and defined. All RTR
Figure 1 RTR Reading PathVM-0818A-AISystem Manager Application Programmer= Tutorial(Online Only)If C++If JavaIf CGettingStartedC ApplicationProgrammer
1IntroductionThis document introduces RTR and describes RTR concepts. It isintended for the system manager or administrator and for theapplication pro
Reliable Transaction RouterInteroperabilityYou use the architecture of RTR to ensure high availability andtransaction completion. RTR supports applica
Reliable Transaction Routerprocessing system using RTR requires analysis, planning, andconsidered execution.RTR Continuous Computing ConceptsRTR provi
RTR Continuous Computing Concepts• DurableFor more details on transactional ACID properties, see the briefdiscussion later in this document in the sec
RTR Terminology• Standby server• Transactional shadowing• RTR journal• Partition• Key range•XARTR ApplicationAn RTR application is user-written softwa
RTR TerminologyServerA server is always a server application, one that reacts to aclient’s units of work and carries them through to completion.This m
RTR TerminologyRolesA node that runs client applications is called a frontend(FE), or is said to have the frontend role. A node that runsserver applic
© Copyright 2003, 2005 Hewlett-Packard Development Company, L.P.Confidential computer software. Valid license from HP required for possession,use or co
RTR TerminologyFigure 1–4 Facility SymbolVM-0822A-AIA facility name is mapped to specific physical nodes and theirroles using the CREATE FACILITY comma
RTR TerminologyClients send messages to servers to ask that a piece of work bedone. Such requests may be bundled together into transactions.An RTR tra
RTR TerminologyWith transactional messaging, RTR ensures that a transactionis ‘‘all or nothing’’—either fully completed or discarded; eitherboth the c
RTR TerminologyFigure 1–6 Two-Tier Client/Server EnvironmentApplication Presentationand Business Logic(ODBC Model)DatabaseServerData ManagersoftwareVM
RTR Terminologyconnection to the current router is maintained until the currentrouter fails or connections to it are lost.All RTR software components
RTR TerminologyFor example, you could use an underutilized system as a standbyserver in certain configurations.As you modularize your application and d
RTR TerminologyIn this example, the frontend with the client application resideson one node, and the router with the server application residea node t
RTR TerminologyThe standby server is usually placed on a node other than thenode where the primary server runs, and should be, to avoidbeing a single
RTR TerminologyFigure 1–13 Transactional Shadowing ConfigurationVM-0831A-AITRFEDatabaseDatabaseBEServerapplicationBEServerapplicationPrimary ServerShad
RTR TerminologyNoteTransactional shadowing shadows only transactionscontrolled by RTR.For full redundancy to assure maximum availability, aconfiguratio
ContentsPreface ... vii1 IntroductionReliable Transaction Router . . ... 1–1
RTR Server TypesStandby serverThe standby server remains idle while the RTR primarybackend server performs its work, accepting transactions andupdatin
RTR Server TypesNote that one node can contain the primary servers for one keyrange and standby servers for another key range to balancethe load acros
RTR Server TypesTransactional shadowing is done by partition. A transactionalshadow configuration can have only two members of the shadowset.Shadow ser
RTR Server TypesConcurrent serverThe concurrent server is an additional instance of a serverapplication running on the same node. RTR delivers transac
RTR Server TypesCallout serverThe callout server enables message authentication ontransaction requests made in a given facility, and could beused, for
RTR Server TypesAuthenticationRTR callout servers provide facility-based processing forauthentication. For example, a callout server can enableverifica
RTR Server TypesFigure 1–18 Bank Partitioning ExampleVM-0837A-AITRBEServerapplicationBEServerapplicationBEServerapplicationBEServerapplicationBEServer
RTR Server Typeseasily. The system manager can change the key range with acommand, for example, in an overnight operation, or you canplan to do this d
RTR Networking CapabilitiesRTR Networking CapabilitiesDepending on operating system, RTR uses TCP/IP or DECnetas underlying transports for the virtual
2Architectural ConceptsThis chapter introduces concepts on basic transaction processingand RTR architecture.The Three-Tier ArchitectureRTR is based on
3 Reliability FeaturesRTR Server Types ... 3–1Failover and Recovery . ... 3–2Router Fail
The Three-Tier ArchitectureFigure 2–1 The Multitier ModelVM-0839A-AITRFETerminals Frontends Routers BackendsDatabaseBEServerapplicationBEServerapplica
The Three-Tier Architecture• Allows performance or geographic expansion while protectingthe investments made in existing hardware and applicationsoftw
BroadcastsBroadcastsSometimes an application has a requirement to send unsolicitedmessages to multiple recipients.An example of such an application is
Flexibility and GrowthRTR also allows parallel execution. This means that differentparts of a single transaction can be processed in parallel bymultip
The Partitioned Data ModelThe Partitioned Data ModelOne goal in designing for high transaction throughput isreducing the time that users must wait for
Object-Oriented ProgrammingFigure 2–2 Partitioned Data ModelVM-0840A-AITRFETerminals Frontends Routers Backends DatabaseBEServerapplicationBEServerapp
Object-Oriented ProgrammingTable 2–1 Functional and Object-Oriented ProgrammingComparedFunctional Programming Object-Oriented ProgrammingA program con
Object-Oriented ProgrammingExample 2–1 Objects-Defined SampleDog.h:class Dog{ ...};main.cpp:#include "Dog.h"main(){Dog King;Dog Fifi;}Message
Object-Oriented ProgrammingPolymorphismPolymorphism is the ability of objects, inherited from a commonbase or parent class, to respond differently to
Java SupportJava SupportRTR clients and servers can be Java applications that obtainthe benefits of high availability, fault tolerance and scalabilityp
4–3 Commands and system response at client. ... 4–144–4 The following lines arrive at the client from RTR after theuser enters commands at
3Reliability FeaturesThis chapter addresses:• RTR server types• Failover and recovery• Recovery scenariosRTR Server TypesReliability in RTR is enhance
RTR Server TypesWhen there is concern that your database is a single pointof failure, add a shadow server, if possible at a differentphysical location
Failover and RecoveryBackendRestartRecoveryTransactions in the process of being committed at the time of afailure are recovered from RTR’s disk journa
Recovery ScenariosFrontendRecoveryIf a frontend is lost:• All transactions committed but not completed on the frontendnode at the time of failure will
4RTR InterfacesRTR provides interfaces for system management (themanagement interfaces) and for development of transactionprocessing and management ap
RTR InterfacesFigure 4–1 RTR Administratorvm-1152A-AIThe RTR CLI contains all RTR system manager commands andcalls to all RTR C API routines such asrt
RTR InterfacesFigure 4–2 RTR Command Line InterfaceVM-1103a-AIProgrammingInterfacesRTR provides several programming or application developmentinterfac
RTR Interfaces• An interface that enables use of an X/Open DistributedTransaction Processing-conformant resource managerThis interface, invoked throug
RTR InterfacesMany books are available to assist the developer with bothdesign and development, including:• J. Gray, A. Reuter, Transaction Processing
4–6 RTR Service Provider ... 4–175–1 RTR System Management Environment ... 5–45–2 RTR Runtime Environment . .
RTR ManagementRTR ManagementYou can manage RTR from several locations:• from a node on which RTR is running• from a remote node from which you send RT
RTR ManagementFigure 4–3 RTR ManagerVM-1158A-AIhttp://nodenamenodenamenodenameRTR ExplorerFigure 4–4 shows a sample screen of the RTR Explorer withsev
RTR ManagementFigure 4–4 RTR Explorer: View of All Facilitiesvm-1155A-AIInformation available for each facility includes the facility name,the alerts
RTR ManagementFigure 4–5 RTR Explorer: View of One FacilityVM-1151A-AIhttp://nodenameMode: NavigationDesign Facilitynodenamenodename nodenameGenerat
RTR Managementor group of nodes. If there are no flags, the node or group isoperating normally.RTR CommandLine InterfaceThe command line interface (CLI
RTR ManagementSystem responses begin with the characters %RTR-. Notes onthe procedure are enclosed in square brackets [ ]. For clarity,commands you en
RTR ManagementExamplesExample 4–1 The user issues the following commands on the server applicationwhere RTR is running on the backend.$ RTRCopyright 1
RTR ManagementExample 4–2 When the next command is issued, RTR waits for the message from theclient, which does not appear until after the client send
RTR ManagementExample 4–3 Commands and system response at client.$ RTRRTR> START RTR%RTR-S-RTRSTART, RTR started on node NODEA in group "usern
RTR ManagementExample 4–4 The following lines arrive at the client from RTR after the user enterscommands at the server.%RTR-S-OK, normal successful c
PrefacePurpose of this DocumentThe goal of this document is to assist an experienced systemmanager, system administrator, or application programmer to
Application Programming InterfacesApplication Programming InterfacesYou write application programs and management applicationswith the RTR application
Application Programming InterfacesFigure 4–6 RTR Service ProviderJNDIVM-1181A-AIService ProviderDataSourceConnection PoolJDBC DriverJRTR ServerApplica
Application Programming InterfacesRTR C++Object-OrientedProgrammingInterfaceYou can use the object-oriented programming interface to writeC++ applicat
Application Programming Interfacesvoid CombinationOrderProcessor::StartProcessingOrdersAtoL(){//// Create an RTRKeySegment for all ASCII values betwee
Application Programming InterfacesExample 4–5 Creating a Facility with the C++ API// Use the C++ interface to create an RTR facilityRTRFacilityManager
Application Programming InterfacesExample 4–6 Starting RTR with the C++ API//Start RTR.RTR rtr;rtr.Start();Example 4–7 Creating a Facility with the C+
Application Programming InterfacesSample C clientcodeExample of an open channel call in an RTR client program:status = rtr_open_channel(&Channel,F
5The RTR EnvironmentThe RTR environment has two parts:• System management environment• Runtime environmentThe RTR System Management EnvironmentYou man
The RTR System Management Environment• Sends messages between nodes• Handles all transactions and recoveryRTRACP handles interprocess communication tr
The RTR System Management EnvironmentThe Command Server Process executes commands both locallyand across nodes. Commands that can be executed at the R
Related DocumentationTable 1 describes RTR documents and groups them byaudience.Table 1 RTR DocumentsDocument ContentFor all users:HP Reliable Transac
The RTR System Management EnvironmentFigure 5–1 RTR System Management EnvironmentVM-0841A-AIManagement StationRunning Browser SoftwareFERTRACPRTRDRTR
The RTR System Management EnvironmentTransaction journal state describes how a transaction progressesfrom the point of view of the RTR journal. The tr
The RTR System Management Environment• Overriding the automatic recovery procedures of RTR withmanual recovery procedures, for added flexibility• Speci
What’s Next?Figure 5–2 RTR Runtime EnvironmentLIBRTR/RTRDLLLIBRTR/RTRDLLVM-0842A-AIOptional External AppletNot Running RTRFERTRACPRTRDRTR COMSERVRTR C
What’s Next?If you are:Read these documents in thisorder:a system manager, systemadministrator, or softwareinstaller1. RTR Release Notes2. RTR Install
GlossaryACIDTransaction properties supported by RTR: atomicity, consistency,isolation, durability. For additional information, see the sectionon Trans
bankAn establishment for the custody of money, which it pays out ona customer’s request.branchA subdivision of a bank; perhaps in another town.broadca
commit sequence number (CSN)A sequence number assigned to an RTR commit group,established by the vote window, the time interval during whichtransactio
deadlockDeadly embrace, a situation that occurs when two transactionsor parts of transactions conflict with each other, which couldviolate the consiste
facilityThe mapping between nodes and roles used by RTR andestablished when the facility is created.facility managerA C++ API management class that cr
Table 1 (Cont.) RTR DocumentsDocument ContentHP Reliable Transaction RouterJRTR Getting Started2Provides an overviewof the object-orientedJRTR Toolkit
JNDIJava Naming and Directory Interface, an API providing suchfunctions to applications written in the Java programminglanguage. Connection pools and
multichannelAn application that uses more than one channel. A server isusually multichannel.multithreadedAn application that uses more than one thread
polymorphismThe ability of objects inherited from a common parent class torespond differently to the same message. The object respondsdepending on whe
rolesRoles are defined for each node in an RTR configuration based onthe requirements of a specific facility. Roles are frontend, router,or backend.rollb
In other contexts, a server may be a physical node, but in RTRand in this document, physical servers are called backends ornodes.server classesC++ fou
transactionAn operation performed on a database, typically causing anupdate to the database. Analogous in many cases to a businesstransaction such as
transactional shadowingA process by which identical transactional data are writtento separate disks often at separate sites to increase dataavailabili
IndexAACID properties, 2–5Anonymous client, 1–25API, 4–1Applet, 1–12Applicationdistributed, 2–5RTR, 1–5software, 2–3Application logging, 3–2Authentica
IIDtransaction, 1–10JJ2EE, 2–11Java, 2–11JournalRTR, 1–16KKey range, 1–18, 1–23LLAN, 1–26Link failure recovery, 3–3Load balance, 1–19Lockdatabase, 2–6
Runtime environment, 5–6SSecuritycheck, 1–23Server, 1–6callout, 1–22, 1–23, 3–2concurrent, 1–21, 3–1shadow, 1–15, 3–2spare, 1–18standby, 1–14, 1–18, 3
Comentários a estes Manuais