session 11861: mq on z/os - vivisection - ibm www page · first line managers – who does the real...

21
MQ on z/OS - Vivisection Lyn Elkins – [email protected] IBM Advanced Technical Skills

Upload: hoangkhuong

Post on 13-Dec-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

MQ on z/OS - Vivisection

Lyn Elkins – [email protected]

IBM Advanced Technical Skills

Page 2: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Agenda

One of these things is not like the other

How are messages stored?•

Private Queues

Shared Queues

First line managers - the components of a z/OS queue manager

What happens on a API call?

Summary

Page 3: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

One of these things is not like the other

MQ is NOT a database

Application:

MQGET – Input Queue

EXEC SQL INSERTEXEC SQL QUERYEXEC SQL QUERYEXEC SQL QUERY

MQPUT – Reply queue

Database

Page 4: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Private Queue Message Storage

Head

Start Scan

Tail

100MB

up to 100MB

very long message

...

Text up to 4MBMD First part of text Next part of text ...

M4

long message

...4MB + of text Next part of text Text up to 8MB

M3

short messages 4K

4MB

Text up to 4MBMD First part of text Next part of text ...

Subqueue

Message 1

Message 2

Page 5: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Shared Queue Message Storage

To be covered in detail in session Getting the best availability from MQ on z/OS by using Shared Queues, Friday at 11:00 am

Page 6: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

First Line Managers – who does the real work

To provide the qualities of service that are the basis for WMQ, the real work within the queue manager is divided into logical ‘workers’ or manager that interact with the underlying z/OS resource managers.

They are:•

Connection Manager•

Recovery Manager•

Log Manager•

Message Manager•

Topic manager•

Data Manager•

Buffer Manager•

Lock Manager•

Storage Manager•

CF Manager •

Security Manager……

Page 7: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Building Blocks - Resource Managers

BufferManager

DataManager

LogManager

RecoveryManager

ConnectionManager

MessageManager

CFManager

UR

Backout

MQI

Commit

Rlse

RedoUndo

Ckpt

Ckpt

MQOPEN

UR

LockManager

Page 8: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Handling Applications - Connection Manager

MQCONN

MQOPEN

MQPUT

...

Control Blocks

Control Blocks

Logs

Data

Other RMs

THREAD

Application

Connection manager

EOTEOMSYNCPOINT

COORDINATOR PHASE 2

PHASE 1

Page 9: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Getting requests into WMQ - Stubs and Adapters

CICS Region IMS RegionsMPP/BMP/FP

Appl

DFHMQSTB

RMI TRUE

Program calls

Queue Manager

Appl

MQI Stub

ESAF exits

(QRPL)

Control

Appl

Adapter

CSQBSTUB or..

Batch/TSO

Page 10: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Controlling the MQI and MQSC - Message Manager

MQI

MQOPEN

Message Manager

Command, Runtime, Groupservers

MQGETMQPUT

MQPUT1

MQINQMQSET

Application

MQOPENMQCLOSE

ValidationConsistencyTriggeringGet-Wait

MQSCCONSOLEQSG

Objects

SYSTEM.CLUSTER

BASE

Page 11: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Controlling Messages and Objects - Data Manager

LogMessages

Pagesets 1-99

Space group

Scavenger

SubQueue Msg pointers

SubQueue Msg pointers

Queue attributes

SubQueue Msg pointers

Pageset 0

Objects

Space group

REDO

UNDO

Space group

112

2

3

45

67

8

9

10

11

Page 12: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Buffer Manager – High Performance storage and retrieval

checkpoint

write pageset

pagesetread pageset

DEFINE BUFFPOOL(bpid)BUFFERS(nnnn)

bufferpages

dirty

dirty

dirty DEFINE PSID(psid)BUFFPOOL(bpid)NO FORCE

FORCE DIRTY PAGES > 3 CKPTS

STEALLRU

CKPT,STEAL,WRITE AHEAD

OLDEST

Page 13: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Providing Logging Interfaces - Log Manager

Log read and write functions

Log Shunting

Multiple active log data sets and archive

