IBM Informix dynamic server and websphere MQ integration

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    IBM Informix dynamic server and websphere MQ integration - Presentation Transcript

    1. Keshava Murthy, Architect, IDS IBM Information Management Design, Develop and Deploy IDS with Websphere MQ
    2. Agenda
        • Websphere MQ
        • IDS Support for MQ
          • MQ Functions
          • 2-phase commit support
        • Platforms
        • Q & A
    3. Webspher MQ
    4. shippingreq Order Entry Application Transaction Manager Shipping Application Websphere MQ creditque Database program for App to IDS interaction MQI or JMS program for app to MQ interaction Programming for Transaction co-ordination Between MQ and IDS Informix Dynamic Server Credit processing BEFORE recvdnotify Inventory
    5. shippingreq Order Entry Application Shipping Application Websphere MQ creditque Informix Dynamic Server MQ Functions Transaction mgmt Simplified Interface SQL based program SQL based MQ access 2-phase commit Credit processing AFTER recvdnotify Inventory
    6. IDS and MQ
      • Overview
        • Use SQL callable Routines exchange data with MQ
          • INSERT into tasktab values(MQREAD(“Myservice”));
          • SELECT MQSEND(“UService”, order || “:“ || address)
          • FROM tab where cno = 12345;
        • Functionality available when you install IDS.
        • IDS and MQ interaction is transactionally protected
        • This Feature uses IDS transaction manager to support XA Compliant Resource Managers.
        • This feature is available starting in10.00.UC3
    7. MQ Series Scenario Websphere MQ Q1… Q2… Informix Dynamic Server MQ-DB2 database module Z/OS DB2 on Z/OS Direct interaction using MQ Functions App-1 App-2 MQ Functions App-3 Transaction Manager App-4
    8. IDS database server IDS client IDS client IDS client Orders_queue Inventory_queue backorder_queue IDS XA Transaction manager Infrastructure MQ Queue MQ Queue Manager MQ Message Broker MQ Functions Acme_queue_manager M Q I MQSeries UDR and XA support UDRs [xa_open, xa_commit, xa_rollback, etc] Websphere MQ IDS MQ Integration
    9. IDS MQ Functions
      • Direct IDS to Websphere MQ interaction
      • SEND, RECEIVE, READ, PUBLISH, SUBSCRIBE Operations
      • Supports character and clob types.
        • Data from other data types have to be converted to these types.
      • Access MQSeries Queue as a table
        • READ and RECEIVE tables
        • READ – non destructive browsing
        • INSERT into these MQ tables will send the row to the QUEUE
        • READ/RECEIVE from the table will retrieve msgs from the QUEUE
    10. Usage begin work; -- read message with corrid execute function mqread ('IDS.DEFAULT.SERVICE', 'IDS.DEFAULT.POLICY', 'QA_MQ_ID_1'); -- receive message with corrid execute function mqreceive ('IDS.DEFAULT.SERVICE', 'IDS.DEFAULT.POLICY', 'QA_MQ_ID_1'); commit work; begin work; -- receives 10 orders from the ORDER queue INSERT INTO ordertab SELECT FIRST 10 MQRECEIVE(‘MY.ORDER’) from systables; rollback work; -- insert rows begin work; SELECT MQSEND(‘NEW.ORDER’, order || ‘:’ || address) FROM tab WHERE cno = 12345; Commit work; MQ Service MQ Policy Correlation ID Transactional Boundary ROLLBACK
    11. MQ Functions
        • The following are the list of the MQ Functions.
          • MQRead()
          • MQReceive()
          • MQSend()
          • MQPublish(), MQPublishClob()
          • MQSubscribe()
          • MQUnSubscribe()
          • MQReadClob()
          • MQReceiveClob()
          • MQSendClob()
          • MQTRACE()
          • MQVERSION()
          • MQCREATEVTIREAD()
          • MQCREATEVTIRECEIVE()
        • Except MQTRACE(), MQVERSION(), MQCREATEVTIREAD() and MQCREATEVTIRECEIVE() all other functions needs be invoked with in the transaction ( explicit or implicit)
    12. MQ Parameters: MQREAD
      • service_name – should be a service in “informix”.mqiservice table (256 bytes max) Default: IDS.DEFAULT.SERVICE
      • policy_name – should be a policy in “informix”.mqipolicy table (48 bytes max) Default: IDS.DEFAULT.POLICY
      • correl_id -- correlation identifier for the message to be read/received/sent. (24 bytes max)
    13. Usage of MQ clob functions begin work; -- send/read/receive message using IDS.DEFAULT.SERVICE, IDS.DEFAULT.POLICY execute function mqsend (‘Hello'); execute function mqread (); execute function mqreceive() ; commit work; begin work; -- send a clob to MQ Queue execute function mqsendclob('IDS.DEFAULT.SERVICE', 'IDS.DEFAULT.POLICY', filetoclob("/etc/passwd", "client")); -- read message in clob using IDS.DEFAULT.POLICY execute function mqreadclob('IDS.DEFAULT.SERVICE‘); -- receive message in clob using IDS.DEFAULT.SERVICE, IDS.DEFAULT.POLICY execute function mqreceiveclob(); commit work;
    14. Usage of MQSubscribe/MQPublish begin work; -- SubScribe a topic using IDS.DEFAULT.PUB.SUB.POLICY execute function mqSubscribe('IDS.DEFAULT.SUBSCRIBER',"Weather"); commit work; begin work; -- Publish a topic using IDS.DEFAULT.PUB.SUB.POLICY execute function mqPublish('IDS.DEFAULT.PUBLISHER', "Raining in San Francisco","Weather"); commit work; begin work; -- Publish a clob topic using IDS.DEFAULT.PUB.SUB.POLICY execute function mqPublishClob('IDS.DEFAULT.PUBLISHER', filetocolb(“weather_report_90210”,”client”), "Weather"); commit work;
    15. Usage of mqUnSubscribe begin work; -- receive published topic execute function mqreceive('IDS.DEFAULT.SUBSCRIBER.RECEIVER', 'IDS.DEFAULT.PUB.SUB.POLICY'); commit work; begin work; -- Unsubscribe topic execute function mqUnSubscribe('IDS.DEFAULT.SUBSCRIBER',"Weather"); commit work;
      • Creates a local table that’s mapped to a websphere MQ Queue
      • Provides a way to browse messages in the queue without deleting the messages in the Queue.
      • execute function MQCreateVTI READ (“myreadtable“,
      • “ service”, “policy”, 4096);
      • Select first 10 * from myreadtable;
      • Insert into myreadtable values(“IBM:81.98;Volume:1020”);
      • Select * from myreadtable where correlid = ‘abcx123’;
      MQCreateVtiRead Table Name Max message size
    16. MQCreateVtiRead create table myreadtab ( msg lvarchar( maxMessage ), correlid varchar(24), topic varchar(40), qname varchar(48), msgid varchar(12), msgformat varchar(8)); using "informix".mq (SERVICE = “service_name”, POLICY = “policy_name”, ACCESS = “READ");
      • Creates a local table that’s mapped to a websphere MQ Queue
      • Provides a way get messages from the Queue.
      • Messages are deleting from the queue once you receive it (and the transaction is committed).
      • execute function MQCreateVTI Receive (“myreceivetab“,
      • “ service”, “policy”, 4096);
      • -- insert rows
      • begin work;
      • insert into myreceivetab(msg) values ("IBM:81.23;Volume:10100");
      • Select first 1 * from myreceivetab ;
      • Commit work;
      MQCreateVtiReceive
    17. MQTrace To enable trace by inserting a record into the systemtraceclasses system catalog insert into informix.systraceclasses(name) values ('idsmq') ; EXECUTE PROCEDURE MQTrace(50, '/tmp/trace.log'); begin; EXECUTE FUNCTION MQSend('IDS'); commit; Sample Trace (/tmp/trace.log): 14:19:38 Trace ON level : 50 14:19:47 >>ENTER : mqSend<< 14:19:47 status:corrid is null 14:19:47 >>ENTER : MqOpen<< 14:19:47 status:MqOpen @ build_get_mq_cache() 14:19:47 >>ENTER : build_get_mq_cache<<
      • Description(Cont.)
        • MQ Functions is part of IDS distribution
            • Installed under $INFORMIXDIR/extend/mqblade.2.0
            • Install using blade manager.
        • Configure an MQ VP
          • VPCLASS mq,noyield,num=1 # in your $ONCONFIG file.
        • In 10.00.xC3, MQ Functions are supported on the following platforms.
          • Solaris 32bit
          • HPUX 32bit
          • AIX 32bit
          • Windows 32bit
      • Description(Cont.)
        • In 10.00.xC4, MQ Functions are supported on the following platforms. Websphere MQ 6.0 needed.
          • HP UX 64-bit (PA RISC)
          • AIX 64-bit
        • In 10.00.xC5, MQ Functions are planned to support on the following platforms. Websphere MQ 6.0
          • Solaris 64 -bit
          • Linux 32-bit
          • Linux pseries 64-bit
        • Please provide feedback on Platform Requirement.
        • Using MQ Functions require WebSphere MQ Server installation on the same machine where IDS running.
      • Description(Cont.)
        • MQ QueueManager and MQ Queues needs to be configured.
        • $INFORMIXDIR/extend/mqblade.2.0/idsdefault.tst script needs to be run in the QueueManager to use default services.
        • following tables will be created during blade registration
          • “ informix”.mqiservice
          • “ informix”.mqipolicy
          • “ informix”.mqipubsub
        • User needs to insert appropriate values for into this tables to use the SERVICE, POLICY parameters of the MQ functions.
    18. CREATE TABLE &quot;informix&quot;.mqiservice ( servicename LVARCHAR(256), queuemanager VARCHAR(48) NOT NULL, queuename VARCHAR(48) NOT NULL, defaultformat VARCHAR(8) default ’ ’, ccsid VARCHAR(6) default ’ ’, PRIMARY KEY (servicename) ); servicename is the service name used in the MQ functions. queuemanager is the queue manager service provider. queuename is the queue name to send the message to or receive the message from. defaultformat defines the default format. ccsid is the coded character set identifier of the destination application. IDS MQ Tables
      • &quot;informix&quot;.mqipolicy
        • Has long list of message attributes [like retry count, expiry date, etc]
        • Default Policy is “IDS.DEFAULT.POLICY”
        • Use this or create custom policy based on this.
        • Read Websphere MQ Manuals to understand the Meaning of each of these fields in the messages.
      • &quot;informix&quot;.pubsub
        • Used to specify service names, end points for publish and subscribe functions.
      IDS MQ tables
    19. IDS MQ Tables CREATE TABLE &quot;informix&quot;.mqipubsub ( pubsubname LVARCHAR(256) NOT NULL UNIQUE, servicebroker LVARCHAR(256), receiver LVARCHAR(256) default ’ ’, psstream LVARCHAR(256) default ’ ’, pubsubtype VARCHAR(20) CHECK (pubsubtype IN (’Publisher’, ’Subscriber’)), FOREIGN KEY (servicebroker) REFERENCES &quot;informix&quot;.mqiservice(servicename)); pubsubname is the name of the publish/subscribe service. servicebroker is the service name of the publish/subscribe service. receiver is the queue on which to receive messages after subscription. psstream is the stream coordinating the publish/subscribe service. pubsubtype is the service type.
    20. 2-phase commit with IDS and the MQ Functions
      • Standard commit, rollback operations can be done on MQ operations.
      • IDS manages the transaction and implement 2-phase commit protocol.
      • MQ participates in the IDS transaction whenever MQ UDR is invoked.
        • MQ will be a resource manager.
      • IDS can manage distributed queries and MQ in the same transaction.
      • Cannot use MQ Functions when IDS as a XA resource manager with an external transaction manager.
      • MQ Functions can only be invoked in the coordinator.
    21. Resources
      • Infocenter: http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp
      • Infocenter is available for IDS v10 and v11 as well.
      • 10.00.UC7 and later Linux x86_64, HP-IA64, Solaris Intel 64bit Needs V6.0 or later
      • Developerworks Article: http://www.ibm.com/developerworks/db2/library/techarticle/dm-0609murthy/index.html
      • Youtube podcast: http://www.youtube.com/watch?v=lyiCaw4JGFE
    22. http://www.ibm.com/software/data/informix

    + Keshava MurthyKeshava Murthy, 2 years ago

    custom

    1206 views, 2 favs, 0 embeds more stats

    presentation on IBM Informix dynamic server and Web more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1206
      • 1206 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories