Compaq Reliable Transaction Router manual Example of an open channel call in an RTR client program

Page 58

Application Programming Interfaces

Sample C client code

Sample C server code

Example of an open channel call in an RTR client program:

status = rtr_open_channel(&Channel, Flags, Facility, Recipient, RTR_NO_PEVTNUM, Access, RTR_NO_NUMSEG, RTR_NO_PKEYSEG);

if (Status != RTR_STS_OK)

Example of a receive message call in an RTR server program:

status = rtr_receive_message(&Channel, RTR_NO_FLAGS, RTR_ANYCHAN, MsgBuffer, DataLen,

RTR_NO_TIMOUTMS, &MsgStatusBlock);

if (status != RTR_STS_OK)

A client can have one or multiple channels, and a server can have one or multiple channels. A server can use concurrent servers, each with one channel. How you create your design depends on whether you have a single CPU or a multiple CPU machine, and on your overall design goals and implementation requirements.

4–10RTR Interfaces

Image 58
Contents Reliable Transaction Router Getting Started Page Contents Reliability Features Figures Page Purpose of this Document PrefaceDocument Structure Related Documentation For all usersReading Path Readers CommentsIf V2 to System Manager Application Programmer= Tutorial Introduction Reliable Transaction RouterRTR 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 Application Presentation Database ServerBusiness Logic Odbc Model PC Browser RTR FrontendBrowser Journal11 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 17 Concurrent Servers Server1 Server2 Server3 Server4Transaction Partition a19 Bank Partitioning Example Standby Server Configurations Anonymous clients Tunnel RTR Networking Capabilities RTR Networking CapabilitiesPage Architectural Concepts Three-Layer ModelThree-Layer Model Three Layer ModelFlexibility and Growth RTR Facilities Bridge the GapBroadcasts RTR Facilities Bridge the GapTransaction Integrity Flexibility and GrowthObject-Oriented Programming Partitioned Data ModelPartitioned Data Model Object-Oriented Programming Partitioned Data ModelObjects Functional and Object-Oriented Programming ComparedMessages Class Relationships Example 2-1 Objects-Defined SamplePolymorphism Object Implementation Benefits XA Support XA SupportReliability Features ServersRecovery Scenarios Failover and RecoveryFailover and Recovery Backend Recovery Router Recovery Frontend Recovery Recovery ScenariosPage RTR Interfaces RTR Management Station RTR Management Station RTR Create Facility DESIGN/ALLROLES=NODEA RTR RTRRECEIVEMESSAGE/TIME=0 RTR RTRSTARTTX/CHAN=C Application Programming Interfaces InterfaceApplication Programming Interfaces RTR Browser InterfaceRTR C Example of an open channel call in an RTR client program RTR Environment RTR System Management EnvironmentRTR System Management Environment RtrcomservRTR System Management Environment Management Station Running Browser SoftwareMonitoring RTR RTR Runtime Environment Client Application RTR Runtime EnvironmentOptional External Applet Not Running Whats Next? Whats Next?Page Glossary Callout server BranchBroadcast ChannelData marshalling Common classesConcurrent server Data objectEvent Fault tolerantEndian Event drivenJournal FrontendInquorate Key rangeMultichannel MessageMessage handler MultithreadedProperties PrimaryProcess Property classesRTR configuration RollbackRouter RTR environmentTransaction ShadowStandby Transaction controllerTransactional message Two-phase commitTransactional shadowing Index Index-1Index-2