Professional Documents
Culture Documents
Internet and Intranet Protocols and Applications: Introduction To Mqseries and Asynchronous Messaging
Internet and Intranet Protocols and Applications: Introduction To Mqseries and Asynchronous Messaging
Lecture 14
Introduction to MQSeries And Asynchronous Messaging
May 1, 2002
Joseph Conron Computer Science Department New York University jconron@cs.nyu.edu
What is MQSeries?
A middleware product that implements a messaging and queuing framework. Middleware - an intermediate software component that bridges dissimilar computing environments.
Unix, MVS, OS/400 Tandem, VMS, NT, etc. SNA, NetBios, TCP/IP Cobol, C, JAVA
Asynchronous: App sends request and checks at some future time if complete.
Service need not be available when client sends request
Synchronous: good/bad
Good Bad
Easy to program Outcome is known immediately Error recovery easier (usually) Better real-time response (usually)
Service must be up and ready requestor blocks, held resources are tied up Usually requires connection-oriented protocol
Asynchronous: good/bad
Good Bad
Requests need not be targeted to specific server. Service need not be available when request is made No blocking, so resources could be freed Could use connectionless protocol
Response times are unpredictable error handling usually more complex Usually requires connection-oriented protocol Harder to design apps?
<Soap Box>
We are free to concentrate on the design of the application itself. We are no longer concerned with details of the environment.
</Soap Box>
1992-3
State Street Bank (Boston) evaluates IBM messaging product (code name Victory) for IBM CICS/ESA and SSIs ezBridge on VMS and Tandem.
State Street Bank would like to announce the wedding of IBM and Systems Strategies!
1993
IBM buys intellectual property rights for ezBridge from SSI
Over time, IBM replaced SSI versions with ports of its reference system. Today - MQSeries runs on over 35 platforms
Key Concept:
message queue exists independently from programs that use them!
Dont care what OS is used. Dont care what language theyre written in Dont care what the underlying communication protocol is used.
Message Queue
serves as transaction (syncpoint) coordinator for all queue operations. Accessed through the Message Queue Interface (MQI) Queue Managers have names (identities) that are UNIQUE in a network (like host names).
Remote Queue - a definition of a queue on a different queue manager (acts somewhat like a pointer)
Alias Queue - another name for a local or remote queue. Typically used to switch queue destinations without modifying program code. Model Queue - a template whose properties are copied when creating a new dynamic local queue ( create queue xxx like queue yyy).
MCAs have recoverable state - theyre STATEFUL - and a connection-oriented protocol. Message is not removed from xmit queue until partner MCA confirms placement on target queue
User Data
The application-to-application data (payload) transparent to MQSeries
MQSeries Messages
Units of Work and Transactions
Messages are added and removed from queues in Units of Work The smallest Unit of Work is one message. Units of work are atomic. When an app reads a message from a queue, a message appears to have been removed, but in fact, it is still in storage until the app commits the unit of work.
Syncpoint - A point of consistency (also called a or commit point). It is a moment at which all the recoverable data that an application program accesses is consistent.
MQSeries is XA compliant and can operate with other XA compliant systems as either a transaction manager (coordinator) or resource manager (particpant).
Some examples: Sybase, DB2, Oracle.
What is state?
Object definitions (queue manager, queues, processes, channels, etc) Queue content (messages) What about message channel state?
Problem: Length (in time) of longest running transaction vs amount of writes to log determines size of log needed.
MQGET
Get message