Compaq Reliable Transaction Router manual Rtr C

Page 57

 

Application Programming Interfaces

Sample C++

Example of object creation in an RTR server program.

server code

 

void CombinationOrderProcessor::StartProcessingOrdersAtoL()

{

//

//Create an RTRKeySegment for all ASCII values between "A" and "L."

m_pkeyRange = new RTRKeySegment (rtr_keyseg_string, //To process strings.

1,//Length of the key. OffsetIntoApplicationProtocol, //Offset value.

"A",

//Lowest ASCII value for partition.

"L");

//Highest ASCII value for partition.

StartProcessingOrders(PARTITION_NAMEAToL,m_pKeyRange);

}

//

//Create an RTRData Oobject to hold each incoming message or event. This

//object will be reused.

//

RTRData *pDataReceived= new RTRData();

//

//Continually loop, receiving messages and dispatching them to the handlers.

while(true)

{

sStatus = pTransaction->Receive(&pDataReceived); ASSERT(RTR_STS_OK == sStatus);

sStatus = pDataReceived->Dispatch(); ASSERT(RTR_STS_OK == sStatus);

}

RTR C

You can use the C programming interface to write C applications

Programming

that use RTR. For more information on the C programming

Interface

interface, see the RTR C Application Programmer's Reference

 

Manual and the RTR Application Design Guide.

 

Snippets from client and server programs using the RTR C-

 

programing API follow and are more fully shown in the RTR

 

Application Design Guide.

RTR Interfaces 4–9

Image 57
Contents Reliable Transaction Router Getting Started Page Contents Reliability Features Figures Page Preface Purpose of this DocumentDocument Structure For all users Related DocumentationReaders Comments Reading PathSystem Manager Application Programmer If V2 to= Tutorial Reliable Transaction Router IntroductionRTR Continuous Computing Concepts RTR Continuous Computing ConceptsRTR Terminology RTR TerminologyClient Symbol Server Symbol Roles Symbols Components in the RTR Environment Nontransactional messaging Transaction ID Controller Database Server Application PresentationBusiness Logic Odbc Model RTR Frontend PC BrowserJournal Browser11 RTR Deployed on Three Nodes 12 Standby Server Configuration 13 Transactional Shadowing Configuration RTR Server Types RTR Server TypesStandby server Standby in a cluster 15 Standby Servers 16 Shadow Servers Server1 Server2 Server3 Server4 17 Concurrent ServersPartition a Transaction19 Bank Partitioning Example Standby Server Configurations Anonymous clients Tunnel RTR Networking Capabilities RTR Networking CapabilitiesPage Three-Layer Model Architectural ConceptsThree Layer Model Three-Layer ModelBroadcasts RTR Facilities Bridge the GapFlexibility and Growth RTR Facilities Bridge the GapFlexibility and Growth Transaction IntegrityPartitioned Data Model Object-Oriented ProgrammingPartitioned Data Model Partitioned Data Model Object-Oriented ProgrammingFunctional and Object-Oriented Programming Compared ObjectsExample 2-1 Objects-Defined Sample Messages Class RelationshipsPolymorphism Object Implementation Benefits XA Support XA SupportServers Reliability FeaturesFailover and Recovery Recovery ScenariosFailover and Recovery Recovery Scenarios Backend Recovery Router Recovery Frontend RecoveryPage RTR Interfaces RTR Management Station RTR Management Station RTR Create Facility DESIGN/ALLROLES=NODEA RTR RTRRECEIVEMESSAGE/TIME=0 RTR RTRSTARTTX/CHAN=C Interface Application Programming InterfacesRTR Browser Interface Application Programming InterfacesRTR C Example of an open channel call in an RTR client program RTR System Management Environment RTR EnvironmentRtrcomserv RTR System Management EnvironmentManagement Station Running Browser Software RTR System Management EnvironmentMonitoring RTR RTR Runtime Environment RTR Runtime Environment Client ApplicationOptional External Applet Not Running Whats Next? Whats Next?Page Glossary Broadcast BranchCallout server ChannelConcurrent server Common classesData marshalling Data objectEndian Fault tolerantEvent Event drivenInquorate FrontendJournal Key rangeMessage handler MessageMultichannel MultithreadedProcess PrimaryProperties Property classesRouter RollbackRTR configuration RTR environmentStandby ShadowTransaction Transaction controllerTwo-phase commit Transactional messageTransactional shadowing Index-1 IndexIndex-2