Upload
arunbharadwaj
View
219
Download
0
Embed Size (px)
Citation preview
7/28/2019 6. Tibco - ADB
1/11
1
Adapters for TIBCO
7/28/2019 6. Tibco - ADB
2/11
3
Active Database Adapter (ADB)
- A real time bi-directional gateway between databases and applications
- Supports both publish-subscribe and request-response interactions
- Proactively notifies applications of changes that occur inside the database
- Subscribe to messages from other applications and capture the messages into targettables in the database
- Requests from applications are processed by the adapter and replies containing theprocessed request are sent back by the adapter to the requesting application
- Works with ODBC and JDBC compliant databases (Oracle, Sybase, and MS SQL Server)
7/28/2019 6. Tibco - ADB
3/11
4
ADB Architecture
7/28/2019 6. Tibco - ADB
4/11
5
Publications - Method to monitor an individual table & publish any change as entirerecord over the TIB with flag (I, U, D)
Subscriptions Method to take incoming information in and store it on the database
Request/Reply - Allows adapter to query (request) the database and send backimmediate response (reply)Request - Multiple SQL and/or procedure statements to be processed
Reply - Answer for these messages processed by the agent
Listener-- To configure a publisher agent that sends messages on subjects using the RVCM- Adds a subscriber agent (called a listener) to the publisher agent's preregistered list- Subscriber agent is certified to receive all messages sent on the specified subject
Parent Child RelationshipPublications
Table Relationships - To send out extra information with a publicationSubscriptions
Child Table Mapping- Used by subscriber agent to process a message thatincludes data from the publishing (parent) table and related data from another(child) table
Services of the ADB
7/28/2019 6. Tibco - ADB
5/11
6
Features
- Automatically publish data as TIBCO RV messages when rows in pre-specified DBtables are modified
Publish data by value creating a copyPublish data by reference w/o creating a copyPublish on parameterized subjects subject created from contents of PT columnsPublish data using TIBCO RV reliable delivery, certified delivery or bothPre-register certified subscribers with a certified publisherPublish both parent and all related child rows when user set up to publish childdata
- Automatically subscribe to data published as TIBCO RV messages and modify the datain pre-specified DB tables
- Use request-response semantics to publish SQL statements, stored procedures, or bothon a specified subject
Support both RV Message and AE Message wire formatsSupport RPC (Remote Procedure Calls)
7/28/2019 6. Tibco - ADB
6/11
7
Publish by Value- Modified data in the source table is duplicated in the PT- ADB selects the data from the PT, compose a message and sends it to RV- Advantage - Publish by copy is fast- Disadvantage - Does not support some data types(Oracle LONG and LONG RAW)
Publish by Reference- Publish data directly from the source table without copying to a publishing table- Operate on the key value of source table copied into PT- Advantage :
Data to be published is stored just onceData types such as Oracle LONG and LONG RAW are supportedPublishing by value from a top-level table is unsupported due to database triggerlimitations
- Disadvantage : Small time gap between source table modification & picked up byadapter
Parameterized Subjects- Created from contents of one or more columns in a publishing table
eg - TIBCO.ORDER.$ORDER_ID.$ORDER_DESCRIPTION- Allows receiving applications to filter publications based on value of certain fields- Supported with certified & reliable delivery- Restrictions : Max 255 char in length, with each component max 127 char (Content
7/28/2019 6. Tibco - ADB
7/11
8
Publication-Subscription Services Flow
7/28/2019 6. Tibco - ADB
8/11
9
Typical Request-Response Service Flow
7/28/2019 6. Tibco - ADB
9/11
10
ADB Architecture Components
Run-time Adapter -A bi-directional bridge between your database and the TIBCO environment
Design-time Adapter - Used at design-time to fetch the tables from your database that need to beconfigured for an adapter instance.
TIBCO Run-time Agent - Provides connectivity to other applications configured for the TIBCOenvironment.
Polling or Alerter -
Polling - Monitor frequent changes to PTAlerter - Asynchronously alert the adapter of infrequent changes in PT
Referencing External Schemas - External schema can be referenced when specifying a publishersource table or subscriber destination table
Exception Table - If a subscriber adapter fails to write data to its destination table, it will write thedata to the exception table.
Loop Detection - If a source table is used both as the source and destination table on the samesubject, the loop detection feature should be enabled, to prevent the same changes from beingpublished repeatedly
7/28/2019 6. Tibco - ADB
10/11
11
Publish-Subscribe Exercise
ORDER_TABLE Pub_OrderXXX XXX XXX XXX XXX XXX
Sub_Order
Order_ID
Order_Description,
Order_Price
Order_ID
Order_Description
Order_Price
ADB related columns
Order_ID
Order_Description,
Order_Price
Agentone Agent two
ADB.agentone.ORDER
7/28/2019 6. Tibco - ADB
11/11
12
Parent/Child Tables Exercise
CUSTOMER
Order_Details
XXX XXX
XXX XXX
XXX XXX
Internal_Order_ItemsXXX XXX
External_Order_Items