Archive inventory management

Duplexed for reliability

“Bootstrap” file End of log locationArchive inventory

Various Utilities

Page 14: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Concurrency and Isolation - Lock Manager

112

2

3

45

67

8

9

10

11 112

2

3

45

67

8

9

10

11112

2

3

45

67

8

9

10

11112

2

3

4

567

8

9

10

11

requestcommitallocation

M1 M2

Y

Z

X

Y ZXMQOO_INPUT_EXCLUSIVE

MQOO_INPUT_SHARED

MQOPENvs

DELETE QLOCAL

Page 15: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

committed puts

List Structure

uncommitted puts queue details

uncommitted gets

expired messages

SQ2 LH

SQM1 LH

SQM1 LH

MQCMIT

MQGET

SQ1 LH

(MQGET )

MQPUTMQGET

MQCMIT

KEYS

DATA

WRITE READ MOVE DELETEMONITOR

MsgId/CorrelId

State Priority Time Qmgr

Shared Message Queue Storage Using CF List Structures

Page 16: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Scenario – Persistent MQPut to a Triggered QueueApplication Message

ManagerData Manager Buffer

ManagerRecovery Manager

Log Manager Lock Manager

MQOPENACQUIRE LOCK

LOCATE QUEUE IN HASH TABLE

SECURITYBASE NAMEACQUIRE HANDLE

MQPUTUSE HANDLE

LOCATE PAGETO HOLD MSG

BUFFER PAGE

START UR LOG RECORDSLOG RECORDS

CHECKTRIGGER RULES

MQCMITFORCE LOG

RELEASE LOCKS

Page 17: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Scenario - MQGet from a Queue

Application Message Manager

Data Manager Buffer Manager

Recovery Manager

Log Manager Lock Manager

MQOPENACQUIRE LOCK

LOCATE QUEUE IN HASH TABLE

SECURITYBASE NAMEACQUIRE HANDLE

MQGETUSE HANDLE

FIND MSG (INDEX / NEXT)

BUFFER PAGE

START UR LOG RECORDSLOG RECORDS

MQCMITFORCE LOG

RELEASE LOCKS

Page 18: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Summary

Delivers transactional messaging Enables robust business applications

Complex, but well organised Adapters, Address spaces, Resource Managers

Designed for throughput, availability and scalabilityLogging, Buffering, Locking, Communications

Page 19: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Shameless Promotion

New RedBook covering what’s new in WMQ V7.1 and 7.5

Page 20: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real

Monday Tuesday Wednesday Thursday Friday

08:00 Are you running too many queue managers or brokers?

09:30 What's New in WebSphere Message Broker

Diagnosing Problems for MQ

CICS and WMQ - The Resurrection of Useful

11:00 Extending IBM WebSphere MQ and WebSphere Message Broker to the Cloud

WMQ - Introduction to Dump Reading and SMF Analysis - Hands-on Lab

BIG Data Sharing with the cloud - WebSphere eXtreme Scale and WebSphere Message Broker integration

Getting the best availability from MQ on z/OS by using Shared Queues

12:15

01:30 Introduction to MQ MQ on z/OS – Vivisection Migration and maintenance, the necessary evil

The Dark Side of Monitoring MQ - SMF 115 and 116 Record Reading and Interpretation

03:00 First Steps With WebSphere Message Broker: Application Integration for the Messy

BIG Connectivity with WebSphere MQ and WebSphere Message Broker

WebSphere MQ CHINIT Internals

Using IBM WebSphere Application Server and IBM WebSphere MQ Together

04:30 WebSphere MQ application design, the good, the bad and the ugly

What’s New in the WebSphere MQ Product Family

MQ & DB2 – MQ Verbs in DB2 & Q- Replication

WebSphere MQ Channel Authentication Records

06:00 Clustering - The Easier Way to Connect Your Queue Managers

This was session MQ Internals - The rest of the week ……

Page 21: Session 11861: MQ on z/OS - Vivisection - IBM WWW Page · First Line Managers – who does the real work † To provide the qualities of service that are the basis for WMQ, the real