1 / 51

Integrating OpenEdge ® Applications with SonicMQ ®

Integrating OpenEdge ® Applications with SonicMQ ®. Pat Bonser. Agenda. JMS (Java™ Messaging Service) concepts & SonicMQ OpenEdge Adapter for SonicMQ What is it? How do I install and configure? Show me examples! Futures, what’s planned for OpenEdge 10.1A Adapter for SonicMQ.

santiago
Download Presentation

Integrating OpenEdge ® Applications with SonicMQ ®

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Integrating OpenEdge® Applications with SonicMQ® Pat Bonser

  2. Agenda • JMS (Java™ Messaging Service) concepts & SonicMQ • OpenEdge Adapter for SonicMQ • What is it? • How do I install and configure? • Show me examples! • Futures, what’s planned for OpenEdge 10.1A Adapter for SonicMQ Integrating OpenEdge Applications with SonicMQ

  3. What is Messaging? • A mechanism enabling autonomous applications to communicate • Messages - units of information composed of • Payload • Header • Destinations • Priority • Ordering • Expiration • Time-to-Live • And more … Integrating OpenEdge Applications with SonicMQ

  4. How Does It Work? Destination Application A Application B JMS Broker Producer Consumer Message Oriented Middleware Bind to destination Bind to destination Read message Consume message Send message Integrating OpenEdge Applications with SonicMQ

  5. JMS Messaging Models • Point to Point (1 to 1) Potential Receiver Queue Sender Potential Receiver • Publish and Subscribe (1 to Many) Subscriber Publisher Topic Subscriber Integrating OpenEdge Applications with SonicMQ

  6. Connections and Sessions • A connection connects to a message broker • You can create one or more sessions within a connection JMS Client Connection Queue Session Topic Session Integrating OpenEdge Applications with SonicMQ

  7. Unified Domain (JMS 1.1) Creates Creates Creates Receives Messages From Sends Messages To Creates Creates ConnectionFactory Connection Session MessageProducer MessageConsumer Message Destination (Queue or Topic) Destination (Queue or Topic) Integrating OpenEdge Applications with SonicMQ

  8. So what is SonicMQ? • A Standards-Based Enterprise Messaging Server • A full functional implementation of JMS 1.1 specification • J2EE Compatibility 1.3 - 1.4 • Distributed Management Framework • Innovative Deployment Architectures • User Benefits • Enterprise-class reliability, scalability, performance using standards-based infrastructure • Distributed management simplifies and reduces cost of deployment, configuration, monitoring Integrating OpenEdge Applications with SonicMQ

  9. SonicMQ Domain Manager Start →Programs → Sonic Software → SonicMQ → SonicMQ Domain Manager Domain Manager Directory Service Agent Manager SonicMQ Management Broker Integrating OpenEdge Applications with SonicMQ

  10. Sonic Management Console Start →Programs → Sonic Software → SonicMQ → Management Console Integrating OpenEdge Applications with SonicMQ

  11. Queues Must Be Predefined Integrating OpenEdge Applications with SonicMQ

  12. Sonic JMS Test Client Start →Programs →Sonic Software → SonicMQ → JMS Test Client • Allows you to use messaging concepts without having to write Java code Integrating OpenEdge Applications with SonicMQ

  13. Demonstration SonicMQ • Demonstrate • Tool - Management Console • Create a queue • Tool - JMS Test Client • PTP demo using new Queue • Pub/Sub demo creating a Topic Integrating OpenEdge Applications with SonicMQ

  14. OpenEdge Adapter for SonicMQ • JMS concepts & SonicMQ • OpenEdge Adapter for SonicMQ • What is it? • How do I install and configure? • Show me examples! • Futures, what’s planned for OpenEdge 10.1A Adapter for SonicMQ Integrating OpenEdge Applications with SonicMQ

  15. OpenEdge Adapter for SonicMQ Enterprise Integration for OpenEdge Applications • OpenEdge Adapter for SonicMQ • Connects Progress 4GL app with SonicMQ • Seamless integration with existing 4GL • Development tools and Methodologies • Uses direct access from the 4GL to SonicMQ • Specific procedures for the Sonic API Integrating OpenEdge Applications with SonicMQ

  16. OpenEdge Adapter for SonicMQ • Direct access from 4GL to SonicMQ • GUI applications • Character applications (UNIX) • AppServer • Webspeed agents • Batch jobs • Connection between • 4GL applications • 4GL and non 4GL applications Integrating OpenEdge Applications with SonicMQ

  17. OpenEdge Adapter for SonicMQ Architecture SonicMQ PROGRESS 4GL*.w, *.p 4GL Adapterbroker 4GL client OpenEdge Database Integrating OpenEdge Applications with SonicMQ

  18. Progress Adapter Programs • Supplied .r files with API • For point to point • Install-dir/jms/ptpsession.r • For publish and subscribe • Install-dir/jms/pubsubsession.r Integrating OpenEdge Applications with SonicMQ

  19. Leverage SonicMQ jars • Copy • from SonicMQ install to Progress directory • install-dir\java\sonicMQ\lib • Alternatively • Point your lib directory to • install-dir\java\sonicMQ\lib Integrating OpenEdge Applications with SonicMQ

  20. Environment Variables Integrating OpenEdge Applications with SonicMQ

  21. Progress Components • AdminServer • OpenEdge Adapter for SonicMQ • NameServer (Optional) Integrating OpenEdge Applications with SonicMQ

  22. OpenEdge Adapter for SonicMQ • JMS concepts & SonicMQ • OpenEdge Adapter for SonicMQ • What is it? • How do I install and configure? • Show me examples! • Futures, what’s planned for OpenEdge 10.1A Adapter for SonicMQ Integrating OpenEdge Applications with SonicMQ

  23. PTP - Example OpenEdge Application OpenEdge Application SonicMQ Integrating OpenEdge Applications with SonicMQ

  24. PTP - Basic Steps • Requires a Queue • Connect to a SonicMQ Broker • Create a Message Consumer • Prepare to Receive Message From Queue • Send Message to Queue • Receive message from Queue • Delete message Integrating OpenEdge Applications with SonicMQ

  25. PTP – Requires a Queue Sonic Management Console Integrating OpenEdge Applications with SonicMQ

  26. PTP - Connect to SonicMQ Broker OpenEdge Application RUN jms/ptpsession.p PERSISTENT SET ptpsession ("-H localhost -S 5162 "). RUN setBrokerURL IN ptpsession (“tcp//machinename:2506"). RUN beginSession IN ptpsession. 5162 Broker 2506 Integrating OpenEdge Applications with SonicMQ

  27. PTP – Create Message to Send OpenEdge Application /* Create a Text Message */ RUN createTextMessage IN ptpsession (OUTPUT messageH)./* Handles the messages */ RUN setText IN MessageH (“Your Message”). 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  28. PTP - Send Message to Queue OpenEdge Application /* Send Message to the “desired” Queue */ RUN sendToQueue IN ptpsession (“YourQueue", messageH,/* message handle */ ?,/* priority, ? = system default */ ?,/* timeToLive, ? = system default */ ?)./* deliveryMode, ? = system default */ 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  29. PTP – Receive Message from Queue- Java OpenEdge Application /* Create Receiver Queues to receive messages */ javax.jms.Queue receiveQueue = receiveSession.createQueue(rQueue); javax.jms.MessageConsumer qReceiver = receiveSession.createConsumer(receiveQueue); qReceiver.setMessageListener(this); connect.start(); 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  30. PTP – Receive Message from Queue – 4GL OpenEdge Application OpenEdge Application /* Receive Message to the “desired” Queue */ RUN receiveFromQueue IN ptpsession (“YourQueue",/* Name of the Queue */ ?,/* No message selector */ consumerH,/* Handle incoming message default */ Sonic Broker Integrating OpenEdge Applications with SonicMQ

  31. PTP Demonstration Integrating OpenEdge Applications with SonicMQ

  32. Pub/Sub - Example OpenEdge Application OpenEdge Application SonicMQ Integrating OpenEdge Applications with SonicMQ

  33. Pub\Sub - Basic Steps • Connect to a SonicMQ broker • Topics can be set on at run time • Create a message subscriber • Subscribe to Topic • Publish message to Topic • Consume message from a Topic • Delete message Integrating OpenEdge Applications with SonicMQ

  34. Pub\Sub - Connect to SonicMQ Broker OpenEdge Application OpenEdge Application RUN jms/pubsubsession.p PERSISTENT SET pubsubsession ("-H localhost -S 5162 "). RUN setBrokerURL IN pubsubsession("tcp://machinename:2506"). RUN beginSession IN pubsubsession. 5162 5162 Broker 2506 Integrating OpenEdge Applications with SonicMQ

  35. Pub\Sub - Create Message Consumer – 4GL OpenEdge Application OpenEdge Application /* receives requests from the Topic */ RUN createMessageConsumer IN pubsubsession (THIS-PROCEDURE,/* This proc handles it */ “YourHandler",/* name of internal proc. */ OUTPUT consumerH). 5162 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  36. Pub\Sub - Create Message Consumer - Java OpenEdge Application OpenEdge Application /* receives requests from the Topic */ subSession = connect.createSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE) javax.jms.MessageConsumer subscriber = subsession.createConsumer(topic); Subscriber.setMessageListener(this); 5162 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  37. Pub\Sub – Subscribe to Topic OpenEdge Application OpenEdge Application RUN SUBSCRIBE IN pubsubsession ("Topic",/* topic name */?,/* Subscription durable */?,/* No message selector */NO, /* want my own messages to */consumerH)./* Handles the messages */ /* Start receiving requests */ RUN startReceiveMessages IN pubsubsession. 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  38. Pub\Sub - Publish Message to Topic OpenEdge Application OpenEdge Application /* In Bytes Message use mptr to store the XML*/ RUN setMemptr IN msgH (memFile, ?, ?). RUN publish IN pubsubsession ("Topic",/* Topic name */msgH,/* message handle */?,/* priority, ? = system default */ ?,/* timeToLive, ? = system default */?). /* deliverymode, ? = system default */ 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  39. Pub\Sub – Consumer Message from Topic OpenEdge Application OpenEdge Application /* From chargeHandler internal procedure */ memptrDoc = DYNAMIC-FUNCTION ('getMemptr':U IN msgH). hDoc:LOAD("memptr", memptrDoc, FALSE). hDoc:GET-DOCUMENT-ELEMENT(hRoot). hRoot:GET-CHILD(hTable, 1). … /* All your standard business logic */ 5162 Sonic Broker Integrating OpenEdge Applications with SonicMQ

  40. Pub/Sub Demonstration Integrating OpenEdge Applications with SonicMQ

  41. Integrating OpenEdge Applications with SonicMQ • JMS concepts & SonicMQ • OpenEdge Adapter for SonicMQ • What is it? • How do I install and configure? • Show me examples! • Futures, what’s planned for OpenEdge 10.1A Adapter for SonicMQ Integrating OpenEdge Applications with SonicMQ

  42. Under Development D I S C L A I M E R D I S C L A I M E R • This talk includes information about potential future products and/or product enhancements. • What I am going to say reflects our current thinking, but the information contained herein is preliminary and subject to change. Any future products we ultimately deliver may be materially different from what is described here. Integrating OpenEdge Applications with SonicMQ

  43. Installation • Prior to 10.1A • Users had to manually move jar files to appropriate directories • In 10.1A • Sonic “Silent Install” will move files to appropriate locations without user interaction Integrating OpenEdge Applications with SonicMQ

  44. Architecture • Prior to 10.1A, only one option • OpenEdge Adapter for SonicMQ • In 10.1A, two additional options • OpenEdge Adapter for SonicMQ ClientConnect • OpenEdge Adapter for SonicMQ ServerConnect Integrating OpenEdge Applications with SonicMQ

  45. Prior to 10.1AOpenEdge Adapter for SonicMQ RUN jms/ptpsession.p PERSISTENT SET hptpsession ("-HmyAdminServerMachine-S 5162 "). RUN setBrokerURL IN hptpsession (“tcp//mySonicMachine:2506"). RUN beginSession IN hptpsession. AdminServer SonicMQ Broker 2506 NameServer API-JMS MQAdapter JMS QUEUE Thread 1 Thread 2 API-JMS Thread 3 mySonicMachine myAdminServerMachine Integrating OpenEdge Applications with SonicMQ

  46. OpenEdge Adapter for SonicMQ ClientConnect RUN jms/ptpsession.p PERSISTENT SET hptpsession (“-SMQConnect"). RUN setBrokerURL IN hptpsession (“tcp//mySonicMachine:2506"). RUN beginSession IN hptpsession. SonicMQ Broker 2506 API-JMS Thread 1 Thread 2 QUEUE API-JMS Thread 1 Thread 2 mySonicMachine Integrating OpenEdge Applications with SonicMQ

  47. OpenEdge Adapter for SonicMQ ServerConnect X AdminServer SonicMQ Broker 2506 NameServer AppServer API-JMS Thread 1 QUEUE Thread 1 Thread 1 mySonicMachine Integrating OpenEdge Applications with SonicMQ

  48. Combination of PTP and Pub/Sub • Prior to 10.1A • Two different session • RUN jms/ptpsession.p.. • RUN jms/pubsubsession.p… • In 10.1A • Parent containing all API • RUN jms/jmssession.p… Integrating OpenEdge Applications with SonicMQ

  49. Functionalities and Upgraded APIs • Client Persistence • Enhanced XML support • Temp Table messages • ProDataSet messages • Fault Tolerance • Serialized Connection Objects • … Integrating OpenEdge Applications with SonicMQ

  50. The adapter allows 4GL programmers to use JMS messaging techniques from 4GL code It is easy to install and run examples Customers are successfully using this technology in Progress V9 and OpenEdge 10 In Summary 4GL WebSpeed .NET Sonic Broker Any Web Client Java Integrating OpenEdge Applications with SonicMQ

More Related