230 likes | 371 Views
Sunil Kumaran / David Sullivan. RTR Engineering. The New Object Oriented RTR API. Client App. Server App. oRTR. oRTR. C API. C API. What is oRTR ?. RTR. Why the change?. Reduce common code. Benefit from OO. OO wrapper used anyway. Flat API - flags & options.
E N D
Sunil Kumaran / David Sullivan RTR Engineering The New Object Oriented RTR API
Client App Server App oRTR oRTR C API C API What is oRTR ? RTR
Why the change? • Reduce common code. • Benefit from OO. • OO wrapper used anyway. • Flat API - flags & options.
DesignRequirements • 100% compatibility. • OO Language independant. • Benefits Old and New. • ”Common" tasks. • Default implementations. • Message & event framework.
Customer Benefits • Higher quality. • Lower maintenance costs. • Reduced development time. • Inherit from RTR. • Easy to extend.
oRTR - Ease of use • Manageable classes. • Get/Set methods. • Environment class. • Default handling. • Send/Receive abstracted. • Rtr_request_info(), Rtr_set_info(). • Concept Class.
RTRServerEnvironment RTRClientEnvironment RTRServerTransactionController RTRClientTransactionController RTRServerTransactionProperties RTRClientTransactionProperties RTRServerMessageHandler RTRClientMessageHandler RTRServerEventHandler RTRClientEventHandler RTRPartition ClientClasses Common Classes RTRPartitionProperties Server Classes The oRTR Classes RTRData
RTRTransactionController • Has a client and server version. • Represents 1 RTR transaction. • Can be used to process many sequential transactions. • Get/Set methods replace flags. • Knows what channel is in use and automatically uses it for all calls. oRTR Class Descriptions RTRTransactionController RTRMessageHandler RTRTransactionProperties RTRData RTREventHandler
RTRTransactionProperties • Has a client and server version. • Can be used by new or existing apps. • Implements most valuable rtr_request_info and rtr_set_info calls, i.e. GetTransactionState(), SetTransactionState(), GetInvocationType(). oRTR Class Descriptions RTRMessageHandler RTRTransactionController RTRTransactionProperties RTRData RTREventHandler
RTRData • Holds RTR Message, Events and User Data. • Used To Send and Receive. • All methods are callable regardless of the contents of the object. • On receive will automatically allocate enough memory to receive the data or the app can specify its own buffer. • App just calls Dispatch() to send this data to the appropriate handler. • App can optionally derive from RTRData to create a more business specific class, i.e. CStock. oRTR Class Descriptions RTRMessageHandler RTRTransactionController RTRTransactionProperties RTRData RTREventHandler
RTRMessageHandler • Has a client and server version. • Provides default implementation for every possible message. • App overrides only the messages it wants to process. • Can easily be extended to have app specific handlers, i.e. OnStockBuy(), OnStockSell()... oRTR Class Descriptions RTRMessageHandler RTRTransactionController RTRTransactionProperties RTRData RTREventHandler
RTREventHandler • Has a client and server version. • Provides default implementation for every possible event. • App overrides only the events it wants to process. • Can easily be extended to have app specific handler, i.e. OnStockPriceUpdate(). oRTR Class Descriptions RTRMessageHandler RTRTransactionController RTRTransactionProperties RTRData RTREventHandler
RTREnvironment • Has a client and server version. • Similar to a channel. Hides detail of channel use. • If constructor succeeds Environment exists. No need to call Receive to determine status. • Get/Set methods replace flags. oRTR Class Descriptions RTREnvironment RTRPartition RTREnvironmentArray RTRPartitionProperties
RTREnvironmentArray • Provides an easy way to register multiple Environments for the application oRTR Class Descriptions RTREnvironment RTRPartition RTREnvironmentArray RTRPartitionProperties
RTRPartition • Create an RTR Partition on construction. • Deletes RTR Partition on Destruction. oRTR Class Descriptions RTREnvironment RTRPartition RTREnvironmentArray RTRPartitionProperties
RTRPartitionProperties • Supplies information about a partition. • Can be used by new or existing apps. • Can be used to obtain information on partitions created at the command line. oRTR Class Descriptions RTREnvironment RTRPartition RTREnvironmentArray RTRPartitionProperties
CTradeProcessor CTradeOrder CTradeHandler While(bProcessTrades){ ReceiveMessageOrEvent(pTradeOrder) pTradeOrder->Dispatch()} CTradeOrder::Dispatch(){ if( IsApplicationData()) { if (request == buy) GetHandler()->OnStockBuy(this) }else RTRData::Dispatch()} OnStockBuy( pCTradeOrder )OnStockSell( pCTradeOrder ) RTRTransactionController RTRData RTRData RTRMessageHandler ReceiveMessageOrEvent() IsApplicationData() GetHandler() Dispatch() OnAccepted()OnRejected() A Derived Receive Model
CTradeProcessor CTradeHandler While(bProcessTrades){ ReceiveMessageOrEvent(pTradeOrder) pTradeOrder->Dispatch()} OnStockBuy( pCTradeOrder )OnStockSell( pCTradeOrder ) RTRMessageHandler RTRTransactionController OnApplicationMessage(pRTRData) { if (request == buy) OnStockBuy((CTradeOrder)pRTRData) } OnAccepted()OnRejected() ReceiveMessageOrEvent() Another Derived Receive Model
Using oRTR • Entire new applications. • Upgrade just client or server. • Integrate individual oRTR classes. • E.g. Property Classes
Summary • Backward compatible. • More Features. • Better isolation of RTR. • Benefits of OO. • Benefits to existing applications.
Availability • Vaporware ? • Platforms ? • Where ? No. It exists today! Beta is available now for C++ on NT. Including sample apps with documentation. NT, OpenVMS Alpha, Unix RTR Engineering
? Questions Kit: www.compaq.com/emea/swmarketing Contact: David.Sullivan@compaq.com Please try it out Your feedback is important