IBM WebSphere MQ V7.0 Introduction and Technical Overview Unit Agenda

An IBM Proof of Technology
IBM Software Group
IBM WebSphere MQ V7.0
Introduction and Technical Overview
An IBM Proof of Technology
© 2008 IBM Corporation
TechWorks
Unit Agenda
●Why is Messaging Important to the Enterprise?
●What is WebSphere® MQ? Why use it?
●What are:
Messages
Queues
Queue Managers
Channels
●Lab 1 – Exploring WebSphere MQ
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
2
1
An IBM Proof of Technology
TechWorks
What is WebSphere MQ - IBM
● A proven way of bridging between
the components of your Service
Oriented Architecture (SOA)
● Like a strong, broad bridge it
robustly links your applications and
your Web services
● It connects virtually any commercial
IT system
● Helping you to share and exchange
critical business information with
ease, confidence and security
© 2008 IBM Corporation
Introduction and Technical Overview
3
TechWorks
Why is this a Challenge?
“Computers are really dumb. You have to tell them everything.”
● How do you…?
Move data across different systems, platforms, and
devices when the HW, SW configurations and
programming models are different?
Overcome network failures?
Deliver information when the target application is not
online or is busy?
Ensure transmission integrity and recovery?
Handle lost or/duplicate data?
Ensure a secure connection?
Ensure multi-step transactions either happen
completely or not at all?
Apply qualities of service based on different
requirements? e.g., assured delivery, fast
delivery?
Manage a session (request/response)?
Efficiently distribute events?
Scale to handle volumes?
Deal with data in unlike formats?
Determine which data to send where?
Audit who sent what, where and when?
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
You either:
1. Program it all into
your applications
2. Build your own
middleware
3. Buy middleware to
do it for you
Introduction and Technical Overview
4
2
An IBM Proof of Technology
TechWorks
History
● IBM MQSeries® Introduced in 1992, initial release in 1994
C, COBOL, PL/I language initially supported by MQI
ƒ Limited initial set of API verbs (MQCONN, MQOPEN, MQPUT, MQGET, etc)
● MQ Publish/Subscribe support introduced in 1998
● JMS Specification published around the same time
Java™ Message Service (JMS) provided a higher level OO abstraction for messaging and simplified Pub/Sub
MQSeries implementation of JMS introduced shortly after specification published (1999)
● Additional languages, platforms and protocols supported over time
VB, .NET, C++, C#
Tandem (now HP NonStop Server), DEC (now HP OpenVMS), etc
Message Service API (XMS) introduced to provide non-Java developers the benefits of JMS
Java Connector Architecture (JCA) and HTTP support extends reach
● Product renamed WebSphere MQ in 2002
● Latest release introduces new MQ API (MQI) functions closely mapped to JMS specification.
Extended
MQI
MQI
MQI classes
C, COBOL, PL/I
C++, Java
MQI classes
JMS
MQ JMS
.NET
Enhanced
MQ JMS
XMS
1994
1999
MQSeries
2008
JCA HTTP
MQ Publish /
Subscribe
Introduction and Technical Overview
© 2008 IBM Corporation
5
TechWorks
What does WebSphere MQ do?
●Provides messaging services to applications and Web services
that need to exchange data and events with:
Proven reliability
Transactional integrity
Consistency
Time independence
Application A
Application Z
Ease and Speed
Flexibility
High-performance
WebSphere MQ
Security
Scalability
WebSphere MQ is like email for SOA applications
…but email you can bet your business on
Auditability
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
6
3
An IBM Proof of Technology
TechWorks
How do you use WebSphere MQ?
Developers attach
applications and Web
services to WebSphere MQ
using a choice of crossplatform languages and
interfaces – such as JMS
Application and
technology adapters
accelerate this activity…
JMS Interface
XMS Interface
MQ Interface
WebSphere MQ
Integration specialists
use cross-platform
graphical tooling to
configure their
messaging networks
– these tools are based
on open source Eclipse
© 2008 IBM Corporation
Introduction and Technical Overview
7
TechWorks
How does WebSphere MQ work?
● Messaging services are based on
Queues that store and forward data
based on simple programming
commands
● Uses the proven database technique
of two-phase commit transactions
to ensure messages are not lost or
duplicated
● Uses publish/subscribe to route
messages dynamically based on
keywords or “topics”
Message
Queue
Application A
MQ Client
Application Z
MQ Server
● Uses multi-processor threading and
clustering to accelerate throughput
of messages
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
8
4
An IBM Proof of Technology
TechWorks
The Value of Loose Coupling
Logical
Connection
Everything
Constantly
Available
B
A
B
Everything
Conditionally
Available
Busy
B
A
Message/Queuing
Environment
A
Not
Available
Not
Available
B
B
A
Not
Available
Not
Available
A
Introduction and Technical Overview
© 2008 IBM Corporation
9
TechWorks
Synchronous vs. Asynchronous Communications
Synchronous communications = Telephone conversation
YOU can’t simultaneously have separate
conversations without:
Connected!
ƒ Experiencing overlapping conversations
and losing track of what is going on
or
Busy!
Busy!
ƒ Waiting for the other person to finish
before responding.
Busy!
Busy!
Busy!
NEITHER CAN YOUR APPLICATIONS!
Asynchronous communications = Voicemail / Email
Please leave a
message and I will
listen to it when I am
available.
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Asynchronous communications
enable better resource utilization thus
improving performance; carry on
processing until system is available.
Introduction and Technical Overview
10
5
An IBM Proof of Technology
TechWorks
Elements of Messaging and Queuing
Î
Programs communicate by
putting messages in message
queues
“A building block for
distributed processing”
processing”
© 2008 IBM Corporation
Introduction and Technical Overview
11
TechWorks
Elements of Messaging and Queuing
Î
Communication can
be one way or two
way
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
12
6
An IBM Proof of Technology
TechWorks
Elements of Messaging and Queuing
Î
Either program can
be busy or
unavailable
© 2008 IBM Corporation
Introduction and Technical Overview
13
TechWorks
Elements of Messaging and Queuing
There can be a one to many
relationship between
applications
Or a many to one
relationship between
applications
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
14
7
An IBM Proof of Technology
TechWorks
What is a Message?
● A message is considered to be the unit of data to be moved
from one application to another
● A message is built by an application
● A message is consumed by a different application
● Message can contain any kind of data:
Binary data
ƒ A video clip, a song, a photograph, a sensor reading, etc…
Text data
– Raw text
– XML
Structured data (C Structures, COBOL Copybook, Serialized Java objects)
The source data is the choice of the application
Introduction and Technical Overview
© 2008 IBM Corporation
15
TechWorks
The structure of an MQ Message
Message Headers
Message Properties
Message Headers
Message Properties
●A Set of Message Attributes
understood and augmented
by the Queue Manager
●Arbitrary values associated
with the message but not part
of the body
Unique Message Id
Correlation Id
Routing Information
Reply Routing
Information
Message Priority
Message Persistence
ƒPersistent
ƒNon-persistent
●Properties can be integers,
strings, boolean, etc.
●Receiving apps do not see
them unless they want
●Permits explicit statement of
relationships between
messages
e.g. Message X is a
REPLY to Message Y
Message Data
Message Data
●Any sequence of bytes
Defined by the sending program
Understood by the receiving program
NOT meaningful to the Queue
Manager
●Can contain any data
Structured
ƒ XML, Tagged, Tagged Delimited, C
or Cobol defined, etc.
Unstructured
ƒ Binary
– A video, a picture, etc.
Message Codepage
ƒ Any content
Message Format
Etc…
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
16
8
An IBM Proof of Technology
TechWorks
What is a Queue?
● Messages are delivered asynchronously to a Queue
● A Place to hold messages
● Queue creation
Pre-defined
Dynamic definition
● Message Access
FIFO (first in first out)
Priority (FIFO within Priority)
Direct
Destructive & non-destructive access
● Parallel access by applications
Managed by the queue manager
Introduction and Technical Overview
© 2008 IBM Corporation
17
TechWorks
What is a Queue Manager?
Applications
Utilities
Command Server
Listener
Channel Initiator
Trigger monitor
Windows Explorer
PUT GET
Messaging
& Queuing
LOG
Operating
System
& Storage
Operating System
• Timers
• Semaphores
• ECBs
• Memory
•…
Communications
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
18
9
An IBM Proof of Technology
TechWorks
How are Messages Persisted?
Queue Files
Application
Program
Persistent
message
Queue
Manager
Logs
Queue
MQPUT
CC/RC
● Messages may be written to queue files
● Persistent messages are logged
● Persistent Messages are always
recoverable
Queue
Non-Persistent
message
● Logging has implication on performance
MQPUT
● Non-persistent Messages have 2 classes of
service:
CC/RC
Messages are retained for the life of the
Qmgr
Messages can survive a normal
shutdown and restart of the Queue
Manager
© 2008 IBM Corporation
Introduction and Technical Overview
19
TechWorks
What are Channels?
● Queue Manager to Queue Manager
Uni-directional
Usually defined in pairs for example:
ƒ One Sender
ƒ One Receiver
Asynchronous
● Client to Queue Manager
Bi-directional
Defined as a single channel
Synchronous
● A building block for a reliable Enterprise
Service Bus (ESB)
** Note: Client to Client communication must go via a Queue Manager
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
20
10
An IBM Proof of Technology
TechWorks
Reliable, asynchronous communication with
WebSphere MQ
Accept Message
• Receive message from application
Program A
Program B
Put Q1
• Manage “unit of work”
Get Q1
Apply Security (optional)
• Access Control
(permission to get/put by queue or
topic)
Q1
Q5
Q12
Deliver Message(s)
• Deliver message to application
Messaging and Queuing
• Ensure Exactly Once Delivery
(even after a failure)
• Manage “unit of work”
Introduction and Technical Overview
© 2008 IBM Corporation
21
TechWorks
Queues can be Local or Remote
System 2
System 1
Program A
Put Q2
Program B
Put Q1
Program C
Get Q1
Get Q2
Get Q2
MQI
MQI
Messaging
and
Queuing
Messaging
and
Queuing
Q1
XmitQ
Sender
Channel
Q2
Receiver
Channel
TCP/IP is primary protocol
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
22
11
An IBM Proof of Technology
TechWorks
Parallel Processes
MQPUT HotelQ
MQPUT
Car_hireQ
Hotel
MQPU
T
Car_hire
MQPU
T
HotelQ
MQPUT AirlineQ
Car_hire
Q
MQGET Reply to
Q
Airline
Q
Airline
Reply
to Q
MQPU
T
© 2008 IBM Corporation
TechWorks
Asynchronous Syncpoint
Synchronous Model
DB
Write
Send
Receive
Write
2 phase
commit
Syncpoint
DB
Syncpoint
Unit of Work
Asynchronous Model
DB
Write
Put
Syncpoint
q
Unit of Work 1
Unit of Work 2
Q Get
Write
Syncpoint
Unit of Work 3
DB
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
12
An IBM Proof of Technology
TechWorks
Triggering (Overview)
B
Queue
Manager
START
Appl.Q
A
Trigger
Mechanism
External
Facility
© 2008 IBM Corporation
Parallel Processes
IBM Software Group
MQPUT HotelQ
MQPUT Car_hireQ
Hotel
MQPUT
HotelQ
MQPUT AirlineQ
Car_hireQ
Car_hire
MQPUT
Re
to
MQGET Reply to Q
An IBM Proof of Technology
AirlineQ
Airline
MQPUT
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
13
An IBM Proof of Technology
Asynchronous Syncpoint
Synchronous
IBM Model
Software Group
Write
Send
DB
Receive
Write
2 phase
commit
Syncpoint
DB
Syncpoint
Unit of Work
Asynchronous Model
An IBM Proof of Technology
DB
Write
Put
Syncpoint
q
Q
Unit of Work 1
Unit of Work 2
Unit of Work 3
Get
Write
Syncpoint
DB
© 2008 IBM Corporation
Triggering (Overview)
IBM Software Group
Queue Manager
B
START
Appl.Q
An IBM Proof of Technology
A
External
Facility
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
14
An IBM Proof of Technology
TechWorks
Developing WebSphere MQ Applications
● WebSphere MQ supports a wide range of platforms
Windows®, UNIX® , Linux ®, z/OS®, i5OS®, HP NonStop, etc…
● With a whole range of programming languages
Java, C/C++, C#, .NET, COBOL, RPG, TAL, etc…
● And a wide range of Interfaces
MQI, JMS, .NET, etc…
● A large number of sample programs are provided to show how to develop
MQ applications for various languages and environments, for example:
Put sample
Get sample
Browse sample
Publish sample
Subscriber sample
…and many others
amqsput
amqsget
amqsgbr
amqspub
amqssuba
Introduction and Technical Overview
© 2008 IBM Corporation
29
TechWorks
The solution to Universal Connectivity Æ IBM WebSphere MQ
Features:
WebSphere MQ can dramatically
reduce application infrastructure
costs by providing a single
manageable distributed infrastructure
for all application messaging traffic.
COBOL, C, C++, RPG,
…others.
Multiple APIs
Java / JEE
C, C++, .NET C#
XMS
JMS
MQ Interface
WebSphere MQ supports the broadest range of APIs,
programming languages and OS platforms
Provides the only JMS engine that can be implemented
on “any” standards-compliant JEE server
Provides rich web services interfaces for customers
needing reliable SOAP message delivery
Offers a broad range of qualities of service and
messaging methods including publish/subscribe
Supports major transaction monitors and database
managers
Offers the most scalable, most manageable messaging
system available
Assures transactional message delivery end-to-end.
Web Services
Microsoft®
SOAP
.NET (C#)
HTTP, FTP, …
Other Interfaces
WebSphere MQ
HP-UX
Windows
zLinux
Solaris
AIX
zOS
i5OS
Linux
NSS OVMS
80+ platform configurations
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
30
15
An IBM Proof of Technology
TechWorks
WebSphere MQ Enterprise Class Messaging
● Proven Scalability
Grow your network incrementally one server at a time
● Performance
Many clients are moving millions of messages per day
● Administer massive networks
Cross-platform, remote configuration tooling
Tivoli® CAM for enterprise-wide systems administration
● Support for virtually any commercial IT platform
● MQ for z/OS
Built from the ground up to exploit zSeries platform
Consistent with MQ on distributed platforms
● Clustering on distributed, shared queues on z/OS
For High-Availability and workload balancing
Easier to set up than you may think!
● Multi-threading
Exploits multi-processors for high-speed throughput
● Security
Industry-standard SSL support
Certified for Common Criteria
Policy-based security with MQ Extended Security Edition
ƒ
ƒ
ƒ
ƒ
90% of the Fortune 100
300 of the Fortune 500
66% of NA and European banks
Banking clients move transactions
worth $35 Trillion over MQ
ƒ Government clients move 675+
million messages per day over MQ
● IBM’s worldwide 24x7 support
© 2008 IBM Corporation
Discovering the value of WebSphere MQ V7
for Your Enterprise Messaging Needs
Introduction and Technical Overview
31
